Skip to content
FrankKi
Sign inStart freeiOS Download
Menu

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:send

Renders 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

FieldTypeRequirementMeaning
letterIdstringoptionalStored draft to preview. The letter can come inline instead.
subjectstringoptionalSubject. Required without a letterId.
contentstringoptionalLetter body as plain text. Exactly one of content and blocks.
blocksarray<object | object | object | object | object | object | object | object | object | object | object | object>optionalStructured 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.
styleDefsobjectoptionalNamed document styles (max 24); blocks reference them via style.
languagede | enoptional
designIdstringoptionalSaved letter design for this preview.
designobjectoptionalUnsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Standalone forms render with documentMode: "form".
referenceobjectoptionalPer-letter values (Vorgangsnummer, Ihr Zeichen, customer number, QR parameters ...). They fill the info block and barcode in the preview.
senderProfileIdstringoptional
pagesintegeroptionalHow many pages come back as images. Default 3, maximum 8. The PDF link contains every page.
resolutionthumb | fulloptionalthumb (96 dpi, default, fast and small) or full (150 dpi, for checking details).
templateIdstringoptional
templateVersionIdstringoptionalReleased template version, with templateId and templateMergeValues: shows exactly the letter order_send would send with them.
templateMergeValuesobjectoptional
recipientAddressIdstringoptionalRecipient from the address book. Alternatively the recipient fields; if both are missing, a sample recipient fills the window.
recipientNamestringoptional
recipientCompanystringoptional
recipientStreetstringoptional
recipientHouseNumberstringoptional
recipientZipstringoptional
recipientCitystringoptional
recipientCountrystringoptionalISO 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.