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 1. Examples use placeholders and do not call production.
letter_preview
read-onlyscope: order:sendPreview letter and draft as images, render form preview: composes 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 stays free of charge and the letter stays put. Use letterId or inline content OR blocks. An unsaved design may be supplied directly and applies to this one preview only. IMPORTANT FOR FORMS: always preview self-declarations, questionnaires, certificates and other standalone forms first with design: { "schemaVersion": 1, "documentMode": "form" }; that is what drops recipient block, date and subject and starts content at 27 mm. Full reference: frankki://blocks-guide. For a rebuild, compare every PNG page against the original. If page count or major geometry differs, correct blocks or design and preview again; save once both match. Once matched, save with template_save, then use template_release.
Input contract
| Field | Type | Requirement | Meaning |
|---|---|---|---|
letterId | string | optional | Preview a stored draft. Alternatively provide the letter inline. |
subject | string | optional | Subject. Required without a letterId. |
content | string | optional | letter body as plain text. Either content OR blocks, never both. |
blocks | array<object | object | object | object | object | object | object | object | object | object | object | object> | optional | structured letter content as typed blocks (alternative to content, never both). |
styleDefs | object | optional | named document styles (max 24); blocks reference them via style. |
language | de | en | optional | |
designId | string | optional | Use a 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. Set documentMode: "form" for standalone forms. |
reference | object | optional | Per-letter values (Vorgangsnummer, your reference, 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 always contains every page. |
resolution | thumb | full | optional | thumb (96 dpi, default, fast and small) or full (150 dpi, for checking details). |
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.