Skip to content

Access: The API is included in the Pro plan. You create the API key in your account.

Start

Quickstart

Three steps to your first check.

1. Create a key

Create an account, choose the Pro plan and create a key under API keys. It is shown once. Store it as an environment variable:

Shell
export ERA_API_KEY="era_live_4f9c2a7d1e8b3065a9d47c12f0e6b358c1a9d7e24b60f3a8"

2. Send an invoice

The file goes into the body as raw data, without multipart. The Content-Type names the format.

Shell
curl -sS https://api.erechnungsampel.de/v1/validate \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Accept-Language: en" \
  -H "Content-Type: application/xml" \
  --data-binary @invoice.xml

For a PDF with embedded XML (ZUGFeRD, Factur-X) send Content-Type: application/pdf.

3. Read the check report

The answer, shown here without the invoice field:

JSON
{
  "traffic_light": "red",
  "format": "xrechnung-cii",
  "profile": "XRECHNUNG",
  "rules_version": "XRechnung 3.0.2 / configuration 2026-08-31",
  "violations": [
    {
      "rule": "BR-DE-15",
      "severity": "error",
      "field": "BT-10",
      "location": "/rsm:CrossIndustryInvoice[1]/rsm:SupplyChainTradeTransaction[1]/ram:ApplicableHeaderTradeAgreement[1]",
      "original_message": "[BR-DE-15] Das Element \"Buyer reference\" (BT-10) muss übermittelt werden.",
      "message": null,
      "explanation": "https://erechnungsampel.de/en/rules/BR-DE-15"
    }
  ],
  "duration_ms": 412
}
traffic_lightLightMeaning
greenGreenno violation; the official validator recommends acceptance
yellowYellowwarnings only
redRedat least one error, or the format or profile is not an e-invoice

Every violation names the rule (rule), the EN 16931 field it affects (field) and the place in the file (location). original_message is the original text of the rule, and explanation is the link to the explanation of the rule. message is filled only for our own rules (ERA-), otherwise it is null.

Every answer also contains invoice: the invoice data read from the file, such as number, date, seller, buyer, lines and totals, or null when it cannot be read.

Where to go next

  • Validate: every field of the check report, the invoice data in invoice and the error cases.
  • Readable PDF: send the same file to POST /v1/visualize and receive the invoice as a PDF.
  • Convert: create an e-invoice from a PDF.
  • Credits and plans: what a request costs.