Generate
Generates a PDF document from a template and input data.
This is the primary endpoint used for document generation.
- HTTP Method:
POST - Endpoint:
https://eledo.online/api/RESTv1/Generate
Request body
| Name | Type | Required | Description |
|---|---|---|---|
templateId | String | Yes | Template identifier |
templateVersion | Integer | No | Template version |
file | Object | Yes* | Input data for the template |
Minimal example
The following payload is the minimal reliably working request:
{
"templateId": "...",
"file": null
}
Response
Success
- Content-Type:
application/pdf - Body: Binary PDF data
Headers
| Header | Description |
|---|---|
Content-Disposition | Contains the generated filename |
Example:
content-disposition: attachment; filename="0_0.pdf"; filename*=UTF-8''0_0.pdf
Error
- Content-Type:
application/json
| Name | Type | Description |
|---|---|---|
errors | Array | List of errors |
Filename handling
- The filename is provided in
Content-Disposition - Two variants may be present:
filename="..."filename*=UTF-8''...
Recommendation:
Handle both formats when extracting filenames
How it works
- Select a template (
templateId) - Provide input data (
file) - The API renders and returns a PDF
Next steps
Was this article helpful?
Yes
No