XRechnung validator (KoSIT rules) API
Check an XRechnung 3.0 invoice the way German public buyers do, with KoSIT's official validator configuration.
POST https://api.curatedapi.com/v1/validate/einvoice/xrechnung
- Version 1
- MCP tool
validate_einvoice_xrechnung - Overview
Uses KoSIT's validator configuration for XRechnung unchanged: its scenarios choose the rules from the document's type and specification ID, then the UBL or CII schema, the EN 16931 rules and the XRechnung rules (BR-DE-…) run, with KoSIT's custom levels. The decision is KoSIT's: valid means no error.
- Checked against KoSIT's XRechnung test suite: every published test invoice is accepted.
Inputs
An invoice that breaks a rule still gets HTTP 200, with "valid": false and the findings (see e-invoice validation).
| Input | Type | Description |
|---|---|---|
xml required |
string | The invoice XML, as text. |
Result
Under result in the answer, next to validator and rules (the official artefacts used, with their versions).
| Result | Type | Description |
|---|---|---|
valid | boolean | true when the document matched a scenario and no check reported an error. |
scenario | ['string', 'null'] | Which set of rules applied, chosen from the document's own type and specification ID; null when none applies. |
document_type | ['string', 'null'] | UBL Invoice, UBL CreditNote or UN/CEFACT CII. |
specification_id | ['string', 'null'] | The CustomizationID (UBL) or guideline ID (CII), BT-24, as found. |
errors | integer | Messages at level error. |
warnings | integer | Messages at level warning. |
notices | integer | Messages at level information. |
error_rules | list of string | The distinct rules that reported an error, sorted. |
checks | list of object | Each check in the order it ran, and whether it passed (a schema failure skips the rules, as in KoSIT's validator). |
messages | list of object | Up to 500 findings. |
messages_truncated | boolean |
Examples
An official sample (xrechnung-01.01a-invoice-ubl.xml)
jq -Rs '{xml: .}' xrechnung-01.01a-invoice-ubl.xml |
curl https://api.curatedapi.com/v1/validate/einvoice/xrechnung \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @-
{
"validator": "einvoice/xrechnung@1",
"result": {
"valid": true,
"scenario": "EN16931 XRechnung (UBL Invoice)",
"document_type": "UBL Invoice",
"specification_id": "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0",
"errors": 0,
"warnings": 0,
"notices": 1,
"error_rules": [],
"checks": [
{
"check": "XML syntax",
"passed": true
},
{
"check": "XML Schema for UBL 2.1 Invoice",
"passed": true
},
{
"check": "Schematron rules for EN16931 (UBL)",
"passed": true
},
{
"check": "Schematron rules for Invoice - CIUS XRechnung (UBL)",
"passed": true
}
],
"messages": [
{
"rule": "BR-DE-TMP-32",
"level": "information",
"message": "[BR-DE-TMP-32] Eine Rechnung sollte zur Angabe des Liefer-/Leistungsdatums entweder BT-72 \"Actual delivery date\", BG-14 \"Invoicing period\" oder in jeder Rechnungsposition BG-26 \"Invoice line period\" enthalten.",
"check": "Schematron rules for Invoice - CIUS XRechnung (UBL)",
"location": "/Q{urn:oasis:names:specification:ubl:schema:xsd:Invoice-2}Invoice[1]"
}
],
"messages_truncated": false
},
"rules": [
{
"name": "KoSIT validator configuration for XRechnung 3.0.2",
"version": "2026-08-31",
"url": "https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/v2026-08-31/xrechnung-3.0.2-validator-configuration-2026-08-31.zip"
}
]
}
Rules used
- KoSIT validator configuration for XRechnung 3.0.2, version 2026-08-31
A check shows whether the invoice passes the official rule sets listed, at the versions listed. It is not legal or tax advice, and passing does not promise that a tax authority or buyer will accept the invoice. See the terms.
Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.