KoSIT validator API alternative
KoSIT publishes the validator configuration German public buyers use for XRechnung. You can run KoSIT's Java validator on that configuration yourself, or call it here. Both should reach KoSIT's decision. They do not share a process.
Free plan: 1,000 calls a month, no card needed. Paid plans start at $9 or €9. Test keys are never billed.
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 @-
{
"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
}
}
KoSIT's validator is a Java program. It reads a scenarios file, runs XML Schema and then Schematron with Saxon, and writes a report. The rules for XRechnung live in a separate download, the validator configuration. The configuration this API pins is XRechnung 3.0.2, release 2026-08-31, the zip xrechnung-3.0.2-validator-configuration-2026-08-31.zip. Every file in it is hashed, and a test refuses a file that differs.
This API does not shell out to that Java program. It loads the same scenarios.xml the way KoSIT's validator reads it, and runs the schemas and the compiled Schematron with Saxon-HE 12.10.0. The decision follows KoSIT's report stylesheet: a message's level comes from its flag (fatal or error, warning, information; anything else is an error), a scenario's customLevel replaces the level of the rules it names, Schematron runs only after the schema passes, and valid means a scenario matched and no message is an error.
KoSIT's configuration is the source of the decision either way. Hosting the check changes who compiles the stylesheets, who stores the invoice and who returns the findings. It does not replace KoSIT, and it does not add a rule KoSIT did not publish.
What you get
- KoSIT's XRechnung 3.0.2 configuration, release 2026-08-31, unchanged
- Saxon-HE 12.10.0, with Schematron skipped when the schema fails
- Every finding with the rule ID, KoSIT's level and the rule owner's message
- The invoice is not stored, logged or echoed back
- The same key works for the REST API and the MCP server
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.
Self-hosting KoSIT's validator, or calling the API
KoSIT's configuration is the input in both columns. The right-hand column is this API, not a second set of rules.
| KoSIT's Java validator, run by you | This API | |
|---|---|---|
| What runs | KoSIT's Java validator, with Saxon, pointed at the configuration's scenarios.xml. | The same scenarios.xml, schemas and compiled Schematron, run with Saxon-HE 12.10.0. The Java program is not started. |
| Configuration | The zip you download. XRechnung 3.0.2, release 2026-08-31, is the one pinned here. | That zip, file by file, with a hash per file. A weekly job warns when KoSIT's GitHub release differs. |
| The decision | KoSIT's: a matching scenario, schema first, custom levels, valid when there is no error. | The same rules, taken from KoSIT's report stylesheet. Byte-for-byte identical report XML is not claimed. |
| What you operate | A Java runtime, the validator, the configuration, a process in front of it, a size limit, and a release each time KoSIT publishes (about twice a year). | One POST. The stylesheets are compiled at worker start (about 3 seconds) and the rules take about 350 MB per validator worker. |
| The invoice | Yours to log or not. A log line that contains the XML keeps the customer's tax data. | Not stored, logged or echoed. The answer holds the findings. |
| A document that fails | The validator's report, which you turn into an API response. | HTTP 200, valid false, each finding with its rule ID, level and the rule owner's message. The check counts as 5 calls. |
Endpoints
Each one is a POST and an MCP tool. Its page shows the inputs, an example and the sources it is checked against.
Check an XRechnung 3.0 invoice the way German public buyers do, with KoSIT's official validator configuration.
/v1/validate/einvoice/xrechnung · validate_einvoice_xrechnung
Checked against 2 published cases
Turn an incoming XRechnung, ZUGFeRD / Factur-X or Peppol invoice into plain JSON, checked with the official rules in the same call.
/v1/validate/einvoice/read · validate_einvoice_read
Checked against 3 published cases
Send the invoice as JSON, get back an XRechnung 3.0 file that passes KoSIT's official validator.
/v1/create/einvoice/xrechnung · create_einvoice_xrechnung
Checked against 2 published cases
On this site
Common questions
Is this KoSIT's Java validator?
No. KoSIT's validator is the Java program you download and point at a scenarios file. This API runs the configuration that program reads, with Saxon-HE 12.10.0, and applies the same decision rules as KoSIT's report stylesheet. Reports are not claimed to be byte-for-byte the same XML the Java program prints.
Which release of the configuration runs?
XRechnung 3.0.2, KoSIT's validator configuration dated 2026-08-31. CEN's EN 16931 artefacts in the same run are 1.3.17, and Peppol BIS Billing, where that endpoint is used, is 3.0.22. Peppol's Schematron is compiled with SchXslt 1.10.1, the compiler KoSIT uses. A new KoSIT configuration shows up about twice a year; a weekly check compares the GitHub release and warns when it differs.
What do I take on if I run the Java validator myself?
A Java runtime, KoSIT's validator, and the configuration zip, pointed at its scenarios.xml. The validator and the configuration are versioned separately, so a new configuration is a release you download, re-test and ship. You also wrap the program in something that accepts an HTTP call, cap the body size, and decide what is logged. An invoice written to a log is your customer's tax data. Saxon compiles the stylesheets at startup and keeps them in memory.
What does running those rules cost on this service?
The stylesheets are compiled when a validator worker starts, about 3 seconds, and the rules take about 350 MB per worker, inside a 1024 MB limit. At 768 MB the engine ran out of room under load and the worker died. Those figures are Saxon-HE 12.10.0 as this service runs it, not a measurement of KoSIT's Java distribution. Two validator workers is the default.
How is the result checked against KoSIT?
Before every release the suite runs 1,818 unit tests from CEN and OpenPeppol, and every sample invoice CEN, OpenPeppol and KoSIT publish, including KoSIT's whole XRechnung test suite, all of which must be accepted. The live API is checked against the published cases every five minutes. A document with a DOCTYPE is refused before Saxon sees it.
Is an invalid invoice an error, and is it stored?
An invoice that is not valid is HTTP 200 with valid set to false, because the check ran, and that call is billed. Only a request the endpoint cannot use, such as a body with no XML, is an error, and errors are not billed. The invoice is not stored, logged or echoed back. The answer holds the findings, up to 500 messages.
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.