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.

Start

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 · free key
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 · test key
curl -s -X POST https://www.invoicenavigator.eu/api/developers/instant-key | jq -r .apiKey
curl · validate invoice.xml
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.

Endpoints
EndpointDoesKey
Validate
POST /v3/validateOfficial verdict with structured findingsany key
Fix
POST /v3/fixRepair with the patch engine; answer open questions in the same callany key
Convert
POST /v3/convertConvert to another syntax / CIUS, with the verdict of the outputany key
Render
POST /v3/renderComplete human-readable rendering (every BT of the XML)any key
Readiness
POST /v3/readinessXRechnung 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/healthEngine and validator status (no key)no key
GET /v3/openapi.jsonThis 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.

Every call

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.

Envelope
{ "success": true, "data": { … }, "meta": { "processingTimeMs": 812, "testMode": true /* sk_test_ keys only */ } }
{ "success": false, "error": { "code": "MISSING_INPUT", "message": "…", "details": { … } } }
HeaderOnMeaning
X-Request-Idevery responseIdentifier of this call. Log it; quote it when you write to us.
X-Processing-Time-Msevery responseServer time spent on the call, in milliseconds.
X-RateLimit-Limitevery authenticated responseRequests allowed per sliding hour for this key.
X-RateLimit-Remainingevery authenticated responseRequests left in the current hour.
X-RateLimit-Resetevery authenticated responseUnix seconds at which the window resets.
Retry-After429 onlySeconds to wait before the next attempt.
X-Test-Modesk_test_ keys onlySet to "true"; the body carries meta.testMode as well.
X-Usage-Usedmetered live responsesRequests counted this month, after this call.
X-Usage-Includedmetered live responsesRequests included in the plan for the month.
X-Usage-Overagemetered live responsesRequests beyond the included amount (0 while quotas are hard caps).
X-Usage-Period-Endmetered live responsesDate 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.

Limits

Per key

KeyPer hourPer monthHow you get it
Free key sk_live_60100POST /api/developers/free-key, no account; at most 3 keys per IP address per 24 h
Developer plan sk_live_1005,000€49/month excl. VAT on the same key: /developers/upgrade or POST /api/developers/plan/checkout
Instant test key sk_test_10010 in total, 1 hourPOST /api/developers/instant-key, no account; at most 10 keys per IP address per 24 h
Account test key sk_test_100not meteredcreated 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.

data.findings[]
{
  "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.*TypeMeaning
validboolean
syntax"UBL" | "CII" | null
verdictVerdict
countsobject
findingsFinding[]Official findings, plus line-arithmetic warnings (oracle "invoice-navigator-line-arithmetic"; see lineArithmetic)
lineArithmeticLineArithmeticWarning[]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.
actionsobject[]Deduped actions for all error codes
sha256string
sourcePdfSource
StatusWhen, and the error codes
200Verdict (an invalid invoice is still 200; see data.valid)
400Bad 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
401UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key
402QUOTA_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").
403KEY_INACTIVE
413Request 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.)
422XML_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)
429RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt)
500INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header
503ORACLE_UNAVAILABLE — the official validator did not answer; nothing was changed; retry (Retry-After: 60)
curl
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]}'
Node 18+ · example.mjs
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.*TypeMeaning
outcomeenumOne of: already_compliant, compliant, partial, needs_input, lossy_refused.
validboolean
syntax"UBL" | "CII"
xmlstring | nullThe repaired document; null if it would lose content
sha256string | null
verdictVerdict
changesobject[]
patchesobject[]The edits applied to your document (set_text / set_attr / insert_tree / remove_node)
remainingFinding[]
questionsQuestion[]
answersobject
fidelityobject
patchGapsstring[]
mode"strict" | "permissive"
evidenceEvidence
sourcePdfSource
StatusWhen, and the error codes
200Repair result
400Bad 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)
401UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key
402QUOTA_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").
403KEY_INACTIVE
413Request 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.)
422XML_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
429RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt)
500INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header
503ORACLE_UNAVAILABLE — the official validator did not answer; nothing was changed; retry (Retry-After: 60)
curl
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]}'
Node 18+ · example.mjs
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)

AspectTypeMeaning
syntaxUBLEN 16931 CIUS
checked before rendering422 MISSING_INPUTXRechnung 3.0.2 schematron (CEN + CIUS) + UBL 2.1 XSD; whitespace-only values are dropped instead of asked
judgeproduction-oraclesInvoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario)
known gaps0none — every EN 16931 term has its element

xrechnung-cii — XRechnung 3.0 (CII)

AspectTypeMeaning
syntaxCIIEN 16931 CIUS
checked before rendering422 MISSING_INPUTXRechnung 3.0.2 schematron (CEN + CIUS) + CII D16B XSD; whitespace-only values are dropped instead of asked
judgeproduction-oraclesInvoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario)
known gaps0none — every EN 16931 term has its element

peppol-bis — Peppol BIS Billing 3.0 (UBL)

AspectTypeMeaning
syntaxUBLEN 16931 CIUS
checked before rendering422 MISSING_INPUTPeppol BIS 3.0.19 schematron (CEN + PEPPOL) + UBL 2.1 XSD; whitespace-only values are dropped instead of asked
judgeproduction-oraclesInvoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario)
known gaps0none — every EN 16931 term has its element

