curatedapi
Browse the docs

Guides

Finance

Excel functions

Late payments

E-invoices

Accounting

Number checks

VAT and GST

Billing and pricing

Money and currencies

Dates and time

Math

Unit conversion

Everyday

Health

Factur-X / ZUGFeRD validator API

Check a Factur-X or ZUGFeRD 2 invoice, as a PDF or its XML, against the rules for its profile.

POST https://api.curatedapi.com/v1/validate/einvoice/factur-x

Takes the PDF (base64) or the CII XML. From a PDF the embedded factur-x.xml, zugferd-invoice.xml or xrechnung.xml is read, with the profile the PDF's XMP metadata names. The profile comes from the guideline ID (BT-24): MINIMUM, BASIC WL, BASIC, EN 16931 and EXTENDED use the Factur-X 1.09.2 / ZUGFeRD 2.5 schema and Schematron for that profile; XRECHNUNG uses KoSIT's rules.

  • PDF/A-3 conformance of the PDF itself is not checked: only the embedded invoice and the Factur-X XMP metadata are read.
  • ZUGFeRD 2.0 guideline IDs are checked against the current rules for the same profile, with a warning. ZUGFeRD 1.0 is not supported.

Inputs

An invoice that breaks a rule still gets HTTP 200, with "valid": false and the findings (see e-invoice validation).

InputTypeDescription
pdf string The Factur-X or ZUGFeRD PDF, base64-encoded (at most 6 MiB).
xml string Or the CII invoice XML, as text.

Result

Under result in the answer, next to validator and rules (the official artefacts used, with their versions).

ResultTypeDescription
validbooleantrue when the document matched a scenario and no check reported an error.
scenario['string', 'null']Which set of rules applied, chosen from the document's own type and specification ID; null when none applies.
document_type['string', 'null']UBL Invoice, UBL CreditNote or UN/CEFACT CII.
specification_id['string', 'null']The CustomizationID (UBL) or guideline ID (CII), BT-24, as found.
errorsintegerMessages at level error.
warningsintegerMessages at level warning.
noticesintegerMessages at level information.
error_ruleslist of stringThe distinct rules that reported an error, sorted.
checkslist of objectEach check in the order it ran, and whether it passed (a schema failure skips the rules, as in KoSIT's validator).
messageslist of objectUp to 500 findings.
messages_truncatedboolean
profile['string', 'null']MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED or XRECHNUNG.
pdf['object', 'null']For a PDF: the embedded file's name, the XMP ConformanceLevel and pdfa_checked (always false).

Examples

An official sample (ferd-en16931-einfach.xml)

Requestcurl
jq -Rs '{xml: .}' ferd-en16931-einfach.xml |
  curl https://api.curatedapi.com/v1/validate/einvoice/factur-x \
    -H "Authorization: Bearer $CURATEDAPI_KEY" \
    -H "Content-Type: application/json" \
    --data-binary @-
200 OKResponse
{
  "validator": "einvoice/factur-x@1",
  "result": {
    "valid": true,
    "scenario": "Factur-X EN 16931",
    "document_type": "UN/CEFACT CII",
    "specification_id": "urn:cen.eu:en16931:2017",
    "errors": 0,
    "warnings": 0,
    "notices": 0,
    "error_rules": [],
    "checks": [
      {
        "check": "XML syntax",
        "passed": true
      },
      {
        "check": "Factur-X 1.09.2 EN 16931 schema",
        "passed": true
      },
      {
        "check": "Factur-X 1.09.2 EN 16931 rules",
        "passed": true
      }
    ],
    "messages": [],
    "messages_truncated": false,
    "profile": "EN 16931",
    "pdf": null
  },
  "rules": [
    {
      "name": "Factur-X 1.09.2 / ZUGFeRD 2.5 schemas and Schematron (FNFE-MPE and FeRD), as distributed with Mustang",
      "version": "1.09.2",
      "url": "https://github.com/ZUGFeRD/mustangproject/tree/1d633ab612856527d536a709ed53bedd2a4ea98c/validator/src/main/resources"
    },
    {
      "name": "KoSIT validator configuration for XRechnung 3.0.2",
      "version": "2026-08-31",
      "url": "https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/v2026-08-31/xrechnung-3.0.2-validator-configuration-2026-08-31.zip"
    }
  ]
}

Rules used

A check shows whether the invoice passes the official rule sets listed, at the versions listed. It is not legal or tax advice, and passing does not promise that a tax authority or buyer will accept the invoice. See the terms.

Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.