API errors

The document could not be parsed

The XML sent to /v1/invoices/parse could not be mapped to the invoice model. Nothing was processed or billed.

Error type
https://normbill.com/docs/errors/unparseable-document
HTTP status
400

Common causes

  • The document is not well-formed XML, or carries a DOCTYPE/DTD declaration (rejected as an XXE vector).
  • The root element is not a UBL 2.1 <Invoice> — UBL CreditNote roots are rejected (express credits as an Invoice with type code 384 and negative quantities; 381 is valid only in the CII syntaxes).
  • The CustomizationID (BT-24) is missing or names a specification normbill does not support.
  • The document is missing fields the invoice model requires (for example the seller name) — the detail lists each JSON path.

How to fix it

  • Check the detail field: it names the exact element or JSON path that failed.
  • Confirm the document is an XRechnung invoice — UBL and CII (ZUGFeRD/Factur-X) are both detected automatically.
  • If a legally valid XRechnung fails to parse, that is a bug on our side — send the rule id and document structure (never real invoice data) to support.

The error response format

Every non-2xx response from the API is an RFC 9457 problem-details body (application/problem+json) with at least type, title, status and detail. The type URL links back to this reference.

All error slugs: invalid-request, bad-request, payload-too-large, unauthorized, validation-failed, unparseable-document, plan-limit, quota-exceeded, rate-limited, overage-cap-reached, validate-fair-use, generate-failure-fair-use, idempotency-key-invalid, idempotency-key-reuse, idempotency-conflict, pdf-unavailable, validator-unavailable, not-ready. Still stuck? Email support@normbill.com or start at the docs overview.

Spotted something?

Bug, missing feature, wrong validation result — tell us. The page you're on is attached automatically; email optional.