
# Getting started

The EU E-Invoice API checks electronic invoices against the official rules (KoSIT XRechnung, CEN EN 16931, FeRD
ZUGFeRD / Factur-X, PDF/A-3 with veraPDF), turns them into structured JSON, and generates valid XRechnung and ZUGFeRD
invoices from JSON. Invoices are processed in memory on servers in Germany and are never stored or logged.

## 1. Get an API key

1. Sign in (top right) and open **Pricing**.
2. Choose a plan. **Free** includes 100 documents per month and needs no payment details.
3. Your API key appears with your subscription. Keep it secret; you can regenerate it at any time.

## 2. Make your first call

Send the key as a bearer token. Validate a ZUGFeRD PDF or an XRechnung XML; the format is detected from the content:

```bash
curl -H "Authorization: Bearer $EINVOICE_API_KEY" \
  -F "file=@invoice.pdf" \
  https://<gateway>/v1/validate
```

The answer says whether the invoice is `valid` and lists every finding with rule id, severity, message and location.
An invoice with errors is still a successful call (HTTP 200 with `"valid": false`).

On Windows PowerShell, write `curl.exe` instead of `curl`.

## Endpoints

| Endpoint | What it does |
|---|---|
| `POST /v1/validate` | Validates an XRechnung (UBL or CII) or a ZUGFeRD / Factur-X PDF. |
| `POST /v1/parse` | Validates and returns the invoice as normalized EN 16931 JSON with recomputed totals. |
| `POST /v1/generate?format=…` | Generates `xrechnung-cii`, `xrechnung-ubl`, `zugferd-en16931` or `facturx-basic` from that JSON. Every output is validated before it is returned. |
| `POST /v1/preview/validate` | Validates against upcoming rule sets before they become mandatory (paid plans). |
| `GET /v1/formats` | Rule-set versions in use. |

Details, schemas and examples: [API Reference](/api).

## Plans and usage

A validate, parse or preview call counts as 1 document, a generate call as 2. Calls rejected before processing
(missing key, file too large, plan limit) are not counted. The Free plan stops at its quota; paid plans bill extra
documents automatically. Your usage is shown with your subscription.

## Errors

Errors are [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) `application/problem+json` objects. `detail` says what
to fix, and `requestId` identifies the call.

## Support

The API is a self-service product: this documentation, the API reference and the error messages answer most
questions. There is no personal support with committed response times. Terms, data processing agreement and privacy
policy are linked in the menu.
