Skip to content

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

Basics

API keys and authentication

Every request to /v1/validate, /v1/visualize and /v1/conversions carries the API key in the Authorization header:

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

Keys

  • Create: in your account under API keys. A key starts with era_live_, followed by 48 hexadecimal characters.
  • Shown once: the key is displayed only when it is created. A hash is stored, not the key. If you lose it, create a new one.
  • Revoke: at any time in your account. A revoked key is rejected immediately.
  • Several keys: give each system its own key with its own name. Your account shows when a key was last used.

Send the key only from your server. It does not belong in a browser, an app or a repository.

Answers

StatuscodeWhen
401missing_keythe Authorization header is missing or not of the form Bearer <key>
401invalid_keythe key is unknown or revoked
403plan_without_apiyour plan does not include API access
403plan_without_conversionyour plan does not include conversion
402insufficient_creditsyour credits do not cover the operation
402account_blockeda chargeback is open on one of your payments

The plan is read on every request. After a change to the Pro plan, access applies at once.

Without a key

GET /v1/health and GET /v1/openapi.json answer without a key.

Shell
curl -sS https://api.erechnungsampel.de/v1/health
JSON
{ "status": "ok", "service": "api", "commit": "8f3c1d2a9b7e4f60a1c5d8e2b4f6a7c9d0e1f2a3" }

status is ok, stopping (the service is restarting) or unavailable. In the last two cases the HTTP status is 503. commit names the version of the service that is running.