E-Invoice API
Guides

Getting started

From an API key to your first converted invoice.

1. Get a key

Keys are created in the portal. When you create one you pick an environment:

  • Test — key looks like of_test_…, requests reach the sandbox.
  • Production — key looks like of_live_…, requests reach the real service.

The full key is shown once, at creation. Only a hash of it is stored, so a lost key cannot be recovered — create a new one and revoke the old.

Start with a test key. Nothing you do with it touches live document processing or your production quota.

2. Call ping

curl https://staging-api-e-invoice.officefreund.de/api/v1.8.2/e-invoice/ping \
  -H "Authorization: Bearer of_test_your_key_here"
pong

If you get a 401, check the X-Error-Code response header — it says exactly what was wrong rather than making you guess.

3. Do something real

calculate takes an invoice without totals and returns it with them filled in. It is JSON in, JSON out, which makes it the easiest endpoint to try by hand:

curl -X POST https://staging-api-e-invoice.officefreund.de/api/v1.8.2/e-invoice/calculate \
  -H "Authorization: Bearer of_test_your_key_here" \
  -H "Content-Type: application/json" \
  -d @invoice.json

Most of the other endpoints take a file rather than JSON — validate, xmltopdf and extract all use multipart/form-data:

curl -X POST https://staging-api-e-invoice.officefreund.de/api/v1.8.2/e-invoice/validate \
  -H "Authorization: Bearer of_test_your_key_here" \
  -F "file=@invoice.xml"

Every endpoint has its own page under API reference, with the request and response schemas and a playground that sends a real request using whichever key you paste in.

4. Go live

Change the key. Nothing else — same base URL, same paths, same request bodies. See Sandbox and live for what actually differs between them.

A production key spends real quota and does real document processing from the first call. Keep using a test key until the request you are building is the one you meant to send.

On this page