Validation
POST /v1/invoices/validate
Request
Send the document as the body with Content-Type: application/xml (or text/xml) or application/pdf, or as JSON:
{ "document": "<Invoice …>", "encoding": "utf8", "store": false }
Use "encoding": "base64" for PDFs inside JSON. Options can also be query parameters: ?store=false&async=true.
| Option | Default | Effect |
|---|---|---|
store |
organization setting | Keep the document (encrypted) for your retention period, so it appears in history and GET /v1/invoices/{id} |
async |
false |
Run as a background job; documents above 2 MB always run as jobs |
revocationCheck |
organization setting (on) | false: no OCSP / CRL request for the signing certificate of a Facturae file (see signing certificate trust) |
Send an Idempotency-Key header to make retries safe. See Error handling.
What runs
- Input safety checks (size, encoding, no DTD or entity declarations, depth and node limits).
- Format detection from the root element and the specification identifier (BT-24).
- The official KoSIT validator with the matching scenario:
- XML Schema of the syntax (UBL 2.1, UN/CEFACT CII D16B, the Factur-X profile schema, Facturae 3.2.x or KSeF FA(3))
- EN 16931 Schematron by CEN/TC 434
- XRechnung: the XRechnung 3.0.2 CIUS Schematron by KoSIT
- Peppol BIS Billing: the OpenPeppol 3.0.21 Schematron
- Factur-X / ZUGFeRD: the Schematron of the profile (Factur-X 1.09.2 / ZUGFeRD 2.5)
- Facturae: the calculation rules defined in the official schema (FAC-*)
- KSeF FA(3): the schema's occurrence limits (KSEF-XSD-MAXOCCURS)
- For ZUGFeRD / Factur-X PDFs: PDF/A-3b conformance with veraPDF (findings
PDFA-<clause>-<test>, steppdfa). - For signed Facturae files: the XAdES signature (FAC-S00..S04) and the trust in the signing certificate (FAC-SIG-*), below.
The verdict (valid / invalid) is the official assessment of that scenario, including the scenario's own severity overrides (XRechnung, for example, raises CII-SR-465 to an error and lowers BR-CO-16 to a warning in the Extension). Documents without an official scenario — an unknown specification identifier, XRechnung 2.x, ZUGFeRD 1.0 / 2.0, KSeF FA(2) — are returned as unsupported with the reason. They are never reported as valid.
Signing certificate trust (Facturae)
When a Facturae file is signed, the XAdES signature is verified cryptographically (every signed reference, the signature value, coverage of the whole invoice, the certificate's validity period at signing time: FAC-S00..S04). Then the signing certificate itself is checked:
- Trusted lists. The service keeps the EU List of Trusted Lists (LOTL,
https://ec.europa.eu/tools/lotl/eu-lotl.xml) and the Spanish trusted list it points to. The LOTL is accepted only with a valid signature by one of the LOTL-signing certificates the European Commission published in the Official Journal (OJ C/2026/1944, pinned in the code); the Spanish list only with a valid signature by a certificate the LOTL names for Spain. Both are refreshed once a day by a background job and stored; validations never fetch them. - Chain. From the signing certificate, through the certificates in
ds:KeyInfo(and, when an intermediate certificate is missing, the issuer certificate named in the certificate's Authority Information Access), to the certificate of a service on the Spanish list. - Service status at signing time. The service must be a certification service for qualified certificates (
CA/QC) whose status was granted at the signing time, taking the service history into account (before 1 July 2016 the statuses of Directive 1999/93/EC count as granted). Services listed only for website certificates do not count. The certificate must be qualified (QcCompliance in the certificate, or a qualifier of the list). - Revocation. The certificate authority is asked whether the signing certificate was revoked: OCSP at the address in the certificate, falling back to its CRL. Answers are verified (signed by the CA, by a responder the CA certified for OCSP, or by a responder on the trusted list) and reused for 10 minutes (CRLs up to their next update, at most an hour).
| Rule | Severity | Meaning |
|---|---|---|
FAC-SIG-TRUSTED |
info | Qualified certificate of a granted service, not revoked (or revocation check switched off) |
FAC-SIG-TRUST |
error | Not issued under a qualified certification service granted on the Spanish list at signing time. Warning when the service is listed but the certificate does not state it is qualified |
FAC-SIG-REVOKED |
error | Revoked before the signing time (or, without a signing time, before the check). Warning when revoked after the signing time stated in the file: that time is claimed by the signer, not time-stamped |
FAC-SIG-TRUST-UNKNOWN |
warning | Could not be checked: the trusted lists are not available, or neither OCSP nor the CRL gave a usable answer. Not a failure of the invoice |
These findings exist only for signed files. The signing time is the XAdES SigningTime in the file; without one, the time of the check is used. Not checked: the revocation of intermediate CA certificates, the Facturae signature policy identifier, and whether the signer may sign for the seller.
Privacy: an OCSP request sends the certificate's serial number and issuer to the certificate authority's server, which learns that a document signed with that certificate is being checked (a CRL download reveals nothing about the certificate). Organization owners and admins can switch remote revocation checks off (PATCH /app-api/settings with {"revocationChecks": false}); a single request can send revocationCheck=false. The trusted-list check still runs; coverage.notChecked then lists the revocation check. Self-hosted deployments can switch it off with REVOCATION_CHECKS=false, or the whole trust check with TRUST_LISTS=false. See privacy.
Findings
Each finding has:
| Field | Content |
|---|---|
severity |
error, warning or info (as defined by the rule set) |
ruleId |
Official id, e.g. BR-CO-16, BR-DE-15; XSD for schema errors; EINV-* for input checks |
message |
Official rule text, unchanged (XRechnung rules are German) |
explanation, suggestion |
Plain-language restatement and fix, in the requested language (English by default) |
location |
Readable path and line/column in your document |
businessTerms |
EN 16931 terms involved, e.g. BT-115 Amount due for payment |
source |
Rule set the finding comes from |
Explanations are deterministic and tied to the rule id. Look up any rule with GET /v1/rules/{id}.
Quality monitoring
GET /v1/monitoring?days=30 (and Dashboard → Quality monitoring) shows how many of your documents passed in the period and in the period before it, by day, by format, by API key (integration), the failing rules — marked isNew when they did not occur before — and the processing time. It is built from the format and the ids of failed rules recorded with each validation; no invoice content is kept for it. When failures jump, owners and admins get an e-mail and endpoints subscribed to quality.alert a webhook.
Integration health
GET /v1/integrations/health (and Dashboard → Integration health) rates each system that sends documents — every API key and every connection — as healthy, attention, failing or inactive, with the formats it sent, its results of the last 30 days, the last valid document and its CI checks, and concrete recommendations: review_frequent_errors, check_deprecated_format, add_regression_tests, review_tax_mapping, prepare_for_change (a rule change concerns it), inactive_integration, fix_connector. Each has a detail text and its values in vars. Only what reached this service is used.
Validation evidence
For a stored validation, GET /v1/invoices/{id}/evidence returns a signed record: the SHA-256 of the stored document, the detected format, the rule set versions, the time and the result (counts and the ids of failed rules). It holds no invoice content. Anyone who receives the record — an auditor, a customer — can check it with POST /public/evidence/verify without an API key; changing any field makes the check fail. In the dashboard the record is under the invoice as "Validation evidence (JSON)".
Language of explanations
Explanations and suggestions come in English by default. Send Accept-Language: de (or fr, es, it, pl, nl, pt), or add ?lang=de to the URL, to get them in that language. message always stays the official rule text as the rule set states it; for a translated response, messageTranslation adds an unofficial translation of it. Rule ids, business term ids and code values are never translated.
Billing
A validation counts as one document when the official validator ran (so valid or invalid). Input that fails safety checks or is unsupported is not billed. Test keys are never billed.
Limits of a technical check
A valid result means the document passed the listed rule sets. It does not establish legal validity, tax correctness, or acceptance by a particular recipient. coverage.notChecked lists what was not checked, for example PDF/A conformance of a ZUGFeRD container.
Incoming invoices
For invoices you receive, POST /v1/invoices/inbound runs this validation and, reported separately, checks for duplicates and against your purchase orders, and can write a report of what the supplier must change.
E-Invoicing API