POST /validate/multi – Validate against every edition

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.


Request

How to call the route

Address: POST https://einvoicetools.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://einvoicetools.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.