Generate

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

NameTypeRequiredDescription
templateIdStringYesTemplate identifier
templateVersionIntegerNoTemplate version
fileObjectYes*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

HeaderDescription
Content-DispositionContains the generated filename

Example:

content-disposition: attachment; filename="0_0.pdf"; filename*=UTF-8''0_0.pdf

Error

  • Content-Type: application/json
NameTypeDescription
errorsArrayList 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

  1. Select a template (templateId)
  2. Provide input data (file)
  3. The API renders and returns a PDF

Next steps

  • List templates → List
  • Retrieve schema → Schema

Was this article helpful?

Yes

No