Create an e-invoice
create_einvoiceCreate a valid e-invoice from structured data: XRechnung 3.0 (UBL or CII), ZUGFeRD / Factur-X PDF (EN 16931) or Peppol BIS Billing 3.0. The file is checked with the official KoSIT validator before it is returned; if it fails, you get the rule errors instead of a file. XML comes back as text in xml, the ZUGFeRD PDF as base64 in pdf_base64. XRechnung needs a seller contact (contact, phone, email), a buyer email or Peppol ID (electronic address), a buyer_reference (Leitweg-ID for German authorities) and payment details (iban). Peppol needs peppol_id for seller and buyer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"number": "<number>",
"seller": "<seller>",
"buyer": "<buyer>",
"lines": "<lines>"
},
"name": "create_einvoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bic | No | ||
| iban | No | ||
| note | No | ||
| buyer | Yes | ||
| lines | Yes | ||
| format | No | xrechnung-ubl | |
| number | Yes | ||
| seller | Yes | ||
| currency | No | EUR | |
| due_date | No | YYYY-MM-DD, default issue + 14 days | |
| issue_date | No | YYYY-MM-DD, default today | |
| period_end | No | ||
| credit_note | No | ||
| paid_amount | No | Already paid (BT-113), e.g. down payments | |
| skonto_base | No | Optional base amount if Skonto applies to part of the amount due | |
| skonto_days | No | Early-payment discount (Skonto): days; written into BT-20 in the XRechnung format (BR-DE-18) | |
| period_start | No | ||
| delivery_date | No | YYYY-MM-DD delivery / service date (BT-72); default: issue date unless a period is given | |
| exempt_reason | No | BT-120 text for VAT-exempt (E) lines; default for DE/FR small businesses without VAT ID: § 19 UStG / art. 293 B CGI | |
| payment_terms | No | ||
| skonto_percent | No | Skonto percentage, e.g. 2 | |
| buyer_reference | No | ||
| order_reference | No | ||
| payment_reference | No | ||
| preceding_invoice | No | Original invoice number (credit notes) | |
| preceding_invoice_date | No | YYYY-MM-DD, date of the original invoice (BT-26; required for French sellers) |