View input schema
{
"type": "object",
"properties": {
"pdf_base64": {
"type": "string",
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Optional: die visuelle Rechnungs-PDF, Base64-kodiert (max. 25 MB). In sie wird das CII-XML eingebettet. Alternativ 'upload_id' angeben. Ohne beides wird die Rechnung aus den Daten gesetzt. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf."
},
"upload_id": {
"type": "string",
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Höchstens eines von beiden angeben."
},
"logo_base64": {
"type": "string",
"contentEncoding": "base64",
"description": "Optionales Logo für die aus den Daten gesetzte Rechnung (nur ohne PDF): PNG, JPEG oder SVG, Base64-kodiert oder als data:-URI, max. 500 KB. Steht rechts oben im Kopf. SVG nur ohne Skripte und ohne Verweise auf andere Dateien."
},
"logo_mime": {
"type": "string",
"enum": [
"image/png",
"image/jpeg",
"image/svg+xml"
],
"description": "Optional; der Typ wird sonst aus dem Inhalt erkannt."
},
"lang": {
"type": "string",
"enum": [
"de",
"en"
],
"description": "Sprache der aus den Daten gesetzten Rechnung (Beschriftungen, Zahlen- und Datumsformat). Standard: de."
},
"invoice": {
"description": "Strukturierte Rechnungsdaten nach EN 16931 (wird gegen Schema und Geschäftsregeln geprüft).",
"type": "object",
"properties": {
"invoiceNumber": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"profile": {
"type": "string",
"enum": [
"en16931",
"xrechnung"
],
"default": "en16931"
},
"documentTypeCode": {
"type": "string",
"default": "380"
},
"precedingInvoiceNumber": {
"type": "string",
"maxLength": 60
},
"precedingInvoiceDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"issueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"dueDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deliveryDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"deliveryCountryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"delivery": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 200
},
"gln": {
"type": "string",
"maxLength": 20
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"city": {
"type": "string",
"maxLength": 100
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"currency": {
"type": "string",
"minLength": 3,
"maxLength": 3,
"default": "EUR"
},
"buyerReference": {
"type": "string",
"maxLength": 80
},
"costCenter": {
"type": "string",
"maxLength": 60
},
"purchaseOrderReference": {
"type": "string",
"maxLength": 60
},
"contractReference": {
"type": "string",
"maxLength": 200
},
"invoicingPeriod": {
"type": "object",
"properties": {
"start": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
"additionalProperties": false
},
"projectReference": {
"type": "string",
"maxLength": 200
},
"despatchAdviceRef": {
"type": "string",
"maxLength": 200
},
"receivingAdviceRef": {
"type": "string",
"maxLength": 200
},
"allowanceCharges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"charge": {
"type": "boolean",
"description": "true = Zuschlag (BG-21), false = Abzug/Nachlass (BG-20)."
},
"amount": {
"type": "number",
"minimum": 0,
"description": "BT-92/BT-99: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100)."
},
"basisAmount": {
"type": "number",
"description": "BT-93/BT-100: Grundbetrag des Prozentsatzes. Ohne Angabe die Summe der lineNetAmount aller Positionen mit ratePercent (bei gemischten Kategorien desselben Satzes nur die mit categoryCode)."
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "BT-94/BT-101: Prozentsatz, z. B. 2 für 2 % Nachlass."
},
"categoryCode": {
"type": "string",
"maxLength": 12,
"default": "S"
},
"ratePercent": {
"type": "number",
"description": "BT-96/BT-103: Steuersatz in Prozent. Darf beim Prozent-Eintrag ohne basisAmount fehlen, wenn alle Positionen denselben Satz haben."
},
"reason": {
"type": "string",
"maxLength": 200
},
"reasonCode": {
"type": "string",
"maxLength": 10
}
},
"required": [
"charge"
],
"additionalProperties": false
},
"maxItems": 50
},
"seller": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vatId": {
"type": "string",
"maxLength": 20
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60,
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht."
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"default": "DE"
}
},
"additionalProperties": false,
"default": {}
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 150
},
"email": {
"type": "string",
"maxLength": 150
},
"phone": {
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
},
"electronicAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scheme": {
"type": "string",
"maxLength": 10,
"default": "EM"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"customerAssignedId": {
"type": "string",
"maxLength": 100
}
},
"required": [
"name"
],
"additionalProperties": false
},
"buyer": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"vatId": {
"type": "string",
"maxLength": 20
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60,
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht."
},
"address": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"maxLength": 150
},
"line2": {
"type": "string",
"maxLength": 150
},
"city": {
"type": "string",
"maxLength": 100
},
"postalCode": {
"type": "string",
"maxLength": 20
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"default": "DE"
}
},
"additionalProperties": false,
"default": {}
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 150
},
"email": {
"type": "string",
"maxLength": 150
},
"phone": {
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false
},
"electronicAddress": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scheme": {
"type": "string",
"maxLength": 10,
"default": "EM"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"required": [
"name"
],
"additionalProperties": false
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 300
},
"quantity": {
"type": "number"
},
"unitCode": {
"type": "string",
"maxLength": 12,
"default": "C62"
},
"sellerArticleId": {
"type": "string",
"maxLength": 200
},
"buyerArticleId": {
"type": "string",
"maxLength": 200
},
"globalArticleId": {
"type": "string",
"maxLength": 60
},
"globalArticleScheme": {
"type": "string",
"maxLength": 10,
"pattern": "^[0-9A-Za-z]+$"
},
"unitPriceNet": {
"type": "number"
},
"vatRatePercent": {
"type": "number"
},
"categoryCode": {
"type": "string",
"maxLength": 12
},
"allowanceCharges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"charge": {
"type": "boolean",
"description": "true = Zuschlag (BG-28), false = Abzug/Rabatt (BG-27)."
},
"amount": {
"type": "number",
"minimum": 0,
"description": "BT-136/BT-141: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100)."
},
"basisAmount": {
"type": "number",
"description": "BT-137/BT-142: Grundbetrag des Prozentsatzes. Ohne Angabe Menge × unitPriceNet der Position (je Eintrag, nicht gestaffelt)."
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "BT-138/BT-143: Prozentsatz, z. B. 10 für 10 % Rabatt."
},
"reason": {
"type": "string",
"maxLength": 200
},
"reasonCode": {
"type": "string",
"maxLength": 10
}
},
"required": [
"charge"
],
"additionalProperties": false
},
"maxItems": 10
},
"lineNetAmount": {
"type": "number"
}
},
"required": [
"name",
"quantity",
"unitPriceNet",
"vatRatePercent",
"lineNetAmount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 500
},
"vatBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ratePercent": {
"type": "number"
},
"basisAmount": {
"type": "number"
},
"taxAmount": {
"type": "number"
},
"categoryCode": {
"type": "string",
"maxLength": 12,
"default": "S"
},
"exemptionReason": {
"type": "string",
"maxLength": 500
},
"exemptionReasonCode": {
"type": "string",
"maxLength": 30
}
},
"required": [
"ratePercent",
"basisAmount",
"taxAmount"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50
},
"totalNet": {
"type": "number"
},
"totalVat": {
"type": "number"
},
"totalGross": {
"type": "number"
},
"paidAmount": {
"type": "number",
"minimum": 0
},
"notes": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 1000
},
"subjectCode": {
"type": "string"
}
},
"required": [
"text"
],
"additionalProperties": false
}
]
},
"maxItems": 20
},
"taxCurrencyCode": {
"type": "string",
"minLength": 3,
"maxLength": 3
},
"totalVatInTaxCurrency": {
"type": "number"
},
"payee": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"gln": {
"type": "string",
"maxLength": 20
},
"registrationId": {
"type": "string",
"maxLength": 60
}
},
"required": [
"name"
],
"additionalProperties": false
},
"payment": {
"type": "object",
"properties": {
"terms": {
"type": "string",
"maxLength": 1000
},
"iban": {
"type": "string",
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$"
},
"bic": {
"type": "string",
"maxLength": 15,
"pattern": "^[A-Za-z0-9 ]*$"
},
"reference": {
"type": "string",
"maxLength": 140
},
"meansCode": {
"type": "string"
},
"mandateId": {
"type": "string",
"maxLength": 35
},
"creditorId": {
"type": "string",
"maxLength": 35
},
"debitedIban": {
"type": "string",
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$"
},
"accountName": {
"type": "string",
"maxLength": 200
},
"discountPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"discountDays": {
"type": "integer",
"minimum": 0,
"maximum": 999
}
},
"additionalProperties": false
}
},
"required": [
"invoiceNumber",
"issueDate",
"seller",
"buyer",
"lines",
"vatBreakdown",
"totalNet",
"totalVat",
"totalGross"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
},
"attachments": {
"type": "array",
"description": "Optionale Anhänge (z. B. Stundennachweise). Erlaubt: PDF, PNG, JPEG, CSV, XLSX, ODS, XML; je max. 10 MB.",
"items": {
"type": "object",
"properties": {
"filename": {
"type": "string"
},
"mime_type": {
"type": "string",
"description": "Optional; wird sonst aus der Dateiendung abgeleitet."
},
"description": {
"type": "string",
"description": "Optionale Beschreibung der rechnungsbegründenden Unterlage (BT-123), z. B. \"Stundennachweis März 2026\". Ohne Angabe steht dort der Dateiname."
},
"data_base64": {
"type": "string",
"contentEncoding": "base64",
"description": "Dateiinhalt, Base64-kodiert (max. 10 MB)."
},
"note": {
"type": "boolean",
"description": "Hinweis auf die Anlage im strukturierten Teil (Notiz BT-22, z. B. \"Eingebettete Anlage „stunden.pdf“: Stundennachweis März 2026.\"), wie ihn das BMF-Schreiben vom 15.10.2026 verlangt. Standard true; false lässt den Hinweis weg."
}
},
"required": [
"filename",
"data_base64"
],
"additionalProperties": false
}
},
"filename": {
"type": "string",
"description": "Dateiname der erzeugten Rechnung (Standard: invoice.pdf)."
}
},
"required": [
"invoice"
],
"additionalProperties": false
}