Dedicated tool guide
letter_preview
Render a stored or inline letter as page images and a complete PDF for human inspection.
Generated contract: apiVersion v1, schemaRevision 2. Examples use placeholders and do not call production.
letter_preview
read-onlyscope: order:sendRenders a letter, draft or form as images, composed like a real send, and returns inline PNGs, PDF link, page count, cost and designRender with the actual documentMode, rendered letter chrome and bodyStartMm. The preview is free and the letter stays put. The letter comes via letterId, a released template (templateId, templateVersionId, templateMergeValues) or inline content OR blocks; the recipient via recipientAddressId or the recipient fields. With letterId, the embedded card is the human preview; the PDF link and letter text are also in the result, for text-only views. An unsaved design applies to this one preview only. Standalone forms (self-declaration, questionnaire, certificate) render as a form with design: { "schemaVersion": 1, "documentMode": "form" }: that drops recipient block, date and subject and starts content at 27 mm. Schema reference: frankki://blocks-guide. For a rebuild of an original, the PNGs show page by page whether page count and major geometry match; changed blocks or a changed design render again on the next letter_preview call. template_save stores the matching layout as a draft, template_release releases it.
Input contract
| Field | Type | Requirement | Meaning |
|---|---|---|---|
letterId | string | optional | Stored draft to preview. The letter can come inline instead. |
subject | string | optional | Subject. Required without a letterId. |
content | string | optional | Letter body as plain text. Exactly one of content and blocks. |
blocks | array<object | object | object | object | object | object | object | object | object | object | object | object> | optional | Structured letter content as typed blocks, in place of content. Limits: 200 blocks, 100 rows per table, 20 columns, 2000 characters per cell, 10 images, 262144 bytes. |
styleDefs | object | optional | Named document styles (max 24); blocks reference them via style. |
language | de | en | optional | |
designId | string | optional | Saved letter design for this preview. |
design | object | optional | Unsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Standalone forms render with documentMode: "form". |
reference | object | optional | Per-letter values (Vorgangsnummer, Ihr Zeichen, customer number, QR parameters ...). They fill the info block and barcode in the preview. |
senderProfileId | string | optional | |
pages | integer | optional | How many pages come back as images. Default 3, maximum 8. The PDF link contains every page. |
resolution | thumb | full | optional | thumb (96 dpi, default, fast and small) or full (150 dpi, for checking details). |
templateId | string | optional | |
templateVersionId | string | optional | Released template version, with templateId and templateMergeValues: shows exactly the letter order_send would send with them. |
templateMergeValues | object | optional | |
recipientAddressId | string | optional | Recipient from the address book. Alternatively the recipient fields; if both are missing, a sample recipient fills the window. |
recipientName | string | optional | |
recipientCompany | string | optional | |
recipientStreet | string | optional | |
recipientHouseNumber | string | optional | |
recipientZip | string | optional | |
recipientCity | string | optional | |
recipientCountry | string | optional | ISO 3166-1 alpha-2, defaults to DE. |
Contract-shaped example
letter_preview({
"letterId": "LETTER_ID_FROM_DRAFT",
"pages": 8,
"resolution": "full"
})Inspect every rendered page. If the draft is correct, call shipping_quote immediately before submission.
For conditional fields and nested object limits, the generated complete tool reference remains authoritative. See errors and safe agent onboarding before implementing retries or a live send.
Trust and live status
Machine-readable service facts and the current operational status of the partner interface are publicly available at all times, no login needed.