Access: The API is included in the Pro plan. You create the API key in your account.
Start
API documentation
With the API you check e-invoices from your own system and create an XRechnung or a ZUGFeRD file from PDF invoices. The check report contains the invoice data read from the file; a separate route returns the invoice as a readable PDF. The API uses the same services as the website: the official KoSIT validator for checks, and the same converter with confirmation of the fields.
What you need
- An account on the Pro plan. Only this plan includes API access. On any other plan the API answers
403with the codeplan_without_api. - An API key from your account, see Authentication.
- Credits for checks and conversions, see Credits and plans.
To try things without an account, use the validator in the browser.
Routes
Base URL: https://api.erechnungsampel.de
| Task | Route | Flow |
|---|---|---|
| Check an e-invoice | POST /v1/validate | synchronous: send the file, receive the check report with the traffic light and the invoice data that was read |
| E-invoice as a readable PDF | POST /v1/visualize | synchronous: send the file, receive the PDF; the result of the check is in the headers |
| Submit a PDF | POST /v1/conversions | asynchronous: answer 202, the fields follow |
| Fetch the fields | GET /v1/conversions/{id} | status and the fields that were read, with their sources |
| Create the e-invoice | POST /v1/conversions/{id}/confirm | send the confirmed fields, receive the checked file |
| Delete now | DELETE /v1/conversions/{id} | deletes the data, reserved credits are released |
| Service status | GET /v1/health | no key needed |
| OpenAPI 3.1 | GET /v1/openapi.json | no key needed |
- Quickstart: your first check in a few minutes.
- Validate, which also covers the readable PDF, and Convert: every route with an example.
- Inbox and forwarding: without the API, check invoices by email (from Free) and forward valid ones to accounting (Starter and Pro).
Principles
- Errors are visible. If a file cannot be checked, the API answers with an error. A technical failure is never reported as a valid invoice.
- You confirm every value. The created file contains what you confirmed. Totals that do not add up are reported and not corrected. The two cases in which the API itself proposes or inserts a value (BT-110 and BT-23) are described under Convert.
- Charged on success. Credits are reserved before the operation and only charged when you receive a result: the check report, the readable PDF or the created file.
- Files do not stay. Invoice files are deleted after 30 minutes at the latest, see Data and retention.
- The format is checked. The tax rate and any exemption are for you and your tax adviser.
Formats checked
| Format | Version or profile |
|---|---|
| XRechnung | 3.0, as UBL or CII |
| ZUGFeRD and Factur-X | from 2.0.1, profiles EN16931, EXTENDED, XRECHNUNG and BASIC |
| EN 16931 | UBL |
The MINIMUM and BASIC-WL profiles do not count as an e-invoice and result in red.
OpenAPI
The complete description is available as OpenAPI 3.1 at https://api.erechnungsampel.de/v1/openapi.json. It is tested against the server on every build: routes, error codes and response formats match the running service.