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:
curl -sS https://api.erechnungsampel.de/v1/validate \
-H "Authorization: Bearer $ERA_API_KEY" \
-H "Content-Type: application/xml" \
--data-binary @invoice.xmlKeys
- 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
| Status | code | When |
|---|---|---|
401 | missing_key | the Authorization header is missing or not of the form Bearer <key> |
401 | invalid_key | the key is unknown or revoked |
403 | plan_without_api | your plan does not include API access |
403 | plan_without_conversion | your plan does not include conversion |
402 | insufficient_credits | your credits do not cover the operation |
402 | account_blocked | a 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.
curl -sS https://api.erechnungsampel.de/v1/health{ "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.