Skip to content

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 403 with the code plan_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

TaskRouteFlow
Check an e-invoicePOST /v1/validatesynchronous: send the file, receive the check report with the traffic light and the invoice data that was read
E-invoice as a readable PDFPOST /v1/visualizesynchronous: send the file, receive the PDF; the result of the check is in the headers
Submit a PDFPOST /v1/conversionsasynchronous: answer 202, the fields follow
Fetch the fieldsGET /v1/conversions/{id}status and the fields that were read, with their sources
Create the e-invoicePOST /v1/conversions/{id}/confirmsend the confirmed fields, receive the checked file
Delete nowDELETE /v1/conversions/{id}deletes the data, reserved credits are released
Service statusGET /v1/healthno key needed
OpenAPI 3.1GET /v1/openapi.jsonno key needed

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

FormatVersion or profile
XRechnung3.0, as UBL or CII
ZUGFeRD and Factur-Xfrom 2.0.1, profiles EN16931, EXTENDED, XRECHNUNG and BASIC
EN 16931UBL

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.