Core APIFree

Validator API

Validate e-invoices against official KoSIT schemas and Schematron rules. Get detailed error messages with correction suggestions.

POST/api/v1/invoice/{countryCode}/validate
Validation is free!

Validating 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

bash
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.xml

Alternative: JSON Wrapper

bash
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

bash
1# Datei-Upload mit multipart/form-data
2curl -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

DE

Germany

AT

Austria

CH

Switzerland

FR

France

IT

Italy

ES

Spain

NL

Netherlands

BE

Belgium

Q2.2026
PT

Portugal

Q2.2026
PL

Poland

Q2.2026
CZ

Czech Republic

Q2.2026
HU

Hungary

Q2.2026
RO

Romania

Q2.2026
BG

Bulgaria

= Available | Q2.2026 = Planned

Germany

/api/v1/invoice/DE/validate

Austria

/api/v1/invoice/AT/validate

France

/api/v1/invoice/FR/validate

Italy

/api/v1/invoice/IT/validate

Switzerland

/api/v1/invoice/CH/validate

Spain

/api/v1/invoice/ES/validate

Request Parameters

Path Parameter

ParameterTypeRequiredDescription
countryCodestringISO 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

ParameterTypeRequiredDescription
AuthorizationheaderBearer token with sk_test_* or sk_live_* API key
Content-Typeheaderapplication/xml, application/json, or multipart/form-data
xml / filestring / 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 OK
json
1{
2 "valid": true,
3 "errors": [],
4 "warnings": []
5}

Invalid Invoice

200 OK
json
1{
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

400 Bad Request
json
1{
2 "error": "BAD_REQUEST",
3 "message": "Invalid XML format or malformed request body"
4}
401 Unauthorized
json
1{
2 "error": "UNAUTHORIZED",
3 "message": "Invalid or missing API key"
4}
403 Forbidden
json
1{
2 "error": "FORBIDDEN",
3 "message": "Your API key does not have permission for this operation"
4}
500 Internal Server Error
json
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

FieldTypeDescription
codestringError code (e.g. BR-DE-01, BR-16)
messagestringHuman-readable error description
fieldstring (optional)XPath or field name where the error occurred

Supported Formats

FormatSchemaSchematron
XRechnung 3.0.2EN16931 CII/UBLKoSIT 1.9.1
XRechnung 2.3EN16931 CII/UBLKoSIT 1.8.2
ZUGFeRD 2.1.1EN16931 CIIZUGFeRD 2.1
ZUGFeRD 2.0.1EN16931 CIIZUGFeRD 2.0
Factur-X 1.0EN16931 CIIFactur-X 1.0
UBL 2.1OASIS UBL 2.1EN16931 UBL

Common Validation Errors

BR-DE-01

An invoice must contain a Leitweg-ID

Solution: Add buyer.leitweg in the request

BR-DE-15

Seller country code is missing

Solution: Ensure seller.address.country is set

BR-DE-17

Seller VAT ID or tax number is missing

Solution: Set seller.vatId or seller.taxNumber

BR-16

Invoice total does not match line items

Solution: Check the calculation: net + VAT = gross

BR-CO-10

Sum 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