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.
/api/renderingsAuthorizations
Value for the X-AUTH-TOKEN header parameter.
Request Body
The new Rendering resource
{
"id": 12345,
"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"
}
},
"staticAttachments": [
{
"fileName": "terms.pdf",
"content": "JVBERi0x..."
}
],
"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
Rendering resource created
Identifier generated by Output.Rocks.
External id
Template identifier.
Document format to render
Webhook (identifier) to execute after document rendering.
Rendering Comment.
Identifier of Email-Server configuration in Output.Rocks
Optional metadata to be used in webhooks
Optional PDF attachments. For document-only requests they are appended in this order; for email requests they are attached to every email.
Data to be used in rendered email, attachments, charts and webhooks.