Przejdź do głównej zawartości

Utwórz szablon dokumentu

POST
/api/v2/Templates
curl --request POST \
--url https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v2/Templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "name": "example", "body": "example", "lang": "example", "isSystem": true, "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": [ { "name": "example", "value": "example" } ], "modifiers": [ { "tag": "[waluta]", "operator": "replace_if", "condition": "USD", "newValue": "PLN", "position": 1 } ], "shipmentLabelsSettings": { "labelType": "All", "marginTopMm": 1, "marginLeftMm": 1 } }'

Tworzy szablon wydruku lub dokumentu (np. faktury proforma, potwierdzenia zamówienia), używany przez endpointy Renderer.

Example

{
    "name": "test_template",
    "body": "123"
}
Typ treściapplication/json
object
id
integer format: int64
nullable
name
string
nullable
body
string
nullable
lang
string
nullable
isSystem
boolean
nullable
tableTemplateType
string
nullable
settings
object
pdfHeight
string
nullable
pdfWidth
string
nullable
pdfMarginTop
string
nullable
pdfMarginBottom
string
nullable
pdfMarginLeftRight
string
nullable
type
string
Dozwolone wartości: CSV TEXT PDF XML
sections
object
order
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
orderHistory
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
lineItems
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
lineItemsList
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
lineItemsSummary
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
shipment
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
invoice
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
invoiceItems
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
invoiceVat
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
receipt
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
receiptItems
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
return
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
returnItems
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
message
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
payment
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
pickpack
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
stats
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
orderStats
object
body
string
nullable
enabled
boolean
orderBy
string
nullable
groupBy
string
nullable
ownedTags
Array<object>
nullable
object
name
string
nullable
value
string
nullable
modifiers
Array<object>
nullable
object
tag
wymagane
string
Example
[waluta]
operator
wymagane
string
Dozwolone wartości: replace_if replace_if_diff no_operator
Example
replace_if
condition
wymagane
string
Example
USD
newValue
wymagane
string
Example
PLN
position
integer format: int64
nullable
shipmentLabelsSettings
object
labelType
string
Dozwolone wartości: All Outbound Return
marginTopMm
integer format: int64
marginLeftMm
integer format: int64

Success

Typ treściapplication/json
integer format: int64
Examplegenerated
1