Rendering
API for starting template rendering
This API will start the process of template rendering and return an id of started process. Rendering will be done asynchronously. Generated document can be requested via GET Api or admin UI. It is also possible to provide configured webhooks, which will be executed after document generation.
POST
/api/renderingsAuthorizations
X-AUTH-TOKEN
stringheaderrequired
Value for the X-AUTH-TOKEN header parameter.
Request Body
application/json
required
The new Rendering resource
{
"externalId": "external-id",
"template": "my-invoice",
"format": "pdf",
"webhook": "my-webhook",
"comment": "My Comment",
"emailServer": "my-smtp",
"metadata": {
"reference": "my-reference-123",
"info": {
"version": 3,
"type": "my-type"
}
},
"data": {
"contract": {
"email": "john.doe@output.rocks"
},
"invoiceNumber": "123456",
"invoiceDate": "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
Rendering resource created
id
integer
Identifier generated by Output.Rocks.
externalId
string
External id
template
stringrequired
Template identifier.
format
enum<string>
Document format to render
webhook
string
Webhook (identifier) to execute after document rendering.
comment
string
Rendering Comment.
emailServer
string
Identifier of Email-Server configuration in Output.Rocks