Zum Inhalt springen
FrankKi
Sign inStart freeiOS Download

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

Preview 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

FieldTypeRequirementMeaning
letterIdstringoptionalPreview a stored draft. Alternatively provide the letter inline.
subjectstringoptionalSubject. Required without a letterId.
contentstringoptionalletter body as plain text. Either content OR blocks, never both.
blocksarray<object | object | object | object | object | object | object | object | object | object | object | object>optionalstructured letter content as typed blocks (alternative to content, never both).
styleDefsobjectoptionalnamed document styles (max 24); blocks reference them via style.
languagede | enoptional
designIdstringoptionalUse a saved letter design for this preview.
designobjectoptionalUnsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Set documentMode: "form" for standalone forms.
referenceobjectoptionalPer-letter values (Vorgangsnummer, your reference, 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 always contains every page.
resolutionthumb | fulloptionalthumb (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.