POST /validate/multi – Validate against every edition

REST-API · POST /validate/multi · paid route

Validate against every edition: when it is unclear which one an invoice was made for.

This route validates one invoice against every edition of the rule set in question. For XRechnung the invoice date picks exactly one edition. For ZUGFeRD and Factur-X the check starts with the newest edition and goes down to the older ones until one accepts the invoice. If none accepts it, the report of the newest applies.

This helps when you receive invoices from many suppliers and do not know which software and which edition they were made with. One call costs one validation, even when several editions are checked.


Request

How to call the route

Address: POST https://invoicepress.de/wp-json/einvoice-api/v1/validate/multi

Key: Send your API key in the header Authorization: Bearer <key>. Without this header, the free quota of two calls per route and day applies. If a key is sent that is not valid, the route answers with status 401.

Body: The body of the request is the invoice itself: as XML (XRechnung, Peppol BIS, CII or UBL) with Content-Type: application/xml, or as a ZUGFeRD or Factur-X PDF with Content-Type: application/pdf. From a PDF the service first takes the embedded invoice.

Parameters

matrix=1 (optional) – Checks every edition instead of stopping at the first one that accepts the invoice. You see at a glance how each edition decides. This too costs one validation.

The invoice is processed in memory only and is not stored. The usage log keeps a fingerprint of the request, never its content.


Answer

What comes back

accepted – The result of the chosen edition.

chosen – The chosen edition and the reason why.

steps – One line per edition checked, with the result, the number of findings and the rules in which this edition differs from the others.

When something goes wrong

Status 400 – The request was empty.

Status 401 – A key was sent, but it is unknown or blocked.

Status 415 – The content is neither XML nor PDF.

Status 422 – The XML could not be read, or the PDF carries no invoice.

Status 429 – The quota is used up.


Example

A call with curl

curl -X POST "https://invoicepress.de/wp-json/einvoice-api/v1/validate/multi?matrix=1" \
     -H "Authorization: Bearer <key>" \
     -H "Content-Type: application/pdf" \
     --data-binary @invoice.pdf

Cost

Quota and plan

This route is a paid route. With a key, every successful call counts as one validation against the monthly quota of your plan; answers with an error status are not counted. To try it, you can call the route twice a day without a key. This limit applies per network address and per route: two calls to this route leave the other routes untouched. Every answer without a key tells you in the headers X-RateLimit-Remaining and X-RateLimit-Reset how many calls are left today and when the counter resets.