e-Invoice REST API

e-Invoice REST API

For developers · Service on einvoiceTools

Validate e-invoices, without running anything yourself.

The e-Invoice REST API of einvoiceTools is an interface that your own program calls over the internet. It validates e-invoices with VAMPIRE, the official KoSIT validator or Mustang, renders them as a web page or PDF, checks identifiers in their registers – not only VAT numbers through VIES, but also SIREN and SIRET through SIRENE, LEI, ABN, NIP, Peppol IDs and EORI – and serves the code lists of EN 16931 for reference.

In brief

You call it from your script, your ERP system or any other program, and you do not need to install anything. The API runs at https://einvoicetools.de/wp-json/einvoice-api/v1/.


The routes

Every task has its route.

Validate invoices

POST /validate – Validates an e-invoice and returns the result, findings with explanation and the report in KoSIT format.

POST /validate/multi – Validates against every edition of the rule set in question.

POST /validate/kosit – Validates with the official KoSIT validator.

POST /validate/mustang – Validates with Mustang, including the PDF against PDF/A-3.

POST /validate/vampire – Validates with VAMPIRE through the shared interface of the suite.

Render invoices

POST /visualize/html – Turns the invoice into a readable web page.

POST /visualize/pdf – Turns the invoice into a readable PDF.

Check identifiers

POST /check – Checks one identifier in the register responsible.

POST /check/batch – Checks up to 1,000 identifiers in one call.

GET /check/{register} – One route per register, the identifier in the address.

Service

GET /health · /info · /usage – Information about the service; costs nothing.

Reference data

GET /codelists, /fields, /rules, /identifiers – Code lists, business terms, rules and identifier schemes of EN 16931. Free and without a key.

Key and quota

What is free and what counts.

The reference data, that is code lists, business terms, rules and identifier schemes, are free and need no key. All other routes are paid routes. With your API key in the header Authorization: Bearer <key> they count against the monthly quota of your plan.

To try the API, you can call every validation and rendering route twice a day without a key, per network address and per route. Identifier checks always need a key; for them there is the free plan “Free”, which covers about two identifier checks a day. For more, there are plans with a larger monthly quota. You request your key, also for the plan “Free”, with the form on the page Plans.

Every answer tells you in its headers how much of your quota is left. When it is used up, a small extra quota applies until the end of the month before the service answers with status 429.

Your data

Invoices and reports are processed in memory only and are not stored. The usage log keeps a fingerprint of the request, never its content. For an identifier check, only the identifier goes to the register responsible.


First steps

Validate an invoice with a single command.

You send the invoice file itself as the body of the request. Without the line with the key, the call works twice a day for free:

curl -X POST https://einvoicetools.de/wp-json/einvoice-api/v1/validate \
     -H "Authorization: Bearer <key>" \
     --data-binary @invoice.xml

The answer comes as JSON. The field accepted tells you whether the invoice is accepted. It also contains the validation scenario found, the findings with explanation and the full validation report.

Reference data

The code lists of EN 16931, free and without a key.

The European standard EN 16931-1 defines which code lists are allowed for every field of the data type “Code”. Through the API you get every table in full or a single entry from it, without a key. Every answer names the data stand of the list.

Every list also has a page of its own with a searchable table.


Try it

All routes, right in the browser.

Open a route, enter your key via “Authorize”, choose “Try it out” and send the request. The key stays in this browser window only. The code lists always work without a key, the validation routes twice a day.


Look first, then automate.

To read a single e-invoice you need no API: use the eInvoice Viewer as a one-file app. The API pays off when your program should check many invoices or identifiers without manual work.