Skip to content

Check and create e-invoices over an API

The same checks and conversion as on the website, for ERP systems, online shops and accounting software.

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

Request
curl -sS https://api.erechnungsampel.de/v1/validate \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/xml" \
  --data-binary @rechnung.xml

ResponseJSON

{
  "traffic_light": "red",
  "format": "xrechnung-cii",
  "profile": "XRECHNUNG",
  "violations": [
    {
      "rule": "BR-DE-15",
      "severity": "error",
      "field": "BT-10"
    }
  ]
}

The official validator behind one HTTP call

  • No checking service of your own

    You do not run a validator or maintain rules. Checks currently use XRechnung 3.0.2.

  • Every message with rule and field

    The check report names the rule, the field and the location in the file, as JSON.

  • Charged only on success

    Credits are reserved before the operation. If the API answers 503, they are released.

Check an invoice

Send the XML file or the PDF with embedded XML. The answer is the check report with the traffic-light value and the messages.

  1. POST /v1/validateSend an invoice, receive the check report
Shell
curl -sS https://api.erechnungsampel.de/v1/validate \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @rechnung.pdf
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."
    }
  ]
}

Convert a PDF

Conversion takes three steps: send the PDF, fetch the fields that were read, and send back the confirmed fields with the target format.

  1. POST /v1/conversionsSend the PDF
  2. GET /v1/conversions/{id}Fetch the fields that were read
  3. POST /v1/conversions/{id}/confirmSend the confirmed fields, receive the file
Shell
curl -sS https://api.erechnungsampel.de/v1/conversions \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/pdf" \
  --data-binary @rechnung.pdf

curl -sS https://api.erechnungsampel.de/v1/conversions/$ID \
  -H "Authorization: Bearer $ERA_API_KEY"

curl -sS https://api.erechnungsampel.de/v1/conversions/$ID/confirm \
  -H "Authorization: Bearer $ERA_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @felder.json \
  -o xrechnung.xml

Keys, errors and limits

Authentication

Every request carries your API key in the Authorization header. You create keys in your account; each is shown only once.

Authorization: Bearer era_live_4f9c2a7d1e8b3065a9d47c12f0e6b358c1a9d7e24b60f3a8

Errors

Errors come as application/problem+json (RFC 9457) with stable codes: 429 with Retry-After on too many requests, 503 on an internal outage.

Limits
CheckXML or PDF up to 10 MB, synchronous
ConversionPDF up to 20 MB and 10 pages, asynchronous
RetentionFiles and fields for 30 minutes at most

OpenAPI

The complete description as OpenAPI 3.1 is available at this address:

https://api.erechnungsampel.de/v1/openapi.json

Go to the API documentation

Start with a free account.

The Free plan costs nothing and is enough to try things out, one trial conversion included. Regular PDF conversion and the API come with a paid plan.