Document AI — DMS

Preview Document Template

Render a template with variables (or its stored sample data) to a watermarked PDF (pdf_base64, max 8 MB) or to HTML (output=html) without storing a document and without the per-document price. Returns missing variables, unknown helpers...

post/document_generation/template-preview

Request

  • Base URL: https://api.paperoffice.ai/latest
  • URL: https://api.paperoffice.ai/latest/document_generation/template-preview
  • Auth: HTTP bearer

Request body

template_idstring

Stored template to preview.

template_versioninteger

Version to preview (default: current).

variablesobject

Variables to render; omit to use the stored sample_data.

localestring

Locale for numbers, dates and currency (e.g. de_DE, en_GB).

output'pdf' | 'html'

Preview format.

html_contentstring

Inline template instead of template_id.

Response

Success

status'success' required
_billingobject

Changes

No recorded changes to this operation across all 1 revision of this API.