Render Template
POST/templates/:template_id/render
Fill a stored Word template and return the resulting .docx.
The request carries only the values for the template's placeholders
(see GET /templates/{template_id}). Rendering is synchronous: the response
body is the finished document, served with
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
and a Content-Disposition: attachment header carrying the file name.
Rules
- Unknown keys are rejected with
400; the error lists the valid keys. - A required placeholder must be present and non-empty; a required
markdownvalue must render at least one paragraph, heading or list item. - At most 100 values; a key holds at most 100 characters, a value at most 200,000.
- An optional placeholder left out or empty drops the line it sits on from the document.
textvalues are inserted as written; line breaks are kept. Characters a Word document cannot hold (control characters) are dropped.markdownvalues are set in the template's own styles: paragraphs, headings,-bullets, numbered lists,**bold**and*italic*. A numbered list that does not start at 1 keeps its numbers as typed, so a paragraph opening with a date (12. März ...) stays as written.
Values are used for this one response and are not stored.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 500
The filled Word document (.docx)
Bad Request
Unauthorized
Forbidden
Not Found
Internal Server Error