curatedapi

XRechnung validator API

An API that checks an XRechnung 3.0 invoice the way KoSIT's validator does, and names every rule that failed.

Free plan: 1,000 calls a month, no card needed. Paid plans start at $9 or €9. Test keys are never billed.

POST /v1/validate/einvoice/xrechnungRequest
jq -Rs '{xml: .}' xrechnung-01.01a-invoice-ubl.xml |
  curl https://api.curatedapi.com/v1/validate/einvoice/xrechnung \
    -H "Authorization: Bearer YOUR_CURATEDAPI_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @-
200 OKResponse, shortened
{
  "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
      },
      "… 2 more"
    ],
    "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
  }
}
An official sample (xrechnung-01.01a-invoice-ubl.xml)

Germany has required businesses to accept e-invoices since 2025. From January 2027, companies with more than €800,000 turnover in the previous year must send them, and all others from January 2028. This API checks a document against XRechnung 3.0. It does not choose which format a buyer requires.

KoSIT's validator configuration runs unchanged. The document's type and specification ID choose the scenario, then the UBL or CII schema, the EN 16931 rules and the XRechnung rules (BR-DE) run. Valid means no error, which is KoSIT's decision.

An invoice that is not valid is still a successful call: HTTP 200, with valid set to false, because the check ran. Only a request the endpoint cannot use is an error. The invoice is not stored, logged or echoed back. The answer holds only the findings.

What you get

  • KoSIT's validator configuration for XRechnung, pinned to a published release
  • UBL and UN/CEFACT CII
  • Every finding with the rule ID, its level and the rule owner's message
  • The same key works for the REST API and the MCP server
  • Published sample invoices are checked before release and on the live API every five minutes

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.

Endpoints

Each one is a POST and an MCP tool. Its page shows the inputs, an example and the sources it is checked against.

On this site

FAQ

Common questions

What does the XRechnung validator check?

It runs KoSIT's validator configuration for XRechnung 3.0. The document's type and specification ID choose the scenario, then the UBL or CII schema, the EN 16931 rules and the XRechnung rules (BR-DE) run, with KoSIT's custom levels. Valid means no error.

Does an invalid invoice come back as an error?

No. An invoice that is not valid is HTTP 200 with valid set to false, because the check ran. Only a request the endpoint cannot use, such as a body with no XML, is an error. Errors are not billed. A check that runs is billed, including when the invoice is not valid.

Is the invoice stored?

No. The invoice is not stored, logged or echoed back. The answer holds only the findings.

When do German businesses have to send e-invoices?

Germany has required businesses to accept e-invoices since 2025. From January 2027, companies with more than €800,000 turnover in the previous year must send them, and all others from January 2028.

How many calls does one invoice check use?

One check counts as 5 calls, on the REST API and on the MCP server. The free plan includes 1,000 calls a month, which covers 200 checks. A live key is billed when the check runs, including when the invoice is not valid.

What does the free plan include?

The free plan includes 1,000 calls a month and needs no card. Paid plans start at $9 a month or €9 a month. Failed calls, test keys and a retry that sends the same idempotency key are not billed.

Start on the free plan

1,000 calls a month, no card needed. Paid plans start at $9 or €9. Same key for the REST API and the MCP server.