Templates

Renders (possibly unsaved) editor sections through the real production pipeline — sample data, regional compliance blocks, QuestPDF — and returns one PNG per page. More than one page on a fixed-size label format means the content overflows the label.

Changed on
post/templates/render-preview

Request

Request body

formatstring nullable

Physical output format, e.g. "bottle-label". Null falls back to the default.

typestring nullable

Template type, e.g. "labels". For labels the preview includes the region-mandated compliance blocks appended at print time.

categorystring nullable

Client-message category; scopes which tokens get sample values.

emailSubjectstring nullable
emailBodystring nullable
smsBodystring nullable

Response

OK

pagesstring[]

Base64-encoded PNG per rendered page.

emailSubjectstring nullable

Client-message previews only: the subject with sample data substituted.

emailBodystring nullable

Client-message previews only: the email body with sample data substituted.

smsBodystring nullable

Client-message previews only: the SMS body with sample data substituted.

unknownVariablesstring[] nullable

Client-message previews only: tokens left as written because they aren't merge fields for the category. Null when there are none.

Changes

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: text/json)

    • info

      added the new optional request property (media type: application/*+json)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: text/json)

    • info

      added the new optional request property (media type: application/*+json)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: text/json)

    • info

      added the new optional request property (media type: application/*+json)

    • info

      added the new optional request property (media type: application/json)

    • info

      added the new optional request property (media type: text/json)

    • info

      added the new optional request property (media type: application/*+json)

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)

    • info

      added the optional property to the response with the status (media type: text/plain)

    • info

      added the optional property to the response with the status (media type: application/json)

    • info

      added the optional property to the response with the status (media type: text/json)