Skip to navigation

Render a PDF from a template and data

Renders a PDF document by merging data into a template. Provide either templateId (referring to a stored template owned by the calling organization or a system template) or template (an inline BlockTemplate). Returns the binary PDF as application/pdf. Optional attachments are embedded after the render (visible in the Acrobat Attachments pane).

Authentication

AuthorizationBearer

API Key authentication. Use sk_live_* for production or sk_test_* for testing.

Request

Request body for generic PDF generation.
datamap from strings to anyRequired

Data object that is merged into the template placeholders. Shape is template-specific — keys must match the placeholders the template expects.

templateIdstringOptionalformat: "uuid"

UUID of a stored template (system or organization-owned). Mutually exclusive with template.

templatemap from strings to anyOptional

Inline template definition. Mutually exclusive with templateId.

attachmentslist of objectsOptional

Optional file attachments to embed into the rendered PDF (visible in the Acrobat Attachments pane; same mechanism as ZUGFeRD/Factur-X embedding).

Response

PDF document

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error