Wygeneruj tekst z szablonu podanego w żądaniu
POST
/api/v3/Renderer/RenderTextFromTemplate
const url = 'https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v3/Renderer/RenderTextFromTemplate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"template":{"sections":{"order":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"orderHistory":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"lineItems":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"lineItemsList":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"lineItemsSummary":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"shipment":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"invoice":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"invoiceItems":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"invoiceVat":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"receipt":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"receiptItems":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"return":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"returnItems":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"message":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"payment":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"pickpack":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"stats":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"orderStats":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"}},"body":"example"},"objects":{"type":"Order","streamSubType":"Order","ids":["example"],"filter":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v3/Renderer/RenderTextFromTemplate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "template": { "sections": { "order": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "orderHistory": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "lineItems": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "lineItemsList": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "lineItemsSummary": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "shipment": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "invoice": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "invoiceItems": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "invoiceVat": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "receipt": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "receiptItems": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "return": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "returnItems": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "message": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "payment": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "pickpack": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "stats": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "orderStats": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" } }, "body": "example" }, "objects": { "type": "Order", "streamSubType": "Order", "ids": [ "example" ], "filter": "example" } }'Renderuje tekst z treści szablonu przekazanej bezpośrednio w żądaniu, bez zapisywania go – przydatne do podglądu i testowania szablonów.
Example:
{
"template": {
"sections": {
"order": {
"body": "string",
"enabled": true,
"orderBy": "string"
},
... (other sections)
},
"body": "string"
},
"objects": {
"type": "Order",
"streamSubType": "Order",
"ids": [
"string"
]
}
}
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”The rendering request with inline template content.
Typ treściapplication/json
object
template
object
sections
object
order
object
body
string
enabled
boolean
orderBy
string
groupBy
string
orderHistory
object
body
string
enabled
boolean
orderBy
string
groupBy
string
lineItems
object
body
string
enabled
boolean
orderBy
string
groupBy
string
lineItemsList
object
body
string
enabled
boolean
orderBy
string
groupBy
string
lineItemsSummary
object
body
string
enabled
boolean
orderBy
string
groupBy
string
shipment
object
body
string
enabled
boolean
orderBy
string
groupBy
string
invoice
object
body
string
enabled
boolean
orderBy
string
groupBy
string
invoiceItems
object
body
string
enabled
boolean
orderBy
string
groupBy
string
invoiceVat
object
body
string
enabled
boolean
orderBy
string
groupBy
string
receipt
object
body
string
enabled
boolean
orderBy
string
groupBy
string
receiptItems
object
body
string
enabled
boolean
orderBy
string
groupBy
string
return
object
body
string
enabled
boolean
orderBy
string
groupBy
string
returnItems
object
body
string
enabled
boolean
orderBy
string
groupBy
string
message
object
body
string
enabled
boolean
orderBy
string
groupBy
string
payment
object
body
string
enabled
boolean
orderBy
string
groupBy
string
pickpack
object
body
string
enabled
boolean
orderBy
string
groupBy
string
stats
object
body
string
enabled
boolean
orderBy
string
groupBy
string
orderStats
object
body
string
enabled
boolean
orderBy
string
groupBy
string
body
string
objects
object
type
string
streamSubType
string
ids
Array<string>
filter
string
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success

