Tools
Template draft testing
Endpoint can be used to test template drafts before uploading them into system
POST
/api/test-template-draftAuthorizations
X-AUTH-TOKEN
stringheaderrequired
Value for the X-AUTH-TOKEN header parameter.
Request Body
application/json
required
The new TestTemplateDraft resource
{
"description": "Invoice Nbr. <<invoice.number>> | Invoice Nbr. 123",
"fileName": "invoice_nbr_<<invoice.number>> | invoice_nbr_123",
"customId": "<<invoice.number>> | 123",
"legacy": false,
"chartIdentifiers": [
"consumption",
"balance"
],
"file": "data:application/docx;base64,xxx... | data:application/pdf;base64,xxx...",
"format": "pdf",
"data": {
"contract": {
"email": "john.doe@output.rocks"
},
"invoice": {
"number": "123",
"date": "12 March 2022"
},
"items": [
{
"qty": "3",
"ItemName": "ACP101 Accounting Package",
"amt": "1350.00"
},
{
"qty": "4.5",
"ItemName": "ACP101S Standard Support",
"amt": "450.00"
},
{
"qty": "10",
"ItemName": "ACP101T Online Training",
"amt": "1200.00"
}
]
}
}Response
201
TestTemplateDraft resource created
id
string
Unique test-template-draft request identifier.
description
string
Input: description with optional placeholders<br>Output: generated description
fileName
string
Input: target file name with optional placeholders<br>Output: generated target file name
customId
string
Input: custom ID with optional placeholders<br>Output: generated custom ID
file
string<binary>required
Input: base64 encoded template (.dox) file<br>Output: base64 encoded generated file