Rechnung als Vorschau rendern
preview_invoiceRender an Austrian invoice as a watermarked preview. Works without a facturo account; with a connected account the preview is an Entwurf the user also sees at facturo.at, nothing is numbered or sent. The user sees the preview as a card in the chat after each call. A new draft needs client.name (or client_id with a connected account) and at least one item; later calls pass draft_id plus only the fields that change. Returns the draft_id, the totals, the review_hash that finalize_invoice needs, and 'missing': what the real invoice still needs. It works with only a client name and one position.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "preview_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | ||
| client | No | The invoice recipient. The name is required for the first preview of a draft; the real invoice needs the address. | |
| issuer | No | The sender (the user's own business). Everything is optional for a preview; missing mandatory fields render as placeholders and are listed under 'missing'. With a connected account the profile there wins; only an account without a company profile yet takes these fields. | |
| draft_id | No | Id of a draft from an earlier preview_invoice result. Pass it to change that draft instead of starting a new one: client and issuer merge field by field, every other field given replaces the old value, items replace the whole list. | |
| due_date | No | YYYY-MM-DD; default invoice_date + payment_days | |
| fusstext | No | Text below the totals; default: the account's standard text. A 'bereits bezahlt' remark goes here as 'Der Rechnungsbetrag wurde bereits bezahlt.' | |
| kopftext | No | Text above the items; default: the account's standard text | |
| vat_rate | No | VAT rate in percent (10 and 13 are the reduced Austrian rates). Omit to inherit: the client's last invoice's rate, else 20. | |
| client_id | No | Id of an existing client of the connected facturo account (from search_clients). Use it instead of 'client' whenever the client exists; needs a connected account. | |
| invoice_date | No | YYYY-MM-DD, default today | |
| invoice_type | No | 'honorarnote' for freelancers/Freiberufler who bill a Honorar; default 'normal' | |
| payment_days | No | Zahlungsziel in days, default 14; ignored when due_date is given | |
| discount_type | No | Gesamtrabatt on the whole document, deducted as its own line below the items (VAT is computed on the reduced amount). 'percentage' = discount_value is a percent of the net item total, 'fixed' = discount_value is an EUR amount (in the draft's price mode). Requires discount_value. Set it when the user grants a discount/Nachlass/Aktionscode on the whole invoice or offer; never bill a discount as a negative item. 'none' clears a discount set earlier. Not available on an Anzahlungsrechnung (the deposit share replaces it); a Storno inherits the cancelled invoice's discount automatically. | |
| discount_value | No | Decimal as string: the percent ('25') or EUR amount ('100') per discount_type. Must be above 0, a percentage at most 100. | |
| invoice_number | No | Only without a connected account: the user's own invoice number, the next one in their sequence (e.g. '2026-014'). Ask the user for it, never invent one. A connected account numbers automatically. | |
| reference_lines | No | Extra reference lines in the header, e.g. 'Projekt: Dach Huber' | |
| prices_include_vat | No | Unit prices are gross (Brutto) amounts. Omit to inherit from the client's last invoice, else false. | |
| service_period_end | No | YYYY-MM-DD, Leistungszeitraum end | |
| vat_exemption_type | No | Omit unless the user named one: a connected preview then picks the account's treatment (Kleinunternehmer setting, the client's last invoice, the account's usual mode, else 20%) and reports it. '' forces regular VAT. 'small_business' = Kleinunternehmer (no VAT, §6 Abs 1 Z 27 UStG), 'construction' = Reverse Charge Bauleistungen (§19 Abs 1a), 'eu_service' / 'eu_goods' = innergemeinschaftlich, 'healthcare' = §6 Abs 1 Z 19. | |
| discount_description | No | Label printed on the discount line, e.g. 'Rabatt' (default), 'Rabatt Aktionscode START25', 'Treuebonus'. The percentage or amount is printed next to it automatically, so leave it out of the label. | |
| service_period_start | No | YYYY-MM-DD, Leistungszeitraum start; default invoice_date |