Zum Inhalt springen
FrankKi
Sign inStart freeiOS Download

Dedicated tool guide

approval_submit and approval_decide

Submit an exact letter for review, then record an authorized human approve or reject decision.

Generated contract: apiVersion v1, schemaRevision 1. Examples use placeholders and do not call production.

approval_submit

actionscope: order:send

Submits a letter for human approval instead of sending it right away: checks mandatory details, recipient, AVV and limits, creates the final PDF, calculates the price, reserves the cost and adds an approval to the queue. The send only happens once the returned approvalId is approved via approval_decide. With dryRun it stops at the check: balance and queue stay untouched.

Input contract

FieldTypeRequirementMeaning
letterIdstringoptionalExisting draft. Alternatively provide the letter inline.
subjectstringoptional
contentstringoptional
recipientNamestringoptional
recipientCompanystringoptional
recipientStreetstringoptional
recipientHouseNumberstringoptional
recipientZipstringoptional
recipientCitystringoptional
recipientCountrystringoptionalISO 3166-1 alpha-2, defaults to DE.
deliveryTypestandard | einschreiben_einwurf | einschreiben_uebergabeoptionalDefaults to standard.
expressbooleanoptional
colorbooleanoptionalIf omitted, colour is detected automatically.
includeSignaturebooleanoptional
signatureIdstringoptional
senderAddressIdstringoptional
senderProfileIdstringoptional
mandantennummerstringoptional
clientOrderIdstringoptionalIdempotency key. A repeat call with the same value returns the same approval instead of submitting a second time. The 'approval:' prefix is reserved.
scheduledAtstringoptional
approvalModeauto | draft | reviewoptional
maxCostEurosnumberoptionalMaximum amount in euros. If the price is above it, the call is aborted.
presetNamestringoptional
auditTagstringoptional
templateIdstringoptional
reasonstringoptionalShort reason for the approval, shown to the reviewer on the card.
requesterContextstringoptionalAdditional context about the submitter or the occasion.
dryRunbooleanoptional

approval_decide

actionscope: approval:decide

Approves or rejects a pending approval on the human's behalf. IMPORTANT: before calling 'approve' here you MUST show the human (a) the preview link (previewUrl) of the letter, (b) the exact total price in euros and (c) the delivery type (e.g. registered mail hand delivery or standard) and obtain their explicit consent; then set user_saw_preview:true. A chat approval dispatches after a 10-minute grace window: the letter goes out then and can be stopped until it does (if the human says 'stop', call order_cancel). On rejection the letter stays a draft and the reservation is refunded.

Input contract

FieldTypeRequirementMeaning
approvalIdstringrequired
decisionapprove | rejectrequired
commentstringoptional
user_saw_previewbooleanoptionalConfirmation that you showed the human the preview PDF, the exact price and the delivery type and obtained consent. Required to approve.
clientOrderIdstringoptional

Contract-shaped example

approval_submit({
  "letterId": "REVIEWED_LETTER_ID",
  "recipientName": "Max Mustermann",
  "recipientStreet": "Musterstrasse",
  "recipientHouseNumber": "1",
  "recipientZip": "10115",
  "recipientCity": "Berlin",
  "clientOrderId": "contract-482-approval-v1",
  "maxCostEuros": 10,
  "reason": "Reviewed contract notice"
})

approval_decide({
  "approvalId": "APPROVAL_ID",
  "decision": "approve",
  "user_saw_preview": true,
  "clientOrderId": "contract-482-decision-v1"
})

Only set user_saw_preview:true after the authorized human saw the preview, exact price, and delivery type. A model statement is not human approval.

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.