PDF Templates
List PDF Templates
Returns every PDF template — the global templates plus every store-specific override.
Get PDF Template
Returns a single PDF template by ID, including its raw `content`, resolved `variables`, `variables_tree`/`schema`, and `preview_destinations`.
Update PDF Template
Updates the `content` of a PDF template and snapshots the previous content as a new version.
Reset PDF Template to Default
Resets a PDF template back to its default content and records the reset as a new version so the prior content can still be restored.
Preview PDF Template
Renders a preview of draft template content without saving it.
List Sample Records for Preview
Lists the records a template can be previewed against, so a preview can be rendered from real data instead of sample data.
Validate PDF Template
Validates draft template content against the template type's schema without rendering it. Use this to surface unknown variables, unbalanced sections, and non-blocking warnings before saving.
List PDF Template Versions
Returns the change history for a template, newest first, as a paginated list. Each version captures the content at that point plus who changed it and why.
Get PDF Template Version
Returns a single template version by ID, including its full content snapshot.
Restore PDF Template Version
Restores a prior template version, replacing the template's current content with that version's snapshot and recording the previous content as a new version.
List Store Overrides
Returns every store-specific override for a given template type. A store override is a copy of the global template that a single store can customize independently.
Create Store Override
Creates a store-specific override from a global template. The override starts with the global template's content and can then be edited independently for that store.
Delete Store Override
Deletes a store-specific override. That store reverts to the global template of the same type.
List Template Assets
Returns every uploaded image asset available to templates. Reference an asset inside template content with its `token` (for example `{{{asset.company_logo}}}`), which renders as an inline image in the PDF.
Upload Template Asset
Uploads a new image asset for use in templates. Send the request as multipart/form-data.
Get Template Asset Usage
Reports which templates still reference an image asset's `{{{asset.<slug>}}}` token.
Delete Template Asset
Deletes an uploaded image asset and its file.