DocsGenerator API Reference
Docsgenerator is a service that generate docx, xlsx, pdf from templates.
Authentication
Docsgenerator uses API key to allow access to the API.
Docsgenerator expects the API key to be included in all API requests to the server in a header that looks like the following:
You can find the API key in your Account page.
Create document
Method: POST
Body
createPdf - In case you need not only generated Docx document with your data, but also a PDF version, set this to true. (Works only for DOCX templates now)
{{templateUid}} - uid of you uploaded template. Go to templates page to find it.
{{variableName}}: {{value}} - variables from you template, with values to replace. Pleasee see blog post with detailed tutorial creating template.
curl example
Response: 200
{
"status": "COMPLETED",
"created_at": "2023-03-30T16:39:18.813944",
"document_uid": "234092834098"
}
Status "COMPLETED", indicates that document ready. Use {{document_uid}} to download it.
Download document
Method: GET
Response: 200
Output: Binary stream with docx or xlsx document.
curl example
Download PDF document
Method: GET
Response: 200
Output: Binary stream with pdf document.