Developers · API v3 reference · OpenAPI 3.1.0 · v3.0.0
The engine the tool runs, as an API.
v3 repairs with the patch engine: targeted edits on your own document, never a rebuild, and every result is checked by the official validators. Same engine, validator set and loss guard as the web tool. No AI model is called, and the invoices you send are not stored.
A key, then your first call
A free key needs no account: sk_live_, 100 calls a month, shown once. Or a one-hour test key with 10 requests.
curl -s -X POST https://www.invoicenavigator.eu/api/developers/free-key \
-H "Content-Type: application/json" -d '{}' | jq -r .apiKey
# store it now — it is shown once; then:
export INVOICE_NAVIGATOR_KEY=sk_live_…curl -s -X POST https://www.invoicenavigator.eu/api/developers/instant-key | jq -r .apiKey
curl -s -X POST https://www.invoicenavigator.eu/api/v3/validate \
-H "Authorization: Bearer $INVOICE_NAVIGATOR_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile xml invoice.xml '{xml: $xml}')" \
| jq '.data | {valid, errors: [.findings[] | select(.severity == "error") | .ruleId]}'Every example on this page runs against our test suite with the public samples (XRechnung, Peppol) saved as invoice.xml. The curl examples need jq. The @invoicenavigator/sdk package covers v1/v2 only; call v3 over HTTP.
| Endpoint | Does | Key |
|---|---|---|
| Validate | ||
| POST /v3/validate | Official verdict with structured findings | any key |
| Fix | ||
| POST /v3/fix | Repair with the patch engine; answer open questions in the same call | any key |
| Convert | ||
| POST /v3/convert | Convert to another syntax / CIUS, with the verdict of the output | any key |
| Render | ||
| POST /v3/render | Complete human-readable rendering (every BT of the XML) | any key |
| Readiness | ||
| POST /v3/readiness | XRechnung 4.0 readiness: what changes in a 3.0.x invoice (one document or a batch of up to 20) | any key |
| Meta | ||
| GET /v3/health | Engine and validator status (no key) | no key |
| GET /v3/openapi.json | This document (no key) | no key |
Base URL https://www.invoicenavigator.eu/api/v3. Spec: openapi.json (OpenAPI 3.1.0); this page is generated from it.
Request, envelope, headers
JSON in, JSON out. The invoice goes in one of three fields: xml (the text), xmlBase64 (the file's bytes — use it when you read the invoice from a file; bytes that contradict their encoding get 422 XML_ENCODING_CONFLICT with the byte offset) or pdfBase64 (a ZUGFeRD / Factur-X / XRechnung hybrid PDF; the embedded XML is taken out byte for byte, no OCR). The whole request may be at most 4.5 MB — about 4 MB of XML, or about 3 MB of file as base64; a larger request is refused by the hosting platform with a plain-text 413. DOCTYPE and ENTITY declarations are refused.
{ "success": true, "data": { … }, "meta": { "processingTimeMs": 812, "testMode": true /* sk_test_ keys only */ } }
{ "success": false, "error": { "code": "MISSING_INPUT", "message": "…", "details": { … } } }| Header | On | Meaning |
|---|---|---|
| X-Request-Id | every response | Identifier of this call. Log it; quote it when you write to us. |
| X-Processing-Time-Ms | every response | Server time spent on the call, in milliseconds. |
| X-RateLimit-Limit | every authenticated response | Requests allowed per sliding hour for this key. |
| X-RateLimit-Remaining | every authenticated response | Requests left in the current hour. |
| X-RateLimit-Reset | every authenticated response | Unix seconds at which the window resets. |
| Retry-After | 429 only | Seconds to wait before the next attempt. |
| X-Test-Mode | sk_test_ keys only | Set to "true"; the body carries meta.testMode as well. |
| X-Usage-Used | metered live responses | Requests counted this month, after this call. |
| X-Usage-Included | metered live responses | Requests included in the plan for the month. |
| X-Usage-Overage | metered live responses | Requests beyond the included amount (0 while quotas are hard caps). |
| X-Usage-Period-End | metered live responses | Date the month counter resets. |
Handle errors by error.code. Retry 429 after Retry-After, 503 ORACLE_UNAVAILABLE after Retry-After (60 s) and 500 with backoff; the other 4xx fail the same way again. Validation findings are not HTTP errors.
Per key
| Key | Per hour | Per month | How you get it |
|---|---|---|---|
Free key sk_live_ | 60 | 100 | POST /api/developers/free-key, no account; at most 3 keys per IP address per 24 h |
Developer plan sk_live_ | 100 | 5,000 | €49/month excl. VAT on the same key: /developers/upgrade or POST /api/developers/plan/checkout |
Instant test key sk_test_ | 100 | 10 in total, 1 hour | POST /api/developers/instant-key, no account; at most 10 keys per IP address per 24 h |
Account test key sk_test_ | 100 | not metered | created next to the live key of a signed-up account (Dashboard → API) |
The hour is a sliding hour, per key; 429 RATE_LIMITED with Retry-After. Free key and Developer plan: a call counts when the API answered it (2xx or 422); 4xx other than 422, 429 and 5xx do not count. A readiness batch counts one call per document and is refused whole (402) if it would cross the month. The counter resets on the 1st, 00:00 UTC. Instant test key: every authenticated request counts towards its 10. Keys created before 10 Nov 2026 keep the quota of their plan. Time limit per call: validate, fix and convert 300 s; render and readiness 60 s — set your client timeout above that. Your counter: the X-Usage-Used / X-Usage-Included headers, or GET /v1/usage.
POST /v3/validate
Official verdict with structured findings. Key: Authorization: Bearer sk_….
Runs the official validator set for the detected format (XSD, CEN EN 16931 schematron, KoSIT for XRechnung, Peppol and EN 16931) and returns each finding with the business terms it names, its location, the validator's message, German text where we have it, and the action that resolves it. An invoice that fails its rules is still 200; read data.valid.
{
"ruleId": "BR-DE-15",
"severity": "error",
"oracle": "xrechnung-cius-3.0-ubl",
"bt": ["BT-10"],
"xpath": "…",
"message": { "en": "[BR-DE-15] … (BT-10) …", "de": "…" },
"plain": { "en": "German invoices must include a buyer reference (Leitweg-ID for public buyers).", "de": "…" },
"action": { "kind": "ask", "fields": [{ "id": "buyer_reference", "label": { "en": "Buyer reference", "de": "…" }, "xpath": "Invoice/cbc:BuyerReference", … }] }
}data.lineArithmetic[]: line amounts that don't add up — quantity × net price ≠ line amount, or net price ≠ gross price − discount — with the line, expected and actual. The official CEN check does not test line arithmetic, so an invoice can pass it with these. They also appear in findings as warnings; they never change valid and never count as errors. Peppol BIS and XRechnung UBL test the same relations themselves (PEPPOL-EN16931-R120 / R046, fatal; XRechnung CII only R046): for those documents you get the official error instead, not a second warning.
| 200 · data.* | Type | Meaning |
|---|---|---|
| valid | boolean | |
| syntax | "UBL" | "CII" | null | |
| verdict | Verdict | |
| counts | object | |
| findings | Finding[] | Official findings, plus line-arithmetic warnings (oracle "invoice-navigator-line-arithmetic"; see lineArithmetic) |
| lineArithmetic | LineArithmeticWarning[] | Line amounts that don't add up, for documents judged by the CEN EN 16931 rules alone (generic EN 16931, Factur-X/ZUGFeRD), which do not test line arithmetic. Warnings only — they never change `valid` and never count as errors. Peppol BIS and XRechnung UBL test the same relations themselves (PEPPOL-EN16931-R120 / R046, fatal; XRechnung CII R046 only): there you get that official error in `findings` and no duplicate here. |
| actions | object[] | Deduped actions for all error codes |
| sha256 | string | |
| source | PdfSource |
| Status | When, and the error codes |
|---|---|
| 200 | Verdict (an invalid invoice is still 200; see data.valid) |
| 400 | Bad request: INVALID_JSON, INVALID_UTF8 (body not UTF-8; details.offset), MISSING_XML, INVALID_XML (not a string, or more than one of xml / xmlBase64 / pdfBase64), INVALID_BASE64, INVALID_PDF, XML_DOCTYPE_REFUSED |
| 401 | UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key |
| 402 | QUOTA_EXCEEDED — the key used its monthly calls (Free 100, Developer 5,000; counter resets on the 1st, UTC). error.details: used, limit, plan (free|developer), resetsAt, upgradeUrl (a checkout link for this key; Developer: contact), checkoutEndpoint (POST /api/developers/plan/checkout with the key as Bearer → { url }). Counted: 2xx and 422 answers only. An instant test key answers the same code after its 10 requests in total (details.tier "test"). |
| 403 | KEY_INACTIVE |
| 413 | Request body over 4.5 MB — refused by the hosting platform before it reaches the API: text/plain FUNCTION_PAYLOAD_TOO_LARGE, not the JSON error shape. Answers are capped at 4.5 MB too. (The API's own JSON 413 XML_TOO_LARGE / PDF_TOO_LARGE at 10 MB decoded cannot be reached behind that limit.) |
| 422 | XML_ENCODING_CONFLICT (bytes or text contradict their encoding; details: class, offset, declared, bom), MALFORMED_XML (not well-formed; details.line, details.column), PDF_NO_INVOICE (pdfBase64 without an embedded invoice; details.reason), NOT_EVALUABLE (a validator cannot evaluate this document; details.erroredOracles) or UNSUPPORTED_FORMAT (not a recognised e-invoice) |
| 429 | RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt) |
| 500 | INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header |
| 503 | ORACLE_UNAVAILABLE — the official validator did not answer; nothing was changed; retry (Retry-After: 60) |
curl -s -X POST https://www.invoicenavigator.eu/api/v3/validate \
-H "Authorization: Bearer $INVOICE_NAVIGATOR_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile xml invoice.xml '{xml: $xml}')" \
| jq '.data | {valid, errors: [.findings[] | select(.severity == "error") | .ruleId]}'import { readFileSync } from 'node:fs'
const xml = readFileSync('invoice.xml', 'utf8')
const res = await fetch('https://www.invoicenavigator.eu/api/v3/validate', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.INVOICE_NAVIGATOR_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ xml }),
})
const body = await res.json()
if (!body.success) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`)
const { valid, findings } = body.data
console.log(valid, findings.filter((f) => f.severity === 'error').map((f) => f.ruleId))POST /v3/fix
Repair with the patch engine; answer open questions in the same call. Key: Authorization: Bearer sk_….
Repairs with the patch engine: targeted edits on your own document, never a rebuild. outcome is already_compliant, compliant, partial, needs_input or lossy_refused; you get the repaired xml, the patches applied, the verdict on the result, the remaining findings and the questions only you can answer. Send the answers back with the same xml; they are written into your document before the repair runs. xml is null when the result would lose a value of your document (fidelity.critical > 0). From a hybrid PDF the repaired XML comes back on its own, not inside the PDF.
| 200 · data.* | Type | Meaning |
|---|---|---|
| outcome | enum | One of: already_compliant, compliant, partial, needs_input, lossy_refused. |
| valid | boolean | |
| syntax | "UBL" | "CII" | |
| xml | string | null | The repaired document; null if it would lose content |
| sha256 | string | null | |
| verdict | Verdict | |
| changes | object[] | |
| patches | object[] | The edits applied to your document (set_text / set_attr / insert_tree / remove_node) |
| remaining | Finding[] | |
| questions | Question[] | |
| answers | object | |
| fidelity | object | |
| patchGaps | string[] | |
| mode | "strict" | "permissive" | |
| evidence | Evidence | |
| source | PdfSource |
| Status | When, and the error codes |
|---|---|
| 200 | Repair result |
| 400 | Bad request: INVALID_JSON, INVALID_UTF8 (body not UTF-8; details.offset), MISSING_XML, INVALID_XML (not a string, or more than one of xml / xmlBase64 / pdfBase64), INVALID_BASE64, INVALID_PDF, XML_DOCTYPE_REFUSED; INVALID_MODE, INVALID_EVIDENCE, INVALID_ANSWERS (answers is not an array of { id, value | option }, or more than 40) |
| 401 | UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key |
| 402 | QUOTA_EXCEEDED — the key used its monthly calls (Free 100, Developer 5,000; counter resets on the 1st, UTC). error.details: used, limit, plan (free|developer), resetsAt, upgradeUrl (a checkout link for this key; Developer: contact), checkoutEndpoint (POST /api/developers/plan/checkout with the key as Bearer → { url }). Counted: 2xx and 422 answers only. An instant test key answers the same code after its 10 requests in total (details.tier "test"). |
| 403 | KEY_INACTIVE |
| 413 | Request body over 4.5 MB — refused by the hosting platform before it reaches the API: text/plain FUNCTION_PAYLOAD_TOO_LARGE, not the JSON error shape. Answers are capped at 4.5 MB too. (The API's own JSON 413 XML_TOO_LARGE / PDF_TOO_LARGE at 10 MB decoded cannot be reached behind that limit.) |
| 422 | XML_ENCODING_CONFLICT (bytes or text contradict their encoding; details: class, offset, declared, bom), MALFORMED_XML (not well-formed; details.line, details.column), PDF_NO_INVOICE (pdfBase64 without an embedded invoice; details.reason), NOT_EVALUABLE, UNSUPPORTED_SYNTAX (not UBL/CII) or UNPARSEABLE |
| 429 | RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt) |
| 500 | INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header |
| 503 | ORACLE_UNAVAILABLE — the official validator did not answer; nothing was changed; retry (Retry-After: 60) |
curl -s -X POST https://www.invoicenavigator.eu/api/v3/fix \
-H "Authorization: Bearer $INVOICE_NAVIGATOR_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile xml invoice.xml '{xml: $xml}')" \
| jq '.data | {outcome, valid, remaining: [.remaining[].ruleId], questions: [.questions[].id]}'import { readFileSync, writeFileSync } from 'node:fs'
const xml = readFileSync('invoice.xml', 'utf8')
const res = await fetch('https://www.invoicenavigator.eu/api/v3/fix', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.INVOICE_NAVIGATOR_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ xml }),
})
const body = await res.json()
if (!body.success) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`)
const fix = body.data
// outcome: already_compliant | compliant | partial | needs_input | lossy_refused
if (fix.xml) writeFileSync('invoice.fixed.xml', fix.xml) // null when the result would lose a value
// what only you can answer: send { id, value } / { id, option } back as "answers" with the same xml
console.log(fix.outcome, fix.questions.map((q) => q.id), fix.remaining.map((f) => f.ruleId))POST /v3/convert
Convert to another syntax / CIUS, with the verdict of the output. Key: Authorization: Bearer sk_….
Targets: xrechnung-ubl, xrechnung-cii, peppol-bis, en16931-ubl, en16931-cii, nl-si-ubl, cius-ro, facturx-en16931, fatturapa, ksef-fa3, facturae. For peppol-bis, xrechnung-ubl, xrechnung-cii, nl-si-ubl, cius-ro, facturx-en16931, fatturapa, ksef-fa3, facturae the inputs the target's official rules need are checked before anything is rendered: what is missing comes back as 422 MISSING_INPUT with details.questions; send them in answers with the same XML. Same syntax (e.g. Peppol UBL → XRechnung UBL) only changes the document identity, so nothing can be lost. UBL ↔ CII and the national syntaxes are rebuilt from the canonical model and checked term by term; if a value would be lost the call answers 422 CONVERSION_LOSSY with the list, unless you send allowLoss: true. An unknown target gets 422 UNSUPPORTED_TARGET listing what is supported.
Every output is judged before it is returned, and data.judge says by what: XRechnung, Peppol and EN 16931 by the production validators (XSD, CEN schematron, KoSIT); the targets without a production validator by their own official XSD and schematron, run in-process — the same artefacts and versions as our offline measurements, with identical verdicts on every test document. National targets (FatturaPA, KSeF, Facturae) list every value the syntax has no element for in data.notCarried — business term, field, reason and where it went instead: by default the syntax's generic container (our own parser reads it back; a receiver sees only the native elements), or nowhere with residual: false. Nothing is dropped silently. On the EN 16931 targets and on KSeF FA(3) every entry of data.loss.terms also says whether a gap register explains it (registered, reason), and on the EN 16931 targets a value the output carries by identity — a trading name equal to the legal name, which UBL derives from the name — is listed in data.loss.identity instead of counting as lost. A target that cannot represent the invoice at all (KSeF without a Polish seller NIP) answers 422 TARGET_NOT_APPLICABLE with the reason. Known limitation of the national targets: an invoice line with a price base quantity (BT-149 ≠ 1) or line allowances/charges (BG-27/BG-28) cannot be carried with exact line arithmetic yet, so it is refused before rendering with 422 TARGET_ARITHMETIC_UNSUPPORTED and the affected lines in error.details.lines.
Per target
xrechnung-ubl — XRechnung 3.0 (UBL)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | UBL | EN 16931 CIUS |
| checked before rendering | 422 MISSING_INPUT | XRechnung 3.0.2 schematron (CEN + CIUS) + UBL 2.1 XSD; whitespace-only values are dropped instead of asked |
| judge | production-oracles | Invoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario) |
| known gaps | 0 | none — every EN 16931 term has its element |
xrechnung-cii — XRechnung 3.0 (CII)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | CII | EN 16931 CIUS |
| checked before rendering | 422 MISSING_INPUT | XRechnung 3.0.2 schematron (CEN + CIUS) + CII D16B XSD; whitespace-only values are dropped instead of asked |
| judge | production-oracles | Invoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario) |
| known gaps | 0 | none — every EN 16931 term has its element |
peppol-bis — Peppol BIS Billing 3.0 (UBL)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | UBL | EN 16931 CIUS |
| checked before rendering | 422 MISSING_INPUT | Peppol BIS 3.0.19 schematron (CEN + PEPPOL) + UBL 2.1 XSD; whitespace-only values are dropped instead of asked |
| judge | production-oracles | Invoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario) |
| known gaps | 0 | none — every EN 16931 term has its element |
en16931-ubl — EN 16931 (UBL)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | UBL | EN 16931 CIUS |
| checked before rendering | — | no requirement gate: the output is rendered and judged |
| judge | production-oracles | Invoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario) |
| known gaps | 0 | none — every EN 16931 term has its element |
en16931-cii — EN 16931 (CII; the XML of Factur-X / ZUGFeRD EN 16931)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | CII | EN 16931 CIUS |
| checked before rendering | — | no requirement gate: the output is rendered and judged |
| judge | production-oracles | Invoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario) |
| known gaps | 0 | none — every EN 16931 term has its element |
nl-si-ubl — NLCIUS / SI-UBL 2.0 (UBL, Netherlands)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | UBL | EN 16931 CIUS |
| checked before rendering | 422 MISSING_INPUT | SI-UBL 2.0 schematron + UBL 2.1 XSD |
| judge | in-process-official | UBL 2.1 XSD 2.1 (OASIS) + SI-UBL 2.0 / NLCIUS schematron (si-ubl-2.0.xsl) release 2026-05-21 (Peppol Autoriteit NL / Stichting Simplerinvoicing) — run in-process (libxml2 / SaxonJS) |
| known gaps | 0 | none — every EN 16931 term has its element |
cius-ro — CIUS-RO 1.0.1 (UBL, Romania RO e-Factura)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | UBL | EN 16931 CIUS |
| checked before rendering | 422 MISSING_INPUT | CIUS-RO 1.0.9 schematron + UBL 2.1 XSD |
| judge | in-process-official | UBL 2.1 XSD 2.1 (OASIS) + CIUS-RO schematron 1.0.9 (EN 16931 + RO rules) 1.0.9 (ANAF / Ministerul Finanțelor) — run in-process (libxml2 / SaxonJS) |
| known gaps | 0 | none — every EN 16931 term has its element |
| limits | 1 | A non-RON invoice without BT-6 (VAT accounting currency) fails BR-RO-030: the gate does not ask BT-6 yet, so the output comes back with verdict invalid and the finding (never certified). |
facturx-en16931 — Factur-X / ZUGFeRD EN 16931 (CII XML, judged by the Factur-X XSD + schematron)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | CII | EN 16931 CIUS |
| checked before rendering | 422 MISSING_INPUT | Factur-X 1.09.2 EN 16931 schematron + Factur-X EN 16931 XSD |
| judge | in-process-official | Factur-X EN 16931 XSD 1.09.2 (ZUGFeRD 2.5) (FNFE-MPE / FeRD) + Factur-X EN 16931 schematron (as run by Mustang 2.26.0) 1.09.2 (ZUGFeRD 2.5) (FNFE-MPE / FeRD) — run in-process (libxml2 / SaxonJS) |
| known gaps | 0 | none — every EN 16931 term has its element |
| limits | 1 | XML only (the factur-x.xml of the hybrid); PDF/A-3 embedding is not part of this call. |
| before sending | This is the XML part of a Factur-X EN 16931 invoice; embed it in a PDF/A-3 (factur-x.xml) to make the hybrid. |
fatturapa — FatturaPA FPR12 1.2.3 (Italy, B2B)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | FatturaPA | national syntax (not EN 16931) |
| checked before rendering | 422 MISSING_INPUT | FatturaPA FPR12 1.2.3 XSD + SdI controls (Elenco controlli v2.0), national data as answer slots |
| judge | in-process-official | FatturaPA XSD Schema_VFPR12 1.2.3 (Agenzia delle Entrate) + SdI content controls (Invoice Navigator coding of Elenco controlli v2.0, stateless controls only, incl. the 00421–00423 arithmetic; not an official validator) Elenco controlli 2.0 (Invoice Navigator) — run in-process (libxml2) |
| known gaps | 97 | terms the syntax cannot carry (P10 gap registry), reported per document in notCarried: BT-24, BT-23, BT-10, BT-34, BT-49, BT-41, BT-56..58, BT-36, BT-51, BT-154, BT-121, BT-98/105, … |
| limits | 3 | Line arithmetic: this target computes its line total as PrezzoTotale = PrezzoUnitario × Quantita (adjusted per unit by ScontoMaggiorazione); SdI rejects a mismatch with control 00423. A price base quantity (BT-149 ≠ 1) is written as the per-unit price BT-146 / BT-149 (at most 8 decimals) and line allowances/charges (BG-27/BG-28) in the target's own line elements, so the converted line adds up; BT-149 itself and the allowance/charge reason codes have no element (listed in notCarried). A line whose per-unit rounding would move the line total by more than 0.004, or quantity 0 with a per-unit adjustment, is refused before rendering with 422 TARGET_ARITHMETIC_UNSUPPORTED and the affected lines (error.details.lines[].reason). Registry checks of SdI (codice destinatario, partita IVA at AdE) cannot be run offline; the stateless controls are our coding of the official list. The scheme of a second tax scheme (BT-32 / buyer tax number) has no element and is not yet in the gap registry: reported as notCarried with registered: false. |
| before sending | Transmit through SdI. Derived, not asked: IdTrasmittente = seller (the seller transmits), ProgressivoInvio from BT-1, CodiceDestinatario XXXXXXX for a foreign buyer. |
All 97 registered gaps of fatturapa
BT-24customizationId(no element available): specification identifier is the syntax itself (FPR12 / FA (3))BT-23profileId(no element available): no business-process identifierBT-10buyerReference(no element available): no buyer reference elementBT-34seller.electronicAddress*(no element available): no seller electronic address (routing is by SdI code / KSeF NIP)BT-49buyer.electronicAddress*(no element available): no buyer electronic address in EN 16931 sense (FatturaPA CodiceDestinatario is an SdI channel code, asked separately)BT-41seller.contact.name(no element available): contact blocks carry phone/e-mail onlyBT-56..58buyer.contact*(no element available): FatturaPA has no buyer contactBT-36seller.address.additionalStreet(no element available): single address line (FatturaPA Indirizzo / KSeF AdresL1 holds street only)BT-51buyer.address.additionalStreet(no element available): single address lineBT-154lines[].itemDescription(no element available): one description element per line (item name)BT-121taxBreakdown[].exemptionCode(no element available): no VATEX code listBT-98/105documentAllowanceCharges[].reasonCode(no element available): document allowances become lines; no reason codeBT-93/100documentAllowanceCharges[].baseAmount(no element available): no base amount for the allowance lineBT-94/101documentAllowanceCharges[].percentage(no element available): no percentage for the allowance lineBT-20paymentTerms*(no element available): no free-text payment termsBT-70delivery.name(no element available): no deliver-to party nameBT-71delivery.locationId*(no element available): no deliver-to location identifierBT-81paymentMeans.code(element loses part of the value): national payment-method list is coarser (UNTDID 30/31/58 all → bank transfer)BT-30seller.companyId*(no element available): no legal registration identifier of the EN 16931 kindBT-47buyer.companyId*(no element available): no legal registration identifier of the EN 16931 kindBT-29seller.partyIdentifier*(no element available): no seller identifierBT-46buyer.partyIdentifier*(no element available): no buyer identifierBT-6taxCurrencyCode(no element available): VAT in accounting currency is not modelled as a currency codeBT-111taxTotalInTaxCurrency(no element available): see BT-6BT-76delivery.address.additionalStreet(no element available): single address lineBT-53buyer.address.postalCode(element loses part of the value): CAP must be 5 digits; foreign postcodes become 00000BT-38seller.address.postalCode(element loses part of the value): CAP must be 5 digitsBT-78delivery.address.postalCode(element loses part of the value): CAP must be 5 digitsBT-54buyer.address.countrySubentity(element loses part of the value): Provincia only for Italian addresses (2-letter sigla)BT-39seller.address.countrySubentity(element loses part of the value): Provincia only for Italian addressesBT-79delivery.address.countrySubentity(element loses part of the value): Provincia only for Italian addressesBT-42seller.contact.phone(element loses part of the value): Telefono is 5–12 ASCII charactersBT-83paymentMeans.paymentId(element loses part of the value): CodicePagamento max 60 charactersBT-118taxBreakdown[].categoryId(element loses part of the value): Natura → EN 16931 category is many-to-one (N2.1 can be AE or O)BT-151lines[].taxCategory.id(element loses part of the value): see BT-118BT-95/102documentAllowanceCharges[].taxCategoryId(element loses part of the value): see BT-118BT-126lines[].id(element loses part of the value): NumeroLinea is an integer 1–9999BT-97/104documentAllowanceCharges[].reason(element loses part of the value): a missing reason is rendered as Sconto/Maggiorazione (Descrizione is mandatory)BT-3typeCode(element loses part of the value): TipoDocumento covers 380/381/383/386; others become TD01BG-14invoicePeriod*(element loses part of the value): period exists per line only; header period restored when all lines agreeBT-9dueDate(element loses part of the value): due date lives in DatiPagamento, absent without payment meansBT-21noteSubjectCodes(no element available): notes have no subject code (Causale / StopkaFaktury are plain text)BT-7taxPointDate(no element available): no tax point date distinct from the issue date (P_6 / DataOraConsegna are delivery dates)BT-8vatDueDateTypeCode(no element available): no VAT due date type code (FatturaPA EsigibilitaIVA and KSeF P_16 are answered national regimes)BT-11references.project(no element available): no free project reference (FatturaPA CodiceCUP is a 15-character Italian code inside an order/contract block)BT-14references.salesOrder(no element available): no seller order referenceBT-17references.tender(no element available): no tender/lot reference (FatturaPA CodiceCIG only inside an order/contract block with a mandatory IdDocumento)BT-18references.invoicedObject*(no element available): no invoiced object identifierBT-19references.buyerAccounting(no element available): no document-level buyer accounting reference (FatturaPA RiferimentoAmministrazione is per line)BT-28seller.tradingName(no element available): one party name (Denominazione / Nazwa = legal name)BT-45buyer.tradingName(no element available): one party nameBT-33seller.legalForm(no element available): no free-text additional legal information (FatturaPA IscrizioneREA is the register entry)BT-162seller.address.line3(no element available): single address lineBT-163buyer.address.line3(no element available): single address lineBT-29seller.additionalIdentifiers*(no element available): no seller identifier (see BT-29)BT-82paymentMeansText(no element available): payment means is a code (ModalitaPagamento / FormaPlatnosci), no textBG-18paymentCard*(no element available): no card account (FatturaPA MP08 / KSeF FormaPlatnosci 2 say "card", nothing more)BG-19directDebit*(no element available): no mandate reference, creditor identifier or debited accountBT-113totals.prepaidAmount(no element available): no paid-amount term (FatturaPA ImportoPagamento / KSeF DoZaplaty state the amount due only)BG-24attachments*(element loses part of the value): FatturaPA Allegati: embedded file only, NomeAttachment ≤ 60 Latin-1 and FormatoAttachment ≤ 10 — BT-122 id, BT-124 URI and the MIME code have no place; KSeF Zalacznik is a structured data block, not a fileBG-10payee*(no element available): no payee party (FatturaPA Beneficiario carries BT-85; KSeF Podmiot3 needs a Polish/EU tax identification)BT-64..69,BT-164taxRepresentative.address*(element loses part of the value): RappresentanteFiscale carries VAT id and name, no addressBT-16references.despatchAdvice(no element available): DatiDDT needs DataDDT (mandatory); BT-16 has no dateBG-16/17additionalPaymentMeans*(no element available): every DettaglioPagamento needs its own ImportoPagamento; extra BG-16/17 accounts carry no amountBT-127lines[].note(no element available): one Descrizione per line (= BT-153)BT-128lines[].objectId*(no element available): no line object identifierBT-132lines[].orderLineReference(no element available): order line numbers live in a DatiOrdineAcquisto block per order (NumItem + RiferimentoNumeroLinea, IdDocumento mandatory), not on the lineBG-26lines[].period*(element loses part of the value): DataInizioPeriodo/DataFinePeriodo per line already carry BG-14 (header period on every line); a BG-26 value would be indistinguishable on readBT-148lines[].grossPrice(no element available): PrezzoUnitario is the net price; line ScontoMaggiorazione is a per-unit adjustment used for BG-27/28 semantics by SdI (00423)BT-147lines[].priceDiscount(no element available): see BT-148BT-149/150lines[].baseQuantity*(no element available): no price base quantity (PrezzoUnitario is per UnitaMisura): P18b writes the per-unit price BT-146 / BT-149 (8 decimals), so SdI 00423 holdsBG-27/28lines[].allowanceCharges*(element loses part of the value): line ScontoMaggiorazione adjusts the unit price per unit (SdI 00423): P18b writes BG-27/28 as per-unit Importo = amount / |BT-129| (SC/MG) and reads it back as Importo × Quantita; reason, reason code, base amount and percentage have no elementBT-158lines[].classifications*(no element available): CodiceArticolo carries BT-155/156/157; no distinct place for a classification with list id and versionBT-159lines[].originCountry(no element available): no country of originBG-32lines[].attributes*(no element available): AltriDatiGestionali (TipoDato ≤ 10 characters) is the generic container, also used for the residualBT-32-1seller.taxNumberScheme(no element available): the scheme of the seller's second PartyTaxScheme (TaxScheme/ID, e.g. FC) has no element: FatturaPA CodiceFiscale, KSeF and Facturae carry the number only (or not at all)—buyer.taxNumberScheme(no element available): as seller.taxNumberScheme for the buyerBG-25lines[].subLines(no element available): XRechnung sub-invoice lines (BG-DEX / SubInvoiceLine) have no nesting in the national syntaxBT-DEX-001,BT-DEX-002,BT-DEX-003thirdPartyPayments*(no element available): XRechnung third-party payment (BG-DEX-09, UBL PrepaidPayment) has no elementX-PROJECT-NAMEreferences.projectName(no element available): the CII project name (SpecifiedProcuringProject/Name, no BT) has no elementBT-27seller.registrationName(element loses part of the value): one party name (Denominazione): a legal name that differs from the name is not keptBT-44buyer.registrationName(element loses part of the value): one party name (Denominazione)—seller.vatId(element loses part of the value): IdFiscaleIVA is mandatory for the seller: without BT-31 the tax number (BT-32) fills it and reads back as BT-31—seller.address.street(element loses part of the value): Indirizzo is mandatory: a missing street is written as "-" and reads back as that—buyer.address.street(element loses part of the value): Indirizzo is mandatory: a missing street is written as "-"BG-15delivery.address*(element loses part of the value): IndirizzoResa needs Indirizzo and Comune: a deliver-to address without street or city is not written; no third address lineBT-107declaredAllowanceTotal(no element available): document allowances become lines; no allowance totalBT-108declaredChargeTotal(no element available): document charges become lines; no charge totalX-LINE-EXEMPTIONlines[].taxExemptionReason(no element available): an exemption reason exists per DatiRiepilogo (RiferimentoNormativo), not per lineBT-114payableRoundingAmount(element exists, not written yet): DatiGeneraliDocumento/Arrotondamento exists; not mappedBT-146lines[].unitPrice(element loses part of the value): PrezzoUnitario has at most 8 decimals (a 9th decimal is rounded); with a base quantity BT-149 ≠ 1 it is the per-unit price BT-146 / BT-149 (P18b). The residual container carries the exact valueX-LINE-STATUSlines[].lineStatusReasonCode(no element available): the CII line status reason code (LineStatusReasonCode, no BT) has no element—buyer.legalForm(no element available): buyer legal information (CII SpecifiedLegalOrganization text, no BT) has no elementBT-84paymentMeans.proprietaryId(element loses part of the value): one account number per payment (the IBAN); a proprietary account id stated next to it is not keptBT-46buyer.additionalIdentifiers*(no element available): no buyer identifier besides the tax idsX-LINE-EXEMPTION-CODElines[].taxExemptionReasonCode(no element available): a line exemption reason code (VATEX) has no element: the line Natura is derived from the VAT category, the legal reference sits per DatiRiepilogoBT-69taxRepresentative.country(element loses part of the value): RappresentanteFiscale carries IdFiscaleIVA and a name, no address: the country is read back from IdPaese (the VAT id's country), so a representative country that differs from its VAT id prefix is lost
ksef-fa3 — KSeF FA(3) 1-0E (Poland)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | KSeF | national syntax (not EN 16931) |
| checked before rendering | 422 MISSING_INPUT | KSeF FA(3) XSD + FA(3) consistency rules, national data as answer slots; whitespace-only values are dropped instead of asked |
| judge | in-process-official | KSeF FA(3) XSD schemat.xsd FA(3) 1-0E (2025-06-25) (Ministerstwo Finansów (crd.gov.pl)) + FA(3) consistency rules (Invoice Navigator coding, errors only; not an official validator) 2026-10 (Invoice Navigator) + FA(3) line total P_11 = P_8B × P_9A − P_10 (Invoice Navigator coding of art. 106e ust. 1 pkt 8–11 ustawy o VAT / the FA(3) field definitions; KSeF itself does not run it) FA(3) 1-0E (Invoice Navigator) — run in-process (libxml2) |
| known gaps | 97 | terms the syntax cannot carry (P10 gap registry), reported per document in notCarried: BT-24, BT-23, BT-10, BT-34, BT-49, BT-41, BT-56, BT-36, BT-51, BT-154, BT-121, BT-98/105, … |
| limits | 3 | Line arithmetic: this target computes its line total as P_11 = P_8B × P_9A − P_10 (art. 106e ust. 1 pkt 8–11 ustawy o VAT). A price base quantity (BT-149 ≠ 1) is written as the per-unit price BT-146 / BT-149 (at most 8 decimals) and line allowances/charges (BG-27/BG-28) in the target's own line elements, so the converted line adds up; BT-149 itself and the allowance/charge reason codes have no element (listed in notCarried). A line whose per-unit rounding would move the line total by more than 0.004, or quantity 0 with a per-unit adjustment, is refused before rendering with 422 TARGET_ARITHMETIC_UNSUPPORTED and the affected lines (error.details.lines[].reason). The seller needs a Polish NIP (BT-31 PL…); otherwise 422 TARGET_NOT_APPLICABLE. Our BR-PL consistency rules are not the KSeF platform validation; the KSeF number is assigned on submission. |
| before sending | Submit through the KSeF API; the KSeF number is assigned there. DataWytworzeniaFa is set technically to BT-2 12:00 UTC. |
All 97 registered gaps of ksef-fa3
BT-24customizationId(no element available): specification identifier is the syntax itself (FPR12 / FA (3))BT-23profileId(no element available): no business-process identifierBT-10buyerReference(no element available): no buyer reference elementBT-34seller.electronicAddress*(no element available): no seller electronic address (routing is by SdI code / KSeF NIP)BT-49buyer.electronicAddress*(no element available): no buyer electronic address in EN 16931 sense (FatturaPA CodiceDestinatario is an SdI channel code, asked separately)BT-41seller.contact.name(no element available): contact blocks carry phone/e-mail onlyBT-56buyer.contact.name(no element available): Podmiot2/DaneKontaktowe carries e-mail and phone only; no contact nameBT-36seller.address.additionalStreet(no element available): single address line (FatturaPA Indirizzo / KSeF AdresL1 holds street only)BT-51buyer.address.additionalStreet(no element available): single address lineBT-154lines[].itemDescription(no element available): one description element per line (item name)BT-121taxBreakdown[].exemptionCode(no element available): no VATEX code listBT-98/105documentAllowanceCharges[].reasonCode(no element available): document allowances become lines; no reason codeBT-93/100documentAllowanceCharges[].baseAmount(no element available): no base amount for the allowance lineBT-94/101documentAllowanceCharges[].percentage(no element available): no percentage for the allowance lineBT-20paymentTerms*(no element available): no free-text payment termsBT-70delivery.name(no element available): no deliver-to party nameBT-71delivery.locationId*(no element available): no deliver-to location identifierBT-81paymentMeans.code(element loses part of the value): national payment-method list is coarser (UNTDID 30/31/58 all → bank transfer)BT-30seller.companyId*(no element available): no legal registration identifier of the EN 16931 kindBT-47buyer.companyId*(no element available): no legal registration identifier of the EN 16931 kindBT-29seller.partyIdentifier*(no element available): no seller identifierBT-46buyer.partyIdentifier*(no element available): no buyer identifierBT-6taxCurrencyCode(no element available): VAT in accounting currency is not modelled as a currency codeBT-111taxTotalInTaxCurrency(no element available): see BT-6BT-76delivery.address.additionalStreet(no element available): single address lineBT-38seller.address.postalCode(element loses part of the value): address is two free-text lines (AdresL1/L2); structure re-split heuristicallyBT-37seller.address.city(element loses part of the value): see BT-38BT-53buyer.address.postalCode(element loses part of the value): address is two free-text lines; postcodes with spaces cannot be split backBT-52buyer.address.city(element loses part of the value): see BT-53BT-39seller.address.countrySubentity(no element available): no country subdivisionBT-54buyer.address.countrySubentity(no element available): no country subdivisionBG-15delivery.address*(no element available): no deliver-to addressBT-32seller.taxNumber(no element available): NIP is the only seller tax idBT-48buyer.taxNumber(no element available): NIP / NrVatUE / NrID only; the P8 reader reads a second buyer tax registration as BT-48 tooBT-156lines[].buyersItemId(no element available): no buyer item identifier (Indeks = seller item id)BT-157-1lines[].itemIdScheme(element loses part of the value): only GTIN has an element; other schemes are lostBT-157lines[].itemId(element loses part of the value): only GTIN (scheme 0160) has an elementBT-126lines[].id(element loses part of the value): NrWierszaFa is a natural numberBG-20/21documentAllowanceCharges*(element loses part of the value): no document-level allowance/charge: rendered as FaWiersz with negative/positive value, read back as a lineBT-107declaredAllowanceTotal(element loses part of the value): see BG-20BT-108declaredChargeTotal(element loses part of the value): see BG-21BT-149/150lines[].baseQuantity*(no element available): no price base quantity: P_9A is the per-unit price BT-146 / BT-149 (8 decimals)BG-27/28lines[].allowanceCharges*(element loses part of the value): line allowances are one amount P_10 (no reason, code, base or percentage); FA(3) has no line charge: charges are folded into P_9A per unitBT-146lines[].unitPrice(element loses part of the value): P_9A has at most 8 decimals; with BT-149 ≠ 1 it is BT-146 / BT-149, and line charges are folded in per unitBG-25lines*(element loses part of the value): allowance/charge lines appear as extra lines when read back nativelyBT-106totals.lineExtensionAmount(element loses part of the value): derived from FaWiersz incl. allowance linesBT-120taxBreakdown[].exemptionReason(element loses part of the value): exemption basis is P_19A/B/C (asked), not the EN 16931 reason textBT-116taxBreakdown[].taxableAmount(element loses part of the value): P_13_x buckets merge categories that share a bucketBG-23taxBreakdown*(element loses part of the value): VAT breakdown is per P_13_x bucket, not per (category, rate)BT-151/152lines[].taxCategory*(element loses part of the value): P_12 rate codes: 0 KR / 0 WDT / 0 EX / zw / np / oo → category is many-to-oneBT-83paymentMeans.paymentId(no element available): no remittance information elementBT-85paymentMeans.accountName(element loses part of the value): OpisRachunku (account description) is the nearest elementBT-22notes*(element loses part of the value): free notes go to Stopka/Informacje; order keptBG-13delivery*(element loses part of the value): only the delivery date (P_6) exists, and P_6 excludes the invoice period (OkresFa)BG-14invoicePeriod*(element loses part of the value): OkresFa and P_6 are mutually exclusiveBT-26precedingInvoices[].issueDate(element loses part of the value): DataWystFaKorygowanej is mandatory; asked when missingBT-3typeCode(element loses part of the value): RodzajFaktury VAT/KOR/ZAL; 384 and 381 both become KORBT-27seller.registrationName(element loses part of the value): one name (Nazwa)BT-21noteSubjectCodes(no element available): notes have no subject code (Causale / StopkaFaktury are plain text)BT-7taxPointDate(no element available): no tax point date distinct from the issue date (P_6 / DataOraConsegna are delivery dates)BT-8vatDueDateTypeCode(no element available): no VAT due date type code (FatturaPA EsigibilitaIVA and KSeF P_16 are answered national regimes)BT-11references.project(no element available): no free project reference (FatturaPA CodiceCUP is a 15-character Italian code inside an order/contract block)BT-14references.salesOrder(no element available): no seller order referenceBT-17references.tender(no element available): no tender/lot reference (FatturaPA CodiceCIG only inside an order/contract block with a mandatory IdDocumento)BT-18references.invoicedObject*(no element available): no invoiced object identifierBT-19references.buyerAccounting(no element available): no document-level buyer accounting reference (FatturaPA RiferimentoAmministrazione is per line)BT-28seller.tradingName(no element available): one party name (Denominazione / Nazwa = legal name)BT-45buyer.tradingName(no element available): one party nameBT-33seller.legalForm(no element available): no free-text additional legal information (FatturaPA IscrizioneREA is the register entry)BT-162seller.address.line3(no element available): single address lineBT-163buyer.address.line3(no element available): single address lineBT-29seller.additionalIdentifiers*(no element available): no seller identifier (see BT-29)BT-82paymentMeansText(no element available): payment means is a code (ModalitaPagamento / FormaPlatnosci), no textBG-18paymentCard*(no element available): no card account (FatturaPA MP08 / KSeF FormaPlatnosci 2 say "card", nothing more)BG-19directDebit*(no element available): no mandate reference, creditor identifier or debited accountBT-113totals.prepaidAmount(no element available): no paid-amount term (FatturaPA ImportoPagamento / KSeF DoZaplaty state the amount due only)BG-24attachments*(element loses part of the value): FatturaPA Allegati: embedded file only, NomeAttachment ≤ 60 Latin-1 and FormatoAttachment ≤ 10 — BT-122 id, BT-124 URI and the MIME code have no place; KSeF Zalacznik is a structured data block, not a fileBG-10payee*(no element available): no payee party (FatturaPA Beneficiario carries BT-85; KSeF Podmiot3 needs a Polish/EU tax identification)BG-11taxRepresentative*(no element available): no seller tax representative (PodmiotUpowazniony is an authorised body, not BG-11)BT-81additionalPaymentMeans[].code(element loses part of the value): one FormaPlatnosci for all RachunekBankowy (see BT-81)BT-15references.receivingAdvice(no element available): no receiving advice referenceBT-114payableRoundingAmount(no element available): no rounding term (Rozliczenie charges/deductions are free-text reasons)BT-115totals.payableAmount(element loses part of the value): P_15 is the gross total; DoZaplaty states BT-115 on VAT invoices only — a KOR settles by DoZaplaty/DoRozliczenia, a direction EN 16931 has no term forBG-3precedingInvoices*(element loses part of the value): preceding invoices exist only on a correction (KOR DaneFaKorygowanej); a VAT invoice has no BG-3 elementBT-32-1seller.taxNumberScheme(no element available): the scheme of the seller's second PartyTaxScheme (TaxScheme/ID, e.g. FC) has no element: FatturaPA CodiceFiscale, KSeF and Facturae carry the number only (or not at all)—buyer.taxNumberScheme(no element available): as seller.taxNumberScheme for the buyerBG-25lines[].subLines(no element available): XRechnung sub-invoice lines (BG-DEX / SubInvoiceLine) have no nesting in the national syntaxBT-DEX-001,BT-DEX-002,BT-DEX-003thirdPartyPayments*(no element available): XRechnung third-party payment (BG-DEX-09, UBL PrepaidPayment) has no elementX-PROJECT-NAMEreferences.projectName(no element available): the CII project name (SpecifiedProcuringProject/Name, no BT) has no elementX-LINE-STATUSlines[].lineStatusReasonCode(no element available): the CII line status reason code (LineStatusReasonCode, no BT) has no element—buyer.legalForm(no element available): buyer legal information (CII SpecifiedLegalOrganization text, no BT) has no elementBT-84paymentMeans.proprietaryId(element loses part of the value): one account number per payment (the IBAN); a proprietary account id stated next to it is not keptBT-46buyer.additionalIdentifiers*(no element available): no buyer identifier besides the tax idsBT-82additionalPaymentMeans[].text(no element available): RachunekBankowy has no payment means textBG-16additionalPaymentMeans*(element loses part of the value): one FormaPlatnosci for all RachunekBankowy: the account of an additional payment means is read back as the account of the main oneBT-84paymentMeans.iban(element loses part of the value): see additionalPaymentMeans: with one payment form, the first RachunekBankowy is read back as the main accountBT-86paymentMeans.bic(element loses part of the value): SWIFT sits inside RachunekBankowy, which is written only with an account number (BT-84): a BIC without an IBAN (e.g. a card payment) has no place
facturae — Facturae 3.2.2 (Spain, unsigned)
| Aspect | Type | Meaning |
|---|---|---|
| syntax | Facturae | national syntax (not EN 16931) |
| checked before rendering | 422 MISSING_INPUT | Facturae 3.2.2 XSD, national data as answer slots |
| judge | in-process-official | Facturae XSD 3.2.2 (Ministerio de Hacienda (facturae.gob.es)) + Facturae line totals TotalCost = Quantity × UnitPriceWithoutTax, GrossAmount = TotalCost − discounts + charges (Invoice Navigator coding of the XSD 3.2.2 element definitions) 3.2.2 (Invoice Navigator) — run in-process (libxml2) |
| known gaps | 115 | terms the syntax cannot carry (P10 gap registry), reported per document in notCarried: BT-24, BT-23, BT-10, BT-34, BT-49, BT-36, BT-51, BT-53, BT-52, BT-54, BT-39, BT-157, … |
| limits | 3 | Line arithmetic: this target computes its line total as TotalCost = Quantity × UnitPriceWithoutTax and GrossAmount = TotalCost − discounts + charges (Facturae 3.2.2 XSD). A price base quantity (BT-149 ≠ 1) is written as the per-unit price BT-146 / BT-149 (at most 8 decimals) and line allowances/charges (BG-27/BG-28) in the target's own line elements, so the converted line adds up; BT-149 itself and the allowance/charge reason codes have no element (listed in notCarried). A line whose per-unit rounding would move the line total by more than 0.004, or quantity 0 with a per-unit adjustment, is refused before rendering with 422 TARGET_ARITHMETIC_UNSUPPORTED and the affected lines (error.details.lines[].reason). Unsigned: the XAdES signature (FACe / AEAT) is not part of the output; the judge checks the XSD and the line totals. The generic container (InvoiceAdditionalInformation) holds 2,500 characters; above that the values are lost and listed. |
| before sending | Unsigned: FACe and the AEAT require a XAdES signature with your certificate before submission; the judge checks the XSD and the line totals. |
All 115 registered gaps of facturae
BT-24customizationId(no element available): specification identifier is the syntax (SchemaVersion 3.2.2)BT-23profileId(no element available): no business-process identifierBT-10buyerReference(element loses part of the value): ReceiverTransactionReference holds 20 charactersBT-34seller.electronicAddress*(no element available): no electronic address (FACe routing uses DIR3 administrative centres)BT-49buyer.electronicAddress*(no element available): no electronic addressBT-36seller.address.additionalStreet(no element available): single address lineBT-51buyer.address.additionalStreet(no element available): single address lineBT-53buyer.address.postalCode(element loses part of the value): foreign address: PostCodeAndTown is one free-text fieldBT-52buyer.address.city(element loses part of the value): see BT-53; and (P19b) Town holds 50 characters (TextMax50Type), PostCodeAndTown 50: a longer city is cutBT-54buyer.address.countrySubentity(element loses part of the value): Province is mandatory; when BT-54 is absent it carries the answered province, indistinguishable on readBT-39seller.address.countrySubentity(element loses part of the value): see BT-54BT-157lines[].itemId*(no element available): ArticleCode is the seller article code onlyBT-157-1lines[].itemIdScheme(no element available): see BT-157BT-156lines[].buyersItemId(no element available): no buyer item identifierBT-130lines[].quantityUnit(element loses part of the value): Facturae unit list 01–36; others (e.g. DAY) become 05 OtrosBT-151,BT-152lines[].taxCategory.id(element loses part of the value): category exists only as SpecialTaxableEvent 01/02: E, K, G → 01; AE, O → 02 (a line read back as O carries no rate BT-152 in EN 16931)BT-118taxBreakdown[].categoryId(element loses part of the value): see BT-151BT-121taxBreakdown[].exemptionCode(no element available): no VATEX code listBT-120taxBreakdown[].exemptionReason(element loses part of the value): reason lives on the line SpecialTaxableEvent; none for Z/SBT-98/105documentAllowanceCharges[].reasonCode(no element available): Discount/Charge have no reason codeBT-93/100documentAllowanceCharges[].baseAmount(no element available): Discount/Charge have no base amountBT-95/102documentAllowanceCharges[].taxCategoryId(element loses part of the value): GeneralDiscounts carry no VAT category; read back only when one standard-rated group existsBT-96/103documentAllowanceCharges[].taxPercent(element loses part of the value): see BT-95BT-20paymentTerms*(no element available): no free-text payment termsBT-81paymentMeans.code(element loses part of the value): Facturae PaymentMeans 01–19: 30/31/58 all → 04 transferenciaBT-85paymentMeans.accountName(no element available): no account nameBT-86paymentMeans.bic(element loses part of the value): BIC must be 11 characters: 8-character BICs gain the XXX branch codeBT-70delivery.name(no element available): no deliver-to partyBT-71delivery.locationId*(no element available): no deliver-to locationBG-15delivery.address*(no element available): no deliver-to addressBT-30seller.companyId*(no element available): no legal registration id of the EN 16931 kind (RegistrationData is the Registro Mercantil entry)BT-47buyer.companyId*(no element available): see BT-30BT-29seller.partyIdentifier*(no element available): no seller identifierBT-46buyer.partyIdentifier*(no element available): no buyer identifierBT-32seller.taxNumber(no element available): one tax identification number per partyBT-22notes*(element loses part of the value): notes joined into InvoiceDescription (one text, newline-separated)—national.es.buyerProvince(element loses part of the value): answered province is read back as BT-54 (see above)—national.es.sellerProvince(element loses part of the value): see BT-39BT-111taxTotalInTaxCurrency(no element available): TaxCurrencyCode exists, the amount in that currency per Tax only via EquivalentInEurosBT-32-1seller.taxNumberScheme(no element available): the scheme of the seller's second PartyTaxScheme (TaxScheme/ID, e.g. FC) has no element: FatturaPA CodiceFiscale, KSeF and Facturae carry the number only (or not at all)—buyer.taxNumberScheme(no element available): as seller.taxNumberScheme for the buyerBG-25lines[].subLines(no element available): XRechnung sub-invoice lines (BG-DEX / SubInvoiceLine) have no nesting in the national syntaxBT-DEX-001,BT-DEX-002,BT-DEX-003thirdPartyPayments*(no element available): XRechnung third-party payment (BG-DEX-09, UBL PrepaidPayment) has no elementX-PROJECT-NAMEreferences.projectName(no element available): the CII project name (SpecifiedProcuringProject/Name, no BT) has no elementBT-21noteSubjectCodes(no element available): InvoiceDescription is one text; no subject codeBT-7taxPointDate(no element available): no tax point date: InvoiceIssueData/OperationDate ("date on which the service is rendered or the good is delivered", the one operation date) carries BT-72 (P15e)BT-8vatDueDateTypeCode(no element available): no VAT due date type codeBT-11references.project(no element available): no project referenceBT-12references.contract(element loses part of the value): InvoiceLine/ReceiverContractReference on every line, read back when every line carries the same value (P15e); it holds 20 characters (TextMax20Type): a longer reference is not writtenBT-13references.purchaseOrder(element loses part of the value): InvoiceLine/ReceiverTransactionReference on every line (the header element carries BT-10), read back when every line carries the same value (P15e); it holds 20 characters (TextMax20Type): a longer reference is not writtenBT-14references.salesOrder(element loses part of the value): InvoiceLine/IssuerTransactionReference on every line, read back when every line carries the same value (P15e); it holds 20 characters (TextMax20Type): a longer reference is not writtenBT-15references.receivingAdvice(no element available): no receiving advice referenceBT-16references.despatchAdvice(element loses part of the value): InvoiceLine/DeliveryNotesReferences/DeliveryNote/DeliveryNoteNumber on every line, read back when every line carries the same single value (P15e); it holds 30 characters (TextMax30Type): a longer reference is not writtenBT-17references.tender(no element available): no tender referenceBT-18references.invoicedObject*(no element available): no invoiced object identifierBT-19references.buyerAccounting(no element available): no buyer accounting referenceBT-28seller.tradingName(element loses part of the value): LegalEntity/TradeName holds 40 characters (TextMax40Type): a longer trading name is cut (P15e)BT-45buyer.tradingName(element loses part of the value): LegalEntity/TradeName holds 40 characters (TextMax40Type): a longer trading name is cut (P15e)BT-33seller.legalForm(no element available): no free-text legal information (RegistrationData is the register entry)BT-162seller.address.line3(no element available): single address lineBT-163buyer.address.line3(no element available): single address lineBT-29seller.additionalIdentifiers*(no element available): no seller identifierBT-46buyer.additionalIdentifiers*(no element available): no buyer identifierBT-37seller.address.city(element loses part of the value): foreign seller address: PostCodeAndTown is one free-text field; and (P19b) Town holds 50 characters (TextMax50Type), PostCodeAndTown 50: a longer city is cutBT-38seller.address.postalCode(element loses part of the value): see BT-37BT-48buyer.taxNumber(no element available): one TaxIdentificationNumber per party (BT-48); the P8 reader reads a second buyer PartyTaxScheme as BT-48 tooBT-3typeCode(element loses part of the value): InvoiceClass OO / OR: only 380 and 381 have an equivalent; other type codes become 380 or 381BG-3precedingInvoices*(element loses part of the value): Corrective names one corrected invoice (InvoiceNumber) and no issue dateBT-82paymentMeansText(no element available): PaymentMeans is a codeBT-83paymentMeans.paymentId(element loses part of the value): Installment/PaymentReconciliationReference (60 characters) is written only with an Installment, which needs InstallmentDueDate: without a due date (BT-9) the remittance information has no placeBG-18paymentCard*(no element available): no card accountBG-19directDebit*(element loses part of the value): Installment/AccountToBeDebited could carry the debited account (BT-91, not mapped); no mandate reference (BT-89) or creditor identifier (BT-90)BG-16,BG-17additionalPaymentMeans*(element loses part of the value): each Installment has one AccountToBeCredited and its own InstallmentAmount; extra accounts carry no amountBT-114payableRoundingAmount(no element available): InvoiceTotals have no rounding amountBT-107declaredAllowanceTotal(element loses part of the value): TotalGeneralDiscounts is written from the discounts; a declared total is not keptBT-108declaredChargeTotal(element loses part of the value): TotalGeneralSurcharges is written from the charges; a declared total is not keptBG-20/21documentAllowanceCharges*(element loses part of the value): GeneralDiscounts precede GeneralSurcharges: a mixed order of allowances and charges is not kept (each value still is)BG-24attachments*(element exists, not written yet): AdditionalData/RelatedDocuments/Attachment carries an embedded file (format, encoding, data; no BT-122 id or BT-124 URI); not mappedBG-10payee*(no element available): no payee party (FactoringAssignmentData/Assignee is a factoring assignee)BG-11,BT-164taxRepresentative*(no element available): no seller tax representativeBT-126lines[].id(element loses part of the value): SequenceNumber (an integer of up to 9 digits) carries a numeric line id; any other line id is read back as the line positionBT-127lines[].note(no element available): one free-text element per line besides ItemDescription (BT-153): AdditionalLineItemInformation, which carries BT-154 (P15e)BT-128lines[].objectId*(no element available): no line object identifierBT-132lines[].orderLineReference(no element available): InvoiceLine/SequenceNumber (xs:double, "sequence number in the purchase order") is one element per line and carries a numeric BT-126 line id (see lines[].id); a non-numeric BT-132 does not fit xs:double (P15e)BT-133lines[].accountingReference(no element available): no line accounting referenceBG-26lines[].period*(element loses part of the value): InvoiceLine/LineItemPeriod (PeriodDates) needs StartDate and EndDate: a line period with one date is not written (P15e)BG-27/28lines[].allowanceCharges*(element loses part of the value): InvoiceLine/DiscountsAndRebates and Charges (P18b): amount, reason text and rate (when its base is TotalCost) are carried; no reason code, no other base amountBT-148lines[].grossPrice(no element available): no gross price: UnitPriceWithoutTax is the price TotalCost = Quantity × UnitPriceWithoutTax is computed from (BT-146); a price discount could only be a line DiscountsAndRebates entry, the BG-27 element, and would read back as BT-146 plus a BG-27 allowance (P15e)BT-147lines[].priceDiscount(no element available): see BT-148BT-149/150lines[].baseQuantity*(no element available): no price base quantity: P18b writes UnitPriceWithoutTax = BT-146 / BT-149 (8 decimals), so TotalCost = Quantity × UnitPriceWithoutTax holdsBT-158lines[].classifications*(no element available): no item classificationBT-159lines[].originCountry(no element available): no country of originBG-32lines[].attributes*(no element available): no item attributesX-LINE-EXEMPTIONlines[].taxExemptionReason(element loses part of the value): SpecialTaxableEventReason per line is taken from the VAT breakdown, not from a line reasonX-LINE-STATUSlines[].lineStatusReasonCode(no element available): the CII line status reason code (LineStatusReasonCode, no BT) has no element—buyer.legalForm(no element available): buyer legal information (CII SpecifiedLegalOrganization text, no BT) has no elementBT-84paymentMeans.proprietaryId(element loses part of the value): one account number per payment (the IBAN); a proprietary account id stated next to it is not keptBT-84paymentMeans.iban(element loses part of the value): PaymentDetails/Installment needs InstallmentDueDate: without a due date (BT-9) no payment means or account is written—seller.address.street(element loses part of the value): Address is mandatory: a missing street is written as "-" and reads back as that; and (P19b) Address holds 80 characters (TextMax80Type): a longer street is cut—buyer.address.street(element loses part of the value): Address is mandatory: a missing street is written as "-"; and (P19b) Address holds 80 characters (TextMax80Type): a longer street is cutBT-27seller.name(element loses part of the value): CorporateName holds 80 characters (TextMax80Type): a longer name is cutBT-27seller.registrationName(element loses part of the value): see seller.name (the legal name is CorporateName)BT-44buyer.name(element loses part of the value): CorporateName holds 80 characters (TextMax80Type): a longer name is cutBT-44buyer.registrationName(element loses part of the value): see buyer.nameBT-41seller.contact.name(element loses part of the value): ContactDetails/ContactPersons holds 40 characters (TextMax40Type): a longer contact name is cutBT-42seller.contact.phone(element loses part of the value): ContactDetails/Telephone holds 15 characters (TextMax15Type): a longer number is cutBT-43seller.contact.email(element loses part of the value): ContactDetails/ElectronicMail holds 60 characters (TextMax60Type): a longer address is cutBT-56buyer.contact.name(element loses part of the value): ContactDetails/ContactPersons holds 40 characters (TextMax40Type): a longer contact name is cutBT-57buyer.contact.phone(element loses part of the value): ContactDetails/Telephone holds 15 characters (TextMax15Type): a longer number is cutBT-58buyer.contact.email(element loses part of the value): ContactDetails/ElectronicMail holds 60 characters (TextMax60Type): a longer address is cutBT-146lines[].unitPrice(element loses part of the value): UnitPriceWithoutTax is written with at most 8 decimals (a 9th decimal is rounded); with a base quantity BT-149 ≠ 1 it is the per-unit price BT-146 / BT-149 (P18b)X-LINE-EXEMPTION-CODElines[].taxExemptionReasonCode(no element available): no exemption reason code per line (SpecialTaxableEventReason is text, taken from the VAT breakdown)BT-6taxCurrencyCode(element loses part of the value): TaxCurrencyCode is mandatory and written as BT-6 or else BT-5: a BT-6 equal to BT-5 is indistinguishable from no BT-6 and is read back as absentBT-31seller.vatId(element loses part of the value): for a party resident in Spain (ResidenceTypeCode R, from the country) TaxIdentificationNumber is the NIF without prefix and is read back with ES: a non-Spanish VAT id on a party with country ES comes back prefixed ESBT-48buyer.vatId(element loses part of the value): as seller.vatId: a non-Spanish VAT id on a buyer with country ES comes back prefixed ES
| 200 · data.* | Type | Meaning |
|---|---|---|
| target | object | |
| source | object | |
| method | "identity_patch" | "canonical_render" | |
| lossless | boolean | |
| xml | string | null | |
| sha256 | string | null | |
| loss | object | |
| notCarried | object[] | National targets: values the syntax has no element for (P10 gap registry), grouped per field — never silent. registered: false = a loss the registry does not explain yet. |
| judge | object | Which judge produced verdict: production-oracles (XSD + CEN schematron + KoSIT) or in-process-official (the target's official XSD / schematron run in-process; parts list each artefact and version). |
| verdict | Verdict | |
| findings | Finding[] |
| Status | When, and the error codes |
|---|---|
| 200 | Converted document |
| 400 | Bad request: INVALID_JSON, INVALID_UTF8 (body not UTF-8; details.offset), MISSING_XML, INVALID_XML (not a string, or more than one of xml / xmlBase64 / pdfBase64), INVALID_BASE64, INVALID_PDF, XML_DOCTYPE_REFUSED; MISSING_TARGET (error.details.supported / planned), INVALID_ALLOW_LOSS, INVALID_RESIDUAL, INVALID_ANSWERS (answers is not an array of { id, value, scheme? }) |
| 401 | UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key |
| 402 | QUOTA_EXCEEDED — the key used its monthly calls (Free 100, Developer 5,000; counter resets on the 1st, UTC). error.details: used, limit, plan (free|developer), resetsAt, upgradeUrl (a checkout link for this key; Developer: contact), checkoutEndpoint (POST /api/developers/plan/checkout with the key as Bearer → { url }). Counted: 2xx and 422 answers only. An instant test key answers the same code after its 10 requests in total (details.tier "test"). |
| 403 | KEY_INACTIVE |
| 413 | Request body over 4.5 MB — refused by the hosting platform before it reaches the API: text/plain FUNCTION_PAYLOAD_TOO_LARGE, not the JSON error shape. Answers are capped at 4.5 MB too. (The API's own JSON 413 XML_TOO_LARGE / PDF_TOO_LARGE at 10 MB decoded cannot be reached behind that limit.) |
| 422 | XML_ENCODING_CONFLICT (bytes or text contradict their encoding; details: class, offset, declared, bom), MALFORMED_XML (not well-formed; details.line, details.column), PDF_NO_INVOICE (pdfBase64 without an embedded invoice; details.reason), NOT_EVALUABLE, UNSUPPORTED_TARGET (error.details.supported / planned: ), UNSUPPORTED_SYNTAX, UNPARSEABLE, CONVERSION_LOSSY (error.details = the result without xml), MISSING_INPUT (peppol-bis, xrechnung-ubl, xrechnung-cii, nl-si-ubl, cius-ro, facturx-en16931, fatturapa, ksef-fa3, facturae: inputs the target's official rules need, checked before rendering — error.details.questions[]: id, label, terms, rules, current, kind, options), TARGET_NOT_APPLICABLE (the target syntax cannot represent this invoice, e.g. KSeF without a Polish seller NIP; error.details.reasons), TARGET_ARITHMETIC_UNSUPPORTED (fatturapa / ksef-fa3 / facturae: a line with a price base quantity BT-149 ≠ 1 or line allowances/charges BG-27/BG-28 that the target's per-unit line elements cannot carry within its line-total tolerance — e.g. quantity 0 with a line charge; checked before rendering; error.details.lines[]: line, id, causes[] {bt, value}, reason; error.details.targetLineRule) or INVALID_ANSWERS (answers that could not be applied; details.rejected) |
| 429 | RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt) |
| 500 | INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header |
| 503 | ORACLE_UNAVAILABLE — the official validator did not answer; nothing was changed; retry (Retry-After: 60) |
curl -s -X POST https://www.invoicenavigator.eu/api/v3/convert \
-H "Authorization: Bearer $INVOICE_NAVIGATOR_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile xml invoice.xml '{xml: $xml, target: "en16931-cii"}')" \
| jq 'if .success then .data | {method, lossless, state: .verdict.state, judge: .judge.path} else .error | {code, questions: [.details.questions[]?.id]} end'import { readFileSync, writeFileSync } from 'node:fs'
const xml = readFileSync('invoice.xml', 'utf8')
const res = await fetch('https://www.invoicenavigator.eu/api/v3/convert', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.INVOICE_NAVIGATOR_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ xml, target: 'en16931-cii' }),
})
const body = await res.json()
if (!body.success) {
// 422 MISSING_INPUT: answer details.questions; CONVERSION_LOSSY: details.loss.terms
console.log(res.status, body.error.code, body.error.details?.questions?.map((q) => q.id))
} else {
writeFileSync('invoice.cii.xml', body.data.xml)
console.log(body.data.method, body.data.verdict.state, body.data.judge.path)
}POST /v3/render
Complete human-readable rendering (every BT of the XML). Key: Authorization: Bearer sk_….
A standalone HTML page (format: "html", default) or the structured reading ("json"), in English or German: every business term of the XML under its own label, plus anything outside EN 16931. No validator is called. PDF is not available yet.
| 200 · data.* | Type | Meaning |
|---|---|---|
| format | "html" | "json" | |
| locale | "de" | "en" | |
| syntax | "UBL" | "CII" | |
| values | integer | Values rendered |
| outsideStandard | integer | XML values outside EN 16931, shown under "further details" |
| html | string | format=html: standalone page (inline CSS, no scripts) |
| document | object | format=json: the structured reading |
| Status | When, and the error codes |
|---|---|
| 200 | Rendering |
| 400 | Bad request: INVALID_JSON, INVALID_UTF8 (body not UTF-8; details.offset), MISSING_XML, INVALID_XML (not a string, or more than one of xml / xmlBase64 / pdfBase64), INVALID_BASE64, INVALID_PDF, XML_DOCTYPE_REFUSED |
| 401 | UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key |
| 402 | QUOTA_EXCEEDED — the key used its monthly calls (Free 100, Developer 5,000; counter resets on the 1st, UTC). error.details: used, limit, plan (free|developer), resetsAt, upgradeUrl (a checkout link for this key; Developer: contact), checkoutEndpoint (POST /api/developers/plan/checkout with the key as Bearer → { url }). Counted: 2xx and 422 answers only. An instant test key answers the same code after its 10 requests in total (details.tier "test"). |
| 403 | KEY_INACTIVE |
| 413 | Request body over 4.5 MB — refused by the hosting platform before it reaches the API: text/plain FUNCTION_PAYLOAD_TOO_LARGE, not the JSON error shape. Answers are capped at 4.5 MB too. (The API's own JSON 413 XML_TOO_LARGE / PDF_TOO_LARGE at 10 MB decoded cannot be reached behind that limit.) |
| 422 | XML_ENCODING_CONFLICT (bytes or text contradict their encoding; details: class, offset, declared, bom), MALFORMED_XML (not well-formed; details.line, details.column), PDF_NO_INVOICE (pdfBase64 without an embedded invoice; details.reason), UNSUPPORTED_FORMAT (e.g. "pdf": not available yet; details.supported), UNSUPPORTED_LOCALE (details.supported), NOT_AN_INVOICE |
| 429 | RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt) |
| 500 | INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header |
curl -s -X POST https://www.invoicenavigator.eu/api/v3/render \
-H "Authorization: Bearer $INVOICE_NAVIGATOR_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile xml invoice.xml '{xml: $xml, locale: "de"}')" \
| jq -r .data.html > invoice.htmlimport { readFileSync, writeFileSync } from 'node:fs'
const xml = readFileSync('invoice.xml', 'utf8')
const res = await fetch('https://www.invoicenavigator.eu/api/v3/render', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.INVOICE_NAVIGATOR_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ xml, locale: 'de' }),
})
const body = await res.json()
if (!body.success) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`)
writeFileSync('invoice.html', body.data.html) // standalone page, inline CSS, no scripts
console.log(body.data.values, body.data.outsideStandard)POST /v3/readiness
XRechnung 4.0 readiness: what changes in a 3.0.x invoice (one document or a batch of up to 20). Key: Authorization: Bearer sk_….
Reads an XRechnung 3.0.x invoice (UBL or CII) and classifies every value against the XRechnung 4.0.0 Vorversion 2026-09-15 (semantic model only): unchanged, identical, transform (with the rule), needs-input, not-representable, blocked, outside-model, residual. It says what changes, not whether the invoice is valid under 4.0: not yet possible — KoSIT has not published 4.0 validation artefacts (every response states this in basis). Batch: { documents: [{ name?, xml | xmlBase64 }, …] }, at most 20; each document counts as one call. Read-only; no validator is called. Try it in the browser: XRechnung 4.0 readiness.
| Request body (JSON) · * required | Type | Meaning |
|---|---|---|
| xml | string | The invoice XML as text (UBL 2.1 Invoice/CreditNote or CII D16B). The whole request body may be at most 4.5 MB (hosting platform limit), so about 4 MB of XML. DOCTYPE/ENTITY declarations are refused. Send either xml or xmlBase64. Text is judged as the characters it holds, not the original file bytes: a declared non-UTF-8 encoding is rewritten to UTF-8, and text that shows a lost decoding is refused with 422 XML_ENCODING_CONFLICT (U+FFFD, an unpaired surrogate, or U+FEFF under an 8-bit declaration such as ISO-8859-1). Some conflicts of the original bytes cannot be seen in text at all (a UTF-8 BOM or 8-bit bytes under a UTF-16 declaration; UTF-8 bytes under an ISO-8859-1 declaration, decoded as UTF-8 by your client) — only xmlBase64 is byte-faithful. |
| xmlBase64 | string | The invoice file bytes, base64 (alternative to xml). Base64 adds a third and the request body may be at most 4.5 MB, so the file itself about 3 MB. Decoded as a strict XML parser reads them (BOM, encoding declaration, ISO-8859-1, UTF-16); bytes that contradict their own encoding are refused with 422 XML_ENCODING_CONFLICT (class + byte offset). Prefer this when you read the invoice from a file: a text field cannot carry a non-UTF-8 encoding or invalid bytes faithfully. |
| pdfBase64 | string | A hybrid PDF (ZUGFeRD / Factur-X / XRechnung-in-PDF), base64 (alternative to xml / xmlBase64; validate, fix, convert and render). The embedded invoice XML is taken out byte-exact and then read like xmlBase64: no OCR, no model. The invoice is recognised by its content (CII, UBL), not by its file name or the PDF's declarations. `data.source` then says which attachment was used, with the sha256 of the PDF and of the attachment, and whether the visible pages show the same invoice as the XML. A PDF without an embedded invoice is refused with 422 PDF_NO_INVOICE (details.reason). /fix returns the repaired XML on its own; it is not embedded back into the PDF. Size: base64 adds a third and the request body may be at most 4.5 MB (hosting platform limit), so the PDF itself about 3 MB. |
| documents * | any | any | any[] | At most 20. |
| 200 · data.* | Type | Meaning |
|---|---|---|
| syntax | "UBL" | "CII" | |
| sha256 | string | |
| summary | "no-action" | "automatic" | "needs-attention" | |
| counts | object | |
| changes | ReadinessChange[] | Every value that is not unchanged |
| losses | string[] | |
| basis | ReadinessBasis |
| Status | When, and the error codes |
|---|---|
| 200 | One document: ReadinessResult. Batch: ReadinessBatchResult (a document that cannot be read is ok: false with its own status and error, in place). |
| 400 | Bad request: INVALID_JSON, INVALID_UTF8 (body not UTF-8; details.offset), MISSING_XML, INVALID_XML (not a string, or more than one of xml / xmlBase64 / pdfBase64), INVALID_BASE64, INVALID_PDF, XML_DOCTYPE_REFUSED; BATCH_TOO_LARGE (more than 20 documents; details.max, details.got); INVALID_JSON also for a malformed "documents" array or both a document and "documents" |
| 401 | UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key |
| 402 | QUOTA_EXCEEDED — the key used its monthly calls (Free 100, Developer 5,000; counter resets on the 1st, UTC). error.details: used, limit, plan (free|developer), resetsAt, upgradeUrl (a checkout link for this key; Developer: contact), checkoutEndpoint (POST /api/developers/plan/checkout with the key as Bearer → { url }). Counted: 2xx and 422 answers only. An instant test key answers the same code after its 10 requests in total (details.tier "test"). |
| 403 | KEY_INACTIVE |
| 413 | Request body over 4.5 MB — refused by the hosting platform before it reaches the API: text/plain FUNCTION_PAYLOAD_TOO_LARGE, not the JSON error shape. Answers are capped at 4.5 MB too. (The API's own JSON 413 XML_TOO_LARGE / PDF_TOO_LARGE at 10 MB decoded cannot be reached behind that limit.) |
| 422 | UNSUPPORTED_FORMAT ("The 4.0 readiness check reads XRechnung 3.0.x (UBL or CII)."), XML_ENCODING_CONFLICT (bytes or text contradict their encoding; details: class, offset, declared, bom), MALFORMED_XML (not well-formed; details.line, details.column), PDF_NO_INVOICE (pdfBase64 without an embedded invoice; details.reason) (one document; in a batch these come back per document) |
| 429 | RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt) |
| 500 | INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header |
curl -s -X POST https://www.invoicenavigator.eu/api/v3/readiness \
-H "Authorization: Bearer $INVOICE_NAVIGATOR_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile xml invoice.xml '{xml: $xml}')" \
| jq '.data | {summary, changes: [.changes[] | {bt, class}]}'import { readFileSync } from 'node:fs'
const xml = readFileSync('invoice.xml', 'utf8')
const res = await fetch('https://www.invoicenavigator.eu/api/v3/readiness', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.INVOICE_NAVIGATOR_KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ xml }),
})
const body = await res.json()
if (!body.success) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`)
// summary: no-action | automatic | needs-attention
console.log(body.data.summary, body.data.changes.map((c) => `${c.bt} ${c.class}`))GET /v3/health
Engine and validator status (no key). No key.
No key. validator.kosit is reachable, unreachable (status 503) or disabled. While it is unreachable, validate, fix and convert answer 503 ORACLE_UNAVAILABLE with Retry-After — never a pass.
| 200 · data.* | Type | Meaning |
|---|---|---|
| status | "ok" | "degraded" | |
| version | string | |
| engine | "patch" | |
| llm | false | |
| validator | object | |
| convertTargets | string[] | |
| renderFormats | string[] | |
| time | string | |
| latencyMs | integer | Time this health check took |
| Status | When, and the error codes |
|---|---|
| 200 | Healthy |
| 503 | KoSIT enabled but unreachable (status "degraded"); validate, fix and convert then answer 503 ORACLE_UNAVAILABLE |
curl -s https://www.invoicenavigator.eu/api/v3/health \
| jq '{status, validator, llm}'const res = await fetch('https://www.invoicenavigator.eu/api/v3/health')
const body = await res.json()
console.log(res.status, body.status, body.validator.kosit) // 503 + 'unreachable': validate/fix/convert answer 503 tooGET /v3/openapi.json
This document (no key). No key.
| Status | When, and the error codes |
|---|---|
| 200 | OpenAPI 3.1 |
curl -s https://www.invoicenavigator.eu/api/v3/openapi.json \ | jq '.paths | keys'
const res = await fetch('https://www.invoicenavigator.eu/api/v3/openapi.json')
const body = await res.json()
console.log(Object.keys(body.paths))What is kept, and where it runs
- Invoice content (xml, xmlBase64, pdfBase64) is processed in memory for the call and not stored. No AI model is called (GET /health: llm: false). fix with evidence: true returns its audit trail in the response; nothing is kept.
- Where it runs: the API functions on Vercel in Frankfurt (fra1); the official KoSIT validator on a DigitalOcean server in Amsterdam. Processors: /legal/sub-processors.
- Per authenticated call one request-log row: time, endpoint, method, IP address and user agent — no invoice content. These rows are deleted after 90 days.
- Free key and Developer plan: one usage row per counted call (time, endpoint, status, response time, IP address, user agent, request id), deleted after 90 days.
- On the key: its SHA-256 hash and last four characters (the key itself is shown once), total and monthly call counters, the time of last use and, for keys created without an account, the creating IP address and the e-mail address if you gave one.
- CORS: /api/v3 does not answer cross-origin browser requests from other sites. Call it from your server and keep the key there.
v2 is deprecated for new integrations
v1 and v2 keep working. Their repair endpoints (/v2/validate-and-fix, /v1/fixer/fix) still run the earlier engine, which rebuilds the document; v3 patches it. New integrations should use v3. We will not switch v2 off without at least six months notice by e-mail to key owners and on the changelog. Within v3, changes are additive; a breaking change gets a new path (/api/v4).