> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.invoice-api.xhub.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.invoice-api.xhub.io/_mcp/server.

# Quickstart

> Read an XRechnung in under five minutes.

This example reads a German XRechnung and pulls out the invoice data. All it
takes is an API key and the file.

### Base64 encode the document

The API takes documents Base64 encoded throughout — XML as well as PDF.

```bash
base64 -i invoice.xml | tr -d '\n' > invoice.b64
```

### Call the parse endpoint

```bash
curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/parse \
  -H "Authorization: Bearer sk_test_xxxxx" \
  -H "Content-Type: application/json" \
  -d "{\"data\":\"$(cat invoice.b64)\",\"filename\":\"invoice.xml\"}"
```

### Read the response

```json
{
  "success": true,
  "invoice": {
    "invoiceNumber": "INV-2026-0042",
    "type": "invoice",
    "issueDate": "2026-03-20",
    "dueDate": "2026-04-19"
  }
}
```

## Do you know the format already?

There are two ways in, and the choice has consequences:

#### Format is known — the specific endpoint

`/api/v1/invoice/{country}/{format}/parse` checks the document against
exactly that format and reports deviations clearly. The way to go when the
source is fixed.

#### Format is unknown — let it detect

`/api/v1/invoice/parse` works out the format itself. Handy for inboxes with
mixed sources — in exchange, the error message is less precise about what
is wrong with a document.

## Next

#### [API Reference](/api-reference)

All 86 endpoints with schemas and examples.

#### [Authentication](/getting-started/authentication)

Keys, modes, entitlements and quotas.