en16931-ubl — EN 16931 (UBL)

AspectTypeMeaning
syntaxUBLEN 16931 CIUS
checked before rendering—no requirement gate: the output is rendered and judged
judgeproduction-oraclesInvoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario)
known gaps0none — every EN 16931 term has its element

en16931-cii — EN 16931 (CII; the XML of Factur-X / ZUGFeRD EN 16931)

AspectTypeMeaning
syntaxCIIEN 16931 CIUS
checked before rendering—no requirement gate: the output is rendered and judged
judgeproduction-oraclesInvoice Navigator production oracle path: UBL/CII XSD + CEN EN 16931 schematron + the KoSIT validator (XRechnung or Peppol configuration, EN 16931 scenario)
known gaps0none — every EN 16931 term has its element

nl-si-ubl — NLCIUS / SI-UBL 2.0 (UBL, Netherlands)

AspectTypeMeaning
syntaxUBLEN 16931 CIUS
checked before rendering422 MISSING_INPUTSI-UBL 2.0 schematron + UBL 2.1 XSD
judgein-process-officialUBL 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 gaps0none — every EN 16931 term has its element

cius-ro — CIUS-RO 1.0.1 (UBL, Romania RO e-Factura)

AspectTypeMeaning
syntaxUBLEN 16931 CIUS
checked before rendering422 MISSING_INPUTCIUS-RO 1.0.9 schematron + UBL 2.1 XSD
judgein-process-officialUBL 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 gaps0none — every EN 16931 term has its element
limits1A 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)

AspectTypeMeaning
syntaxCIIEN 16931 CIUS
checked before rendering422 MISSING_INPUTFactur-X 1.09.2 EN 16931 schematron + Factur-X EN 16931 XSD
judgein-process-officialFactur-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 gaps0none — every EN 16931 term has its element
limits1XML only (the factur-x.xml of the hybrid); PDF/A-3 embedding is not part of this call.
before sendingThis 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)

