Zaktualizuj szablon dokumentu
PUT
/api/v2/Templates/{templateId}
const url = 'https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v2/Templates/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","body":"example","lang":"example","tableTemplateType":"example","settings":{"pdfHeight":"example","pdfWidth":"example","pdfMarginTop":"example","pdfMarginBottom":"example","pdfMarginLeftRight":"example","type":"CSV"},"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"}},"ownedTags":[{"id":1,"name":"example","value":"example"}],"modifiers":[{"tag":"[waluta]","operator":"replace_if","condition":"USD","newValue":"PLN","position":1}],"shipmentLabelsSettings":{"labelType":"All","marginTopMm":1,"marginLeftMm":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v2/Templates/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "body": "example", "lang": "example", "tableTemplateType": "example", "settings": { "pdfHeight": "example", "pdfWidth": "example", "pdfMarginTop": "example", "pdfMarginBottom": "example", "pdfMarginLeftRight": "example", "type": "CSV" }, "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" } }, "ownedTags": [ { "id": 1, "name": "example", "value": "example" } ], "modifiers": [ { "tag": "[waluta]", "operator": "replace_if", "condition": "USD", "newValue": "PLN", "position": 1 } ], "shipmentLabelsSettings": { "labelType": "All", "marginTopMm": 1, "marginLeftMm": 1 } }'Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”templateId
wymagane
integer format: int64
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
name
string
body
string
lang
string
tableTemplateType
string
settings
object
pdfHeight
string
pdfWidth
string
pdfMarginTop
string
pdfMarginBottom
string
pdfMarginLeftRight
string
type
string
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
ownedTags
Array<object>
object
id
integer format: int64
name
string
value
string
modifiers
Array<object>
object
tag
wymagane
string
Example
[waluta]operator
wymagane
string
Example
replace_ifcondition
wymagane
string
Example
USDnewValue
wymagane
string
Example
PLNposition
integer format: int64
shipmentLabelsSettings
object
labelType
string
marginTopMm
integer format: int64
marginLeftMm
integer format: int64
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Typ treściapplication/json
object
id
integer format: int64
name
string
body
string
lang
string
tableTemplateType
string
createdAt
string format: date-time
updatedAt
string format: date-time
scope
string
settings
object
id
integer format: int64
pdfHeight
string
pdfWidth
string
pdfMarginTop
string
pdfMarginBottom
string
pdfMarginLeftRight
string
type
string
createdAt
string format: date-time
updatedAt
string format: date-time
sections
object
order
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
orderHistory
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
lineItems
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
lineItemsList
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
lineItemsSummary
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
shipment
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
invoice
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
invoiceItems
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
invoiceVat
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
receipt
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
receiptItems
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
return
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
returnItems
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
message
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
payment
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
pickpack
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
stats
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
orderStats
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
ownedTags
Array<object>
object
id
integer format: int64
name
string
value
string
createdAt
string format: date-time
updatedAt
string format: date-time
modifiers
Array<object>
object
id
integer format: int64
parentId
integer format: int64
tag
string
operator
string
condition
string
newValue
string
position
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
shipmentLabelsSettings
object
labelType
string
marginTopMm
integer format: int64
marginLeftMm
integer format: int64
Example
{ "scope": "Orders", "settings": { "type": "CSV" }, "shipmentLabelsSettings": { "labelType": "All" }}
