POST /validate/vampire – Validate with VAMPIRE

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

Validate with VAMPIRE: the same check as /validate, at the shared address.

This route validates an e-invoice with VAMPIRE, our validation engine. It is the same check as POST /validate. The difference is the form: this route follows the shared interface of the suite, like /validate/kosit and /validate/mustang.

Use this route when your program should choose between the three validators without reading the answer differently each time. For the answer with explanations in your language, use POST /validate.


Request

How to call the route

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

Key: Send your API key in the header Authorization: Bearer <key> or in X-Api-Key. Both work the same way. Without a key, the free quota of two calls per route and day applies; a key that is sent but not valid gets 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

format (optional) – json for the summary, xml for the unchanged report.

X-Filename (header, optional) – The file name, URL-encoded. It appears in the report.

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

Status 200 – also for an invalid invoice. The result stands in the header X-Validation-Result with valid or invalid and in the report.

Without a parameter or with ?format=json – you get a summary as JSON.

With ?format=xml – you get the unchanged validation report of the validator.

Errors – come as JSON with the fields error (a short code) and message.

When something goes wrong

Status 401 – A key was sent, but it is not valid.

Status 403 – The route is switched off on this service.

Status 429 – The quota is used up. The header Retry-After tells you when it works again.

Status 502 – The Validator Bridge behind the service does not answer.

Status 503 – This validator is not available on this service.


Example

A call with curl

curl -X POST "https://invoicepress.de/wp-json/einvoice-api/v1/validate/vampire?format=xml" \
     -H "X-Api-Key: <key>" \
     -H "Content-Type: application/xml" \
     --data-binary @invoice.xml -o report.xml

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.