Validator API
Validate e-invoices against official KoSIT schemas and Schematron rules. Get detailed error messages with correction suggestions.
/api/v1/invoice/{countryCode}/validateValidating e-invoices does not consume billing quota. You can validate as many invoices as you want without affecting your quota.
Free
Validation does not consume billing quota - unlimited usage
KoSIT-compliant
Official Schematron rules from KoSIT (Coordination Office for IT Standards)
14 Countries
Support for DE, [Q2.2026 AT, CH, FR, IT, ES, NL, BE, PT, PL, CZ, HU, RO, BG]
All Formats
XRechnung, ZUGFeRD, Factur-X and UBL are supported
Example
1curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/DE/validate \2 -H "Authorization: Bearer sk_live_abc123..." \3 -H "Content-Type: application/xml" \4 --data-binary @rechnung.xmlAlternative: JSON Wrapper
1# Beispiel für Österreich (AT)2curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/AT/validate \3 -H "Authorization: Bearer sk_live_abc123..." \4 -H "Content-Type: application/json" \5 -d '{6 "xml": "<?xml version=\"1.0\"?>\n<Invoice>...</Invoice>"7 }'Alternative: File Upload
1# Datei-Upload mit multipart/form-data2curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/DE/validate \3 -H "Authorization: Bearer sk_live_abc123..." \4 -H "Content-Type: multipart/form-data" \5 -F "file=@rechnung.xml"Supported Countries
The country code is specified as part of the URL: /api/v1/invoice/{countryCode}/validate
DEGermany
ATAustria
CHSwitzerland
FRFrance
ITItaly
ESSpain
NLNetherlands
BEBelgium
PTPortugal
PLPoland
CZCzech Republic
HUHungary
RORomania
BGBulgaria
= Available | Q2.2026 = Planned
Germany
/api/v1/invoice/DE/validateAustria
/api/v1/invoice/AT/validateFrance
/api/v1/invoice/FR/validateItaly
/api/v1/invoice/IT/validateSwitzerland
/api/v1/invoice/CH/validateSpain
/api/v1/invoice/ES/validateRequest Parameters
Path Parameter
| Parameter | Type | Required | Description |
|---|---|---|---|
countryCode | string | ISO 3166-1 alpha-2 country code. Available: DE, AT, CH, FR, IT, ES, NL, BE. Planned (Q2.2026): PT, PL, CZ, HU, RO, BG |
Headers & Body
| Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | header | Bearer token with sk_test_* or sk_live_* API key | |
Content-Type | header | application/xml, application/json, or multipart/form-data | |
xml / file | string / file (body) | The e-invoice to validate (XML directly, JSON field 'xml', or file upload as 'file') |
Authentication
Use your API key in the Authorization header: for test environment or for production.Bearer sk_test_... / Bearer sk_live_...
Response
Valid Invoice
200 OK1{2 "valid": true,3 "errors": [],4 "warnings": []5}Invalid Invoice
200 OK1{2 "valid": false,3 "errors": [4 {5 "code": "BR-DE-01",6 "message": "Eine Rechnung muss eine Leitweg-ID enthalten",7 "field": "/Invoice/AccountingCustomerParty/BuyerReference"8 },9 {10 "code": "BR-DE-15",11 "message": "Das Element 'Seller postal address country code' muss übermittelt werden",12 "field": "/Invoice/AccountingSupplierParty/Party/PostalAddress/Country"13 }14 ],15 "warnings": [16 {17 "code": "BR-DE-WARN-01",18 "message": "Empfehlung: Bankverbindung sollte angegeben werden",19 "field": "/Invoice/PaymentMeans"20 }21 ]22}Error Responses
1{2 "error": "BAD_REQUEST",3 "message": "Invalid XML format or malformed request body"4}1{2 "error": "UNAUTHORIZED",3 "message": "Invalid or missing API key"4}1{2 "error": "FORBIDDEN",3 "message": "Your API key does not have permission for this operation"4}1{2 "error": "INTERNAL_ERROR",3 "message": "An unexpected error occurred"4}Response Fields
valid
true / false
errors
Array of errors. Each error contains code, message and optionally field.
warnings
Array of warnings. Same schema as errors, but not critical issues.
Schema for Errors/Warnings
| Field | Type | Description |
|---|---|---|
code | string | Error code (e.g. BR-DE-01, BR-16) |
message | string | Human-readable error description |
field | string (optional) | XPath or field name where the error occurred |
Supported Formats
| Format | Schema | Schematron |
|---|---|---|
| XRechnung 3.0.2 | EN16931 CII/UBL | KoSIT 1.9.1 |
| XRechnung 2.3 | EN16931 CII/UBL | KoSIT 1.8.2 |
| ZUGFeRD 2.1.1 | EN16931 CII | ZUGFeRD 2.1 |
| ZUGFeRD 2.0.1 | EN16931 CII | ZUGFeRD 2.0 |
| Factur-X 1.0 | EN16931 CII | Factur-X 1.0 |
| UBL 2.1 | OASIS UBL 2.1 | EN16931 UBL |
Common Validation Errors
BR-DE-01An invoice must contain a Leitweg-ID
Solution: Add buyer.leitweg in the request
BR-DE-15Seller country code is missing
Solution: Ensure seller.address.country is set
BR-DE-17Seller VAT ID or tax number is missing
Solution: Set seller.vatId or seller.taxNumber
BR-16Invoice total does not match line items
Solution: Check the calculation: net + VAT = gross
BR-CO-10Sum of line item net amounts does not equal invoice net
Solution: Check the sum of all items[].quantity * items[].unitPrice
Full error list: Error Handling Documentation
Validation is completely free
Unlike Creator and Converter, the Validator API does not consume billing quota. You can validate as many invoices as you want without affecting your monthly quota. Perfect for CI/CD pipelines, automated tests and quality assurance.
Validation in Playground
You can also validate invoices directly in the browser - without an API key. Simply drag an XML file into the Playground and get instant validation results.
Go to Playground →