REST-API · POST /validate/vampire · paid route
Request
How to call the route
Address: POST https://einvoicetools.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://einvoicetools.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.
