# EU E-Invoice API: quickstart

> REST API that validates, parses and generates EU e-invoices: XRechnung, ZUGFeRD / Factur-X, Peppol BIS Billing 3.0, the French rules BR-FR, CIUS-RO, HR-CIUS, FatturaPA, KSeF FA(3) and plain EN 16931, with the official rule sets. Stateless, hosted in Germany, permanent free plan of 100 documents a month.

## 1. Get an API key

Sign in to the developer portal (https://einvoice-api-main-f5141d8.zuplo.site), open **Pricing** and choose **Free** (100 documents a month, no payment
details). The API key appears with the subscription. Everything is self-service: there is no sales contact and no
personal support; the documentation, the API reference and the error messages are designed to answer questions.

## 2. Validate an invoice

```bash
curl -H "Authorization: Bearer $EINVOICE_API_KEY" --data-binary @invoice.pdf https://einvoice-api-main-f5141d8.zuplo.app/v1/validate
```

Send a PDF (ZUGFeRD / Factur-X) or an XML file (XRechnung, EN 16931 UBL or CII, Peppol BIS, CIUS-RO, HR-CIUS,
FatturaPA, KSeF FA(3)) as the raw body, or as multipart with a part named `file`. The format is detected from the
content. On Windows PowerShell write `curl.exe`.

The answer:

```json
{
  "requestId": "3e4f5a6b-7c8d-4e9f-a0b1-c2d3e4f5a6b7",
  "valid": false,
  "format": "xrechnung",
  "syntax": "UBL",
  "profile": "XRECHNUNG",
  "rulesets": [{"id": "xrechnung", "version": "3.0.2", "release": "2026-08-31"}],
  "summary": {"fatal": 1, "error": 0, "warning": 0, "info": 0},
  "findings": [{
    "severity": "fatal",
    "ruleId": "BR-DE-15",
    "message": "Das Element \"Buyer reference\" (BT-10) muss übermittelt werden.",
    "xpath": "/ubl:Invoice[1]",
    "source": "schematron:xrechnung@3.0.2",
    "docUrl": "https://einvoice-api.eu/rules/br-de-15.html"
  }]
}
```

An invalid invoice is a successful call: HTTP 200 with `"valid": false`. `fatal` and `error` findings make a
document invalid; `warning` and `info` do not. `docUrl` links the public page of the rule (official text, severity
per rule set, Schematron test; Peppol rules link to the official Peppol documentation instead of showing the text).

## 3. Parse and generate

- `POST /v1/parse` returns the invoice as normalized EN 16931 JSON plus recomputed totals (`calculation`).
- `POST /v1/generate?format=xrechnung-ubl` turns that JSON into a document. Every generated document is validated
  first; an invalid result is never returned (422 with `findings` instead).

## Without an account

The free web validator (https://einvoice-api.eu/en/e-invoice-validator/) checks 5 files a day in the browser.

## More

- API guide: https://einvoice-api.eu/docs/api.md
- Code examples (curl, Python, TypeScript, Java, C#): https://einvoice-api.eu/docs/examples.md
- Source of the examples and the MCP server: https://github.com/einvoiceapi/einvoice-api
- MCP server for AI assistants: https://einvoice-api.eu/docs/mcp.md
- OpenAPI 3.1: https://einvoice-api.eu/openapi.json (also https://einvoice-api.eu/openapi.yaml)
