Updates multiple organization PDF templates. Returns 200 on success, or 400 if any entry fails validation.
Headers
-
API token (can be retrieved from account settings)
-
ID of organization, for which the operation must be performed
Body
Required
-
Entity ID. If negative value, a new entity will be created
-
Template name
-
Template type
Values are
SALES_INVOICE,LATE_NOTICE,SALARY_SLIP,MY_SALARY_SLIP,SALES_ORDER,VAT_REPORT,DELIVERY_NOTE, orGENERAL_LEDGER. -
Country ID this template applies to. Required for certain document types by country
-
Reference to a previously uploaded source template file
-
Reference to a previously uploaded preview template file
-
Reference to a previously uploaded preview image file
-
Whether the template is active
-
Template description
PUT
/api-v1/pdf-template/batch
curl \
--request PUT 'https://wyzio.app/api-v1/pdf-template/batch' \
--header "Content-Type: application/json" \
--data '[{"id":12345678,"name":"Invoice Template EN","templateType":"SALES_INVOICE","countryId":12345678,"sourceTemplate":{"id":12345678},"previewTemplate":{"id":12345678},"previewImage":{"id":12345678},"isActive":true,"description":"Standard English invoice layout"}]'
Request examples
# Headers
# Payload
[
{
"id": 12345678,
"name": "Invoice Template EN",
"templateType": "SALES_INVOICE",
"countryId": 12345678,
"sourceTemplate": {
"id": 12345678
},
"previewTemplate": {
"id": 12345678
},
"previewImage": {
"id": 12345678
},
"isActive": true,
"description": "Standard English invoice layout"
}
]
Response examples (200)
{
"items": [
{
"errorCode": {
"errorCode": "NO_ERROR",
"errorDetailValues": [
{
"errorCode": "string",
"fieldName": "string",
"data": "string",
"isSevere": true
}
]
},
"possibleWorkflows": [
{
"id": 42,
"name": "string"
}
],
"error": true,
"severeError": true
}
]
}