Invoice Validate
invoice_validateValidates ZUGFeRD 2.x or XRechnung 3.x invoice XML against EN 16931 and German KoSIT rules, returning errors and warnings. Auto-detects profile and syntax for structured compliance reports.
Instructions
Validate a ZUGFeRD 2.x or XRechnung 3.x invoice XML.
Checks against EN 16931 rules and German KoSIT Schematron rules (BR-DE-* business rules). Returns a structured validation report with errors and warnings. Supports all ZUGFeRD profiles (MINIMUM through EXTENDED) and XRechnung (CII and UBL syntax). Profile and syntax are auto-detected if not specified. By default this validator runs entirely locally (Schematron only). Set cloud_validate=True (or EINVOICING_DE_KOSIT_ENABLE=1) to opt in to sending the invoice XML to a remote KoSIT endpoint. Doing so egresses the full invoice payload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strict | No | If True, warnings are also reported. If False, only errors are returned. | |
| syntax | No | Override syntax detection. One of: CII, UBL. If omitted, auto-detected from the XML root element namespace. | |
| profile | No | Override profile detection. One of: MINIMUM, BASIC_WL, BASIC, EN_16931, EXTENDED, XRECHNUNG. If omitted, auto-detected from the XML GuidelineID. | |
| xml_base64 | No | Base64-encoded XML bytes of the invoice. | |
| xml_content | No | Raw XML string of the invoice to validate. Provide either xml_content or xml_base64, not both. | |
| kosit_strict | No | If True, fail hard when the KoSIT cloud validator is unreachable instead of falling back to local Schematron. | |
| cloud_validate | No | Opt in to sending the invoice XML to a remote KoSIT endpoint (egresses the full invoice payload). Local Schematron only by default. | |
| use_local_only | No | [Deprecated] Use cloud_validate instead. use_local_only=True is equivalent to cloud_validate=False, which is now the default; this alias is retained for one release and will be removed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||