AspectTypeMeaning
syntaxFatturaPAnational syntax (not EN 16931)
checked before rendering422 MISSING_INPUTFatturaPA FPR12 1.2.3 XSD + SdI controls (Elenco controlli v2.0), national data as answer slots
judgein-process-officialFatturaPA 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 gaps97terms 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, …
limits3Line 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 sendingTransmit 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-24 customizationId (no element available): specification identifier is the syntax itself (FPR12 / FA (3))
  • BT-23 profileId (no element available): no business-process identifier
  • BT-10 buyerReference (no element available): no buyer reference element
  • BT-34 seller.electronicAddress* (no element available): no seller electronic address (routing is by SdI code / KSeF NIP)
  • BT-49 buyer.electronicAddress* (no element available): no buyer electronic address in EN 16931 sense (FatturaPA CodiceDestinatario is an SdI channel code, asked separately)
  • BT-41 seller.contact.name (no element available): contact blocks carry phone/e-mail only
  • BT-56..58 buyer.contact* (no element available): FatturaPA has no buyer contact
  • BT-36 seller.address.additionalStreet (no element available): single address line (FatturaPA Indirizzo / KSeF AdresL1 holds street only)
  • BT-51 buyer.address.additionalStreet (no element available): single address line
  • BT-154 lines[].itemDescription (no element available): one description element per line (item name)
  • BT-121 taxBreakdown[].exemptionCode (no element available): no VATEX code list
  • BT-98/105 documentAllowanceCharges[].reasonCode (no element available): document allowances become lines; no reason code
  • BT-93/100 documentAllowanceCharges[].baseAmount (no element available): no base amount for the allowance line
  • BT-94/101 documentAllowanceCharges[].percentage (no element available): no percentage for the allowance line
  • BT-20 paymentTerms* (no element available): no free-text payment terms
  • BT-70 delivery.name (no element available): no deliver-to party name
  • BT-71 delivery.locationId* (no element available): no deliver-to location identifier
  • BT-81 paymentMeans.code (element loses part of the value): national payment-method list is coarser (UNTDID 30/31/58 all → bank transfer)
  • BT-30 seller.companyId* (no element available): no legal registration identifier of the EN 16931 kind
  • BT-47 buyer.companyId* (no element available): no legal registration identifier of the EN 16931 kind
  • BT-29 seller.partyIdentifier* (no element available): no seller identifier
  • BT-46 buyer.partyIdentifier* (no element available): no buyer identifier
  • BT-6 taxCurrencyCode (no element available): VAT in accounting currency is not modelled as a currency code
  • BT-111 taxTotalInTaxCurrency (no element available): see BT-6
  • BT-76 delivery.address.additionalStreet (no element available): single address line
  • BT-53 buyer.address.postalCode (element loses part of the value): CAP must be 5 digits; foreign postcodes become 00000
  • BT-38 seller.address.postalCode (element loses part of the value): CAP must be 5 digits
  • BT-78 delivery.address.postalCode (element loses part of the value): CAP must be 5 digits
  • BT-54 buyer.address.countrySubentity (element loses part of the value): Provincia only for Italian addresses (2-letter sigla)
  • BT-39 seller.address.countrySubentity (element loses part of the value): Provincia only for Italian addresses
  • BT-79 delivery.address.countrySubentity (element loses part of the value): Provincia only for Italian addresses
  • BT-42 seller.contact.phone (element loses part of the value): Telefono is 5–12 ASCII characters
  • BT-83 paymentMeans.paymentId (element loses part of the value): CodicePagamento max 60 characters
  • BT-118 taxBreakdown[].categoryId (element loses part of the value): Natura → EN 16931 category is many-to-one (N2.1 can be AE or O)
  • BT-151 lines[].taxCategory.id (element loses part of the value): see BT-118
  • BT-95/102 documentAllowanceCharges[].taxCategoryId (element loses part of the value): see BT-118
  • BT-126 lines[].id (element loses part of the value): NumeroLinea is an integer 1–9999
  • BT-97/104 documentAllowanceCharges[].reason (element loses part of the value): a missing reason is rendered as Sconto/Maggiorazione (Descrizione is mandatory)
  • BT-3 typeCode (element loses part of the value): TipoDocumento covers 380/381/383/386; others become TD01
  • BG-14 invoicePeriod* (element loses part of the value): period exists per line only; header period restored when all lines agree
  • BT-9 dueDate (element loses part of the value): due date lives in DatiPagamento, absent without payment means
  • BT-21 noteSubjectCodes (no element available): notes have no subject code (Causale / StopkaFaktury are plain text)
  • BT-7 taxPointDate (no element available): no tax point date distinct from the issue date (P_6 / DataOraConsegna are delivery dates)
  • BT-8 vatDueDateTypeCode (no element available): no VAT due date type code (FatturaPA EsigibilitaIVA and KSeF P_16 are answered national regimes)
  • BT-11 references.project (no element available): no free project reference (FatturaPA CodiceCUP is a 15-character Italian code inside an order/contract block)
  • BT-14 references.salesOrder (no element available): no seller order reference
  • BT-17 references.tender (no element available): no tender/lot reference (FatturaPA CodiceCIG only inside an order/contract block with a mandatory IdDocumento)
  • BT-18 references.invoicedObject* (no element available): no invoiced object identifier
  • BT-19 references.buyerAccounting (no element available): no document-level buyer accounting reference (FatturaPA RiferimentoAmministrazione is per line)
  • BT-28 seller.tradingName (no element available): one party name (Denominazione / Nazwa = legal name)
  • BT-45 buyer.tradingName (no element available): one party name
  • BT-33 seller.legalForm (no element available): no free-text additional legal information (FatturaPA IscrizioneREA is the register entry)
  • BT-162 seller.address.line3 (no element available): single address line
  • BT-163 buyer.address.line3 (no element available): single address line
  • BT-29 seller.additionalIdentifiers* (no element available): no seller identifier (see BT-29)
  • BT-82 paymentMeansText (no element available): payment means is a code (ModalitaPagamento / FormaPlatnosci), no text
  • BG-18 paymentCard* (no element available): no card account (FatturaPA MP08 / KSeF FormaPlatnosci 2 say "card", nothing more)
  • BG-19 directDebit* (no element available): no mandate reference, creditor identifier or debited account
  • BT-113 totals.prepaidAmount (no element available): no paid-amount term (FatturaPA ImportoPagamento / KSeF DoZaplaty state the amount due only)
  • BG-24 attachments* (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 file
  • BG-10 payee* (no element available): no payee party (FatturaPA Beneficiario carries BT-85; KSeF Podmiot3 needs a Polish/EU tax identification)
  • BT-64..69,BT-164 taxRepresentative.address* (element loses part of the value): RappresentanteFiscale carries VAT id and name, no address
  • BT-16 references.despatchAdvice (no element available): DatiDDT needs DataDDT (mandatory); BT-16 has no date
  • BG-16/17 additionalPaymentMeans* (no element available): every DettaglioPagamento needs its own ImportoPagamento; extra BG-16/17 accounts carry no amount
  • BT-127 lines[].note (no element available): one Descrizione per line (= BT-153)
  • BT-128 lines[].objectId* (no element available): no line object identifier
  • BT-132 lines[].orderLineReference (no element available): order line numbers live in a DatiOrdineAcquisto block per order (NumItem + RiferimentoNumeroLinea, IdDocumento mandatory), not on the line
  • BG-26 lines[].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 read
  • BT-148 lines[].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-147 lines[].priceDiscount (no element available): see BT-148
  • BT-149/150 lines[].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 holds
  • BG-27/28 lines[].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 element
  • BT-158 lines[].classifications* (no element available): CodiceArticolo carries BT-155/156/157; no distinct place for a classification with list id and version
  • BT-159 lines[].originCountry (no element available): no country of origin
  • BG-32 lines[].attributes* (no element available): AltriDatiGestionali (TipoDato ≤ 10 characters) is the generic container, also used for the residual
  • BT-32-1 seller.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 buyer
  • BG-25 lines[].subLines (no element available): XRechnung sub-invoice lines (BG-DEX / SubInvoiceLine) have no nesting in the national syntax
  • BT-DEX-001,BT-DEX-002,BT-DEX-003 thirdPartyPayments* (no element available): XRechnung third-party payment (BG-DEX-09, UBL PrepaidPayment) has no element
  • X-PROJECT-NAME references.projectName (no element available): the CII project name (SpecifiedProcuringProject/Name, no BT) has no element
  • BT-27 seller.registrationName (element loses part of the value): one party name (Denominazione): a legal name that differs from the name is not kept
  • BT-44 buyer.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-15 delivery.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 line
  • BT-107 declaredAllowanceTotal (no element available): document allowances become lines; no allowance total
  • BT-108 declaredChargeTotal (no element available): document charges become lines; no charge total
  • X-LINE-EXEMPTION lines[].taxExemptionReason (no element available): an exemption reason exists per DatiRiepilogo (RiferimentoNormativo), not per line
  • BT-114 payableRoundingAmount (element exists, not written yet): DatiGeneraliDocumento/Arrotondamento exists; not mapped
  • BT-146 lines[].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 value
  • X-LINE-STATUS lines[].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 element
  • BT-84 paymentMeans.proprietaryId (element loses part of the value): one account number per payment (the IBAN); a proprietary account id stated next to it is not kept
  • BT-46 buyer.additionalIdentifiers* (no element available): no buyer identifier besides the tax ids
  • X-LINE-EXEMPTION-CODE lines[].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 DatiRiepilogo
  • BT-69 taxRepresentative.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)

AspectTypeMeaning
syntaxKSeFnational syntax (not EN 16931)
checked before rendering422 MISSING_INPUTKSeF FA(3) XSD + FA(3) consistency rules, national data as answer slots; whitespace-only values are dropped instead of asked
judgein-process-officialKSeF 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 gaps97terms 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, …
limits3Line 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 sendingSubmit 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-24 customizationId (no element available): specification identifier is the syntax itself (FPR12 / FA (3))
  • BT-23 profileId (no element available): no business-process identifier
  • BT-10 buyerReference (no element available): no buyer reference element
  • BT-34 seller.electronicAddress* (no element available): no seller electronic address (routing is by SdI code / KSeF NIP)
  • BT-49 buyer.electronicAddress* (no element available): no buyer electronic address in EN 16931 sense (FatturaPA CodiceDestinatario is an SdI channel code, asked separately)
  • BT-41 seller.contact.name (no element available): contact blocks carry phone/e-mail only
  • BT-56 buyer.contact.name (no element available): Podmiot2/DaneKontaktowe carries e-mail and phone only; no contact name
  • BT-36 seller.address.additionalStreet (no element available): single address line (FatturaPA Indirizzo / KSeF AdresL1 holds street only)
  • BT-51 buyer.address.additionalStreet (no element available): single address line
  • BT-154 lines[].itemDescription (no element available): one description element per line (item name)
  • BT-121 taxBreakdown[].exemptionCode (no element available): no VATEX code list
  • BT-98/105 documentAllowanceCharges[].reasonCode (no element available): document allowances become lines; no reason code
  • BT-93/100 documentAllowanceCharges[].baseAmount (no element available): no base amount for the allowance line
  • BT-94/101 documentAllowanceCharges[].percentage (no element available): no percentage for the allowance line
  • BT-20 paymentTerms* (no element available): no free-text payment terms
  • BT-70 delivery.name (no element available): no deliver-to party name
  • BT-71 delivery.locationId* (no element available): no deliver-to location identifier
  • BT-81 paymentMeans.code (element loses part of the value): national payment-method list is coarser (UNTDID 30/31/58 all → bank transfer)
  • BT-30 seller.companyId* (no element available): no legal registration identifier of the EN 16931 kind
  • BT-47 buyer.companyId* (no element available): no legal registration identifier of the EN 16931 kind
  • BT-29 seller.partyIdentifier* (no element available): no seller identifier
  • BT-46 buyer.partyIdentifier* (no element available): no buyer identifier
  • BT-6 taxCurrencyCode (no element available): VAT in accounting currency is not modelled as a currency code
  • BT-111 taxTotalInTaxCurrency (no element available): see BT-6
  • BT-76 delivery.address.additionalStreet (no element available): single address line
  • BT-38 seller.address.postalCode (element loses part of the value): address is two free-text lines (AdresL1/L2); structure re-split heuristically
  • BT-37 seller.address.city (element loses part of the value): see BT-38
  • BT-53 buyer.address.postalCode (element loses part of the value): address is two free-text lines; postcodes with spaces cannot be split back
  • BT-52 buyer.address.city (element loses part of the value): see BT-53
  • BT-39 seller.address.countrySubentity (no element available): no country subdivision
  • BT-54 buyer.address.countrySubentity (no element available): no country subdivision
  • BG-15 delivery.address* (no element available): no deliver-to address
  • BT-32 seller.taxNumber (no element available): NIP is the only seller tax id
  • BT-48 buyer.taxNumber (no element available): NIP / NrVatUE / NrID only; the P8 reader reads a second buyer tax registration as BT-48 too
  • BT-156 lines[].buyersItemId (no element available): no buyer item identifier (Indeks = seller item id)
  • BT-157-1 lines[].itemIdScheme (element loses part of the value): only GTIN has an element; other schemes are lost
  • BT-157 lines[].itemId (element loses part of the value): only GTIN (scheme 0160) has an element
  • BT-126 lines[].id (element loses part of the value): NrWierszaFa is a natural number
  • BG-20/21 documentAllowanceCharges* (element loses part of the value): no document-level allowance/charge: rendered as FaWiersz with negative/positive value, read back as a line
  • BT-107 declaredAllowanceTotal (element loses part of the value): see BG-20
  • BT-108 declaredChargeTotal (element loses part of the value): see BG-21
  • BT-149/150 lines[].baseQuantity* (no element available): no price base quantity: P_9A is the per-unit price BT-146 / BT-149 (8 decimals)
  • BG-27/28 lines[].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 unit
  • BT-146 lines[].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 unit
  • BG-25 lines* (element loses part of the value): allowance/charge lines appear as extra lines when read back natively
  • BT-106 totals.lineExtensionAmount (element loses part of the value): derived from FaWiersz incl. allowance lines
  • BT-120 taxBreakdown[].exemptionReason (element loses part of the value): exemption basis is P_19A/B/C (asked), not the EN 16931 reason text
  • BT-116 taxBreakdown[].taxableAmount (element loses part of the value): P_13_x buckets merge categories that share a bucket
  • BG-23 taxBreakdown* (element loses part of the value): VAT breakdown is per P_13_x bucket, not per (category, rate)
  • BT-151/152 lines[].taxCategory* (element loses part of the value): P_12 rate codes: 0 KR / 0 WDT / 0 EX / zw / np / oo → category is many-to-one
  • BT-83 paymentMeans.paymentId (no element available): no remittance information element
  • BT-85 paymentMeans.accountName (element loses part of the value): OpisRachunku (account description) is the nearest element
  • BT-22 notes* (element loses part of the value): free notes go to Stopka/Informacje; order kept
  • BG-13 delivery* (element loses part of the value): only the delivery date (P_6) exists, and P_6 excludes the invoice period (OkresFa)
  • BG-14 invoicePeriod* (element loses part of the value): OkresFa and P_6 are mutually exclusive
  • BT-26 precedingInvoices[].issueDate (element loses part of the value): DataWystFaKorygowanej is mandatory; asked when missing
  • BT-3 typeCode (element loses part of the value): RodzajFaktury VAT/KOR/ZAL; 384 and 381 both become KOR
  • BT-27 seller.registrationName (element loses part of the value): one name (Nazwa)
  • BT-21 noteSubjectCodes (no element available): notes have no subject code (Causale / StopkaFaktury are plain text)
  • BT-7 taxPointDate (no element available): no tax point date distinct from the issue date (P_6 / DataOraConsegna are delivery dates)
  • BT-8 vatDueDateTypeCode (no element available): no VAT due date type code (FatturaPA EsigibilitaIVA and KSeF P_16 are answered national regimes)
  • BT-11 references.project (no element available): no free project reference (FatturaPA CodiceCUP is a 15-character Italian code inside an order/contract block)
  • BT-14 references.salesOrder (no element available): no seller order reference
  • BT-17 references.tender (no element available): no tender/lot reference (FatturaPA CodiceCIG only inside an order/contract block with a mandatory IdDocumento)
  • BT-18 references.invoicedObject* (no element available): no invoiced object identifier
  • BT-19 references.buyerAccounting (no element available): no document-level buyer accounting reference (FatturaPA RiferimentoAmministrazione is per line)
  • BT-28 seller.tradingName (no element available): one party name (Denominazione / Nazwa = legal name)
  • BT-45 buyer.tradingName (no element available): one party name
  • BT-33 seller.legalForm (no element available): no free-text additional legal information (FatturaPA IscrizioneREA is the register entry)
  • BT-162 seller.address.line3 (no element available): single address line
  • BT-163 buyer.address.line3 (no element available): single address line
  • BT-29 seller.additionalIdentifiers* (no element available): no seller identifier (see BT-29)
  • BT-82 paymentMeansText (no element available): payment means is a code (ModalitaPagamento / FormaPlatnosci), no text
  • BG-18 paymentCard* (no element available): no card account (FatturaPA MP08 / KSeF FormaPlatnosci 2 say "card", nothing more)
  • BG-19 directDebit* (no element available): no mandate reference, creditor identifier or debited account
  • BT-113 totals.prepaidAmount (no element available): no paid-amount term (FatturaPA ImportoPagamento / KSeF DoZaplaty state the amount due only)
  • BG-24 attachments* (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 file
  • BG-10 payee* (no element available): no payee party (FatturaPA Beneficiario carries BT-85; KSeF Podmiot3 needs a Polish/EU tax identification)
  • BG-11 taxRepresentative* (no element available): no seller tax representative (PodmiotUpowazniony is an authorised body, not BG-11)
  • BT-81 additionalPaymentMeans[].code (element loses part of the value): one FormaPlatnosci for all RachunekBankowy (see BT-81)
  • BT-15 references.receivingAdvice (no element available): no receiving advice reference
  • BT-114 payableRoundingAmount (no element available): no rounding term (Rozliczenie charges/deductions are free-text reasons)
  • BT-115 totals.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 for
  • BG-3 precedingInvoices* (element loses part of the value): preceding invoices exist only on a correction (KOR DaneFaKorygowanej); a VAT invoice has no BG-3 element
  • BT-32-1 seller.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 buyer
  • BG-25 lines[].subLines (no element available): XRechnung sub-invoice lines (BG-DEX / SubInvoiceLine) have no nesting in the national syntax
  • BT-DEX-001,BT-DEX-002,BT-DEX-003 thirdPartyPayments* (no element available): XRechnung third-party payment (BG-DEX-09, UBL PrepaidPayment) has no element
  • X-PROJECT-NAME references.projectName (no element available): the CII project name (SpecifiedProcuringProject/Name, no BT) has no element
  • X-LINE-STATUS lines[].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 element
  • BT-84 paymentMeans.proprietaryId (element loses part of the value): one account number per payment (the IBAN); a proprietary account id stated next to it is not kept
  • BT-46 buyer.additionalIdentifiers* (no element available): no buyer identifier besides the tax ids
  • BT-82 additionalPaymentMeans[].text (no element available): RachunekBankowy has no payment means text
  • BG-16 additionalPaymentMeans* (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 one
  • BT-84 paymentMeans.iban (element loses part of the value): see additionalPaymentMeans: with one payment form, the first RachunekBankowy is read back as the main account
  • BT-86 paymentMeans.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)

AspectTypeMeaning
syntaxFacturaenational syntax (not EN 16931)
checked before rendering422 MISSING_INPUTFacturae 3.2.2 XSD, national data as answer slots
judgein-process-officialFacturae 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 gaps115terms 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, …
limits3Line 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 sendingUnsigned: 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-24 customizationId (no element available): specification identifier is the syntax (SchemaVersion 3.2.2)
  • BT-23 profileId (no element available): no business-process identifier
  • BT-10 buyerReference (element loses part of the value): ReceiverTransactionReference holds 20 characters
  • BT-34 seller.electronicAddress* (no element available): no electronic address (FACe routing uses DIR3 administrative centres)
  • BT-49 buyer.electronicAddress* (no element available): no electronic address
  • BT-36 seller.address.additionalStreet (no element available): single address line
  • BT-51 buyer.address.additionalStreet (no element available): single address line
  • BT-53 buyer.address.postalCode (element loses part of the value): foreign address: PostCodeAndTown is one free-text field
  • BT-52 buyer.address.city (element loses part of the value): see BT-53; and (P19b) Town holds 50 characters (TextMax50Type), PostCodeAndTown 50: a longer city is cut
  • BT-54 buyer.address.countrySubentity (element loses part of the value): Province is mandatory; when BT-54 is absent it carries the answered province, indistinguishable on read
  • BT-39 seller.address.countrySubentity (element loses part of the value): see BT-54
  • BT-157 lines[].itemId* (no element available): ArticleCode is the seller article code only
  • BT-157-1 lines[].itemIdScheme (no element available): see BT-157
  • BT-156 lines[].buyersItemId (no element available): no buyer item identifier
  • BT-130 lines[].quantityUnit (element loses part of the value): Facturae unit list 01–36; others (e.g. DAY) become 05 Otros
  • BT-151,BT-152 lines[].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-118 taxBreakdown[].categoryId (element loses part of the value): see BT-151
  • BT-121 taxBreakdown[].exemptionCode (no element available): no VATEX code list
  • BT-120 taxBreakdown[].exemptionReason (element loses part of the value): reason lives on the line SpecialTaxableEvent; none for Z/S
  • BT-98/105 documentAllowanceCharges[].reasonCode (no element available): Discount/Charge have no reason code
  • BT-93/100 documentAllowanceCharges[].baseAmount (no element available): Discount/Charge have no base amount
  • BT-95/102 documentAllowanceCharges[].taxCategoryId (element loses part of the value): GeneralDiscounts carry no VAT category; read back only when one standard-rated group exists
  • BT-96/103 documentAllowanceCharges[].taxPercent (element loses part of the value): see BT-95
  • BT-20 paymentTerms* (no element available): no free-text payment terms
  • BT-81 paymentMeans.code (element loses part of the value): Facturae PaymentMeans 01–19: 30/31/58 all → 04 transferencia
  • BT-85 paymentMeans.accountName (no element available): no account name
  • BT-86 paymentMeans.bic (element loses part of the value): BIC must be 11 characters: 8-character BICs gain the XXX branch code
  • BT-70 delivery.name (no element available): no deliver-to party
  • BT-71 delivery.locationId* (no element available): no deliver-to location
  • BG-15 delivery.address* (no element available): no deliver-to address
  • BT-30 seller.companyId* (no element available): no legal registration id of the EN 16931 kind (RegistrationData is the Registro Mercantil entry)
  • BT-47 buyer.companyId* (no element available): see BT-30
  • BT-29 seller.partyIdentifier* (no element available): no seller identifier
  • BT-46 buyer.partyIdentifier* (no element available): no buyer identifier
  • BT-32 seller.taxNumber (no element available): one tax identification number per party
  • BT-22 notes* (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-39
  • BT-111 taxTotalInTaxCurrency (no element available): TaxCurrencyCode exists, the amount in that currency per Tax only via EquivalentInEuros
  • BT-32-1 seller.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 buyer
  • BG-25 lines[].subLines (no element available): XRechnung sub-invoice lines (BG-DEX / SubInvoiceLine) have no nesting in the national syntax
  • BT-DEX-001,BT-DEX-002,BT-DEX-003 thirdPartyPayments* (no element available): XRechnung third-party payment (BG-DEX-09, UBL PrepaidPayment) has no element
  • X-PROJECT-NAME references.projectName (no element available): the CII project name (SpecifiedProcuringProject/Name, no BT) has no element
  • BT-21 noteSubjectCodes (no element available): InvoiceDescription is one text; no subject code
  • BT-7 taxPointDate (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-8 vatDueDateTypeCode (no element available): no VAT due date type code
  • BT-11 references.project (no element available): no project reference
  • BT-12 references.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 written
  • BT-13 references.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 written
  • BT-14 references.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 written
  • BT-15 references.receivingAdvice (no element available): no receiving advice reference
  • BT-16 references.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 written
  • BT-17 references.tender (no element available): no tender reference
  • BT-18 references.invoicedObject* (no element available): no invoiced object identifier
  • BT-19 references.buyerAccounting (no element available): no buyer accounting reference
  • BT-28 seller.tradingName (element loses part of the value): LegalEntity/TradeName holds 40 characters (TextMax40Type): a longer trading name is cut (P15e)
  • BT-45 buyer.tradingName (element loses part of the value): LegalEntity/TradeName holds 40 characters (TextMax40Type): a longer trading name is cut (P15e)
  • BT-33 seller.legalForm (no element available): no free-text legal information (RegistrationData is the register entry)
  • BT-162 seller.address.line3 (no element available): single address line
  • BT-163 buyer.address.line3 (no element available): single address line
  • BT-29 seller.additionalIdentifiers* (no element available): no seller identifier
  • BT-46 buyer.additionalIdentifiers* (no element available): no buyer identifier
  • BT-37 seller.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 cut
  • BT-38 seller.address.postalCode (element loses part of the value): see BT-37
  • BT-48 buyer.taxNumber (no element available): one TaxIdentificationNumber per party (BT-48); the P8 reader reads a second buyer PartyTaxScheme as BT-48 too
  • BT-3 typeCode (element loses part of the value): InvoiceClass OO / OR: only 380 and 381 have an equivalent; other type codes become 380 or 381
  • BG-3 precedingInvoices* (element loses part of the value): Corrective names one corrected invoice (InvoiceNumber) and no issue date
  • BT-82 paymentMeansText (no element available): PaymentMeans is a code
  • BT-83 paymentMeans.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 place
  • BG-18 paymentCard* (no element available): no card account
  • BG-19 directDebit* (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-17 additionalPaymentMeans* (element loses part of the value): each Installment has one AccountToBeCredited and its own InstallmentAmount; extra accounts carry no amount
  • BT-114 payableRoundingAmount (no element available): InvoiceTotals have no rounding amount
  • BT-107 declaredAllowanceTotal (element loses part of the value): TotalGeneralDiscounts is written from the discounts; a declared total is not kept
  • BT-108 declaredChargeTotal (element loses part of the value): TotalGeneralSurcharges is written from the charges; a declared total is not kept
  • BG-20/21 documentAllowanceCharges* (element loses part of the value): GeneralDiscounts precede GeneralSurcharges: a mixed order of allowances and charges is not kept (each value still is)
  • BG-24 attachments* (element exists, not written yet): AdditionalData/RelatedDocuments/Attachment carries an embedded file (format, encoding, data; no BT-122 id or BT-124 URI); not mapped
  • BG-10 payee* (no element available): no payee party (FactoringAssignmentData/Assignee is a factoring assignee)
  • BG-11,BT-164 taxRepresentative* (no element available): no seller tax representative
  • BT-126 lines[].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 position
  • BT-127 lines[].note (no element available): one free-text element per line besides ItemDescription (BT-153): AdditionalLineItemInformation, which carries BT-154 (P15e)
  • BT-128 lines[].objectId* (no element available): no line object identifier
  • BT-132 lines[].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-133 lines[].accountingReference (no element available): no line accounting reference
  • BG-26 lines[].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/28 lines[].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 amount
  • BT-148 lines[].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-147 lines[].priceDiscount (no element available): see BT-148
  • BT-149/150 lines[].baseQuantity* (no element available): no price base quantity: P18b writes UnitPriceWithoutTax = BT-146 / BT-149 (8 decimals), so TotalCost = Quantity × UnitPriceWithoutTax holds
  • BT-158 lines[].classifications* (no element available): no item classification
  • BT-159 lines[].originCountry (no element available): no country of origin
  • BG-32 lines[].attributes* (no element available): no item attributes
  • X-LINE-EXEMPTION lines[].taxExemptionReason (element loses part of the value): SpecialTaxableEventReason per line is taken from the VAT breakdown, not from a line reason
  • X-LINE-STATUS lines[].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 element
  • BT-84 paymentMeans.proprietaryId (element loses part of the value): one account number per payment (the IBAN); a proprietary account id stated next to it is not kept
  • BT-84 paymentMeans.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 cut
  • BT-27 seller.name (element loses part of the value): CorporateName holds 80 characters (TextMax80Type): a longer name is cut
  • BT-27 seller.registrationName (element loses part of the value): see seller.name (the legal name is CorporateName)
  • BT-44 buyer.name (element loses part of the value): CorporateName holds 80 characters (TextMax80Type): a longer name is cut
  • BT-44 buyer.registrationName (element loses part of the value): see buyer.name
  • BT-41 seller.contact.name (element loses part of the value): ContactDetails/ContactPersons holds 40 characters (TextMax40Type): a longer contact name is cut
  • BT-42 seller.contact.phone (element loses part of the value): ContactDetails/Telephone holds 15 characters (TextMax15Type): a longer number is cut
  • BT-43 seller.contact.email (element loses part of the value): ContactDetails/ElectronicMail holds 60 characters (TextMax60Type): a longer address is cut
  • BT-56 buyer.contact.name (element loses part of the value): ContactDetails/ContactPersons holds 40 characters (TextMax40Type): a longer contact name is cut
  • BT-57 buyer.contact.phone (element loses part of the value): ContactDetails/Telephone holds 15 characters (TextMax15Type): a longer number is cut
  • BT-58 buyer.contact.email (element loses part of the value): ContactDetails/ElectronicMail holds 60 characters (TextMax60Type): a longer address is cut
  • BT-146 lines[].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-CODE lines[].taxExemptionReasonCode (no element available): no exemption reason code per line (SpecialTaxableEventReason is text, taken from the VAT breakdown)
  • BT-6 taxCurrencyCode (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 absent
  • BT-31 seller.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 ES
  • BT-48 buyer.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.*TypeMeaning
targetobject
sourceobject
method"identity_patch" | "canonical_render"
losslessboolean
xmlstring | null
sha256string | null
lossobject
notCarriedobject[]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.
judgeobjectWhich 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).
verdictVerdict
findingsFinding[]
StatusWhen, and the error codes
200Converted document
400Bad 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? })
401UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key
402QUOTA_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").
403KEY_INACTIVE
413Request 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.)
422XML_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)
429RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt)
500INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header
503ORACLE_UNAVAILABLE — the official validator did not answer; nothing was changed; retry (Retry-After: 60)
curl
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'
Node 18+ · example.mjs
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.*TypeMeaning
format"html" | "json"
locale"de" | "en"
syntax"UBL" | "CII"
valuesintegerValues rendered
outsideStandardintegerXML values outside EN 16931, shown under "further details"
htmlstringformat=html: standalone page (inline CSS, no scripts)
documentobjectformat=json: the structured reading
StatusWhen, and the error codes
200Rendering
400Bad 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
401UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key
402QUOTA_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").
403KEY_INACTIVE
413Request 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.)
422XML_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
429RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt)
500INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header
curl
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.html
Node 18+ · example.mjs
import { 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) · * requiredTypeMeaning
xmlstringThe 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.
xmlBase64stringThe 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.
pdfBase64stringA 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.*TypeMeaning
syntax"UBL" | "CII"
sha256string
summary"no-action" | "automatic" | "needs-attention"
countsobject
changesReadinessChange[]Every value that is not unchanged
lossesstring[]
basisReadinessBasis
StatusWhen, and the error codes
200One document: ReadinessResult. Batch: ReadinessBatchResult (a document that cannot be read is ok: false with its own status and error, in place).
400Bad 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"
401UNAUTHORIZED / KEY_EXPIRED — missing, invalid or expired key
402QUOTA_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").
403KEY_INACTIVE
413Request 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.)
422UNSUPPORTED_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)
429RATE_LIMITED — too many requests in the sliding hour; honour Retry-After (error.details: limit, remaining, resetAt)
500INTERNAL_ERROR — an unexpected failure; retry with backoff and quote the X-Request-Id header
curl
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}]}'
Node 18+ · example.mjs
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.*TypeMeaning
status"ok" | "degraded"
versionstring
engine"patch"
llmfalse
validatorobject
convertTargetsstring[]
renderFormatsstring[]
timestring
latencyMsintegerTime this health check took
StatusWhen, and the error codes
200Healthy
503KoSIT enabled but unreachable (status "degraded"); validate, fix and convert then answer 503 ORACLE_UNAVAILABLE
curl
curl -s https://www.invoicenavigator.eu/api/v3/health \
  | jq '{status, validator, llm}'
Node 18+ · example.mjs
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 too

GET /v3/openapi.json

This document (no key). No key.

StatusWhen, and the error codes
200OpenAPI 3.1
curl
curl -s https://www.invoicenavigator.eu/api/v3/openapi.json \
  | jq '.paths | keys'
Node 18+ · example.mjs
const res = await fetch('https://www.invoicenavigator.eu/api/v3/openapi.json')
const body = await res.json()
console.log(Object.keys(body.paths))
Data handling

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.
Versioning

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).