Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Der Schlüssel muss über die Berechtigung billing.view verfügen; ein Schlüssel ohne diese wird mit 403 statt 404 abgelehnt.
Hier kommt Ihre Organisations-ID hin
Dieser Endpunkt akzeptiert org_id als Abfrageparameter. Lassen Sie ihn weg, erfasst der Aufruf Ihren gesamten Mandanten-Unterbaum; übergeben Sie ihn, um den Aufruf auf eine Organisation einzugrenzen.
Die ID Ihrer Organisation finden Sie im Dashboard auf dem Bildschirm für API-Schlüssel direkt neben dem Schlüssel selbst. Sie ist bei jedem Ihrer Aufrufe dieselbe.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X GET https://api.zinndigital.com/v1/invoices \
-H "Authorization: Bearer zdk_live_…"Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
Details
The organization's billing history — every **invoice and credit note** issued to it, newest first, with its lines, its payment summaries and the captured amounts. Cursor-paginated, filterable by `status`; RLS-scoped; requires `billing.view`. **These are the real legal documents (docs/34 §1).** Each is an immutable snapshot with a gapless, per-entity `ZD-INV-YYYY-NNNNNN` number, a captured tax treatment and its own frozen FX rates. `document_type` separates an invoice from a credit note; `credits_invoice_id` says which invoice a credit note un-bills. ⚠️ **The document is issued by a sweep, a couple of minutes after payment, not synchronously at checkout** (docs/34 §4.1). Render a pending state for a just-placed order rather than assuming the document is there the moment checkout returns. `pdf_url` stays `null` until PDF rendering lands (#708).
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
X-Zinn-Org (header) | string | Nein | **Which organisation this call acts for.** Send a client organisation's id and every org-scoped endpoint answers for that client alone; omit it and the answer covers everything… |
cursor (query) | string | Nein | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Nein | Maximum items to return (page size). |
status (query) | InvoiceStatus | Nein | Filter by billing-document status. |
org_id (query) | Uuid | Nein | Restrict to one organization in scope. |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
data | Invoice[] | Ja | — |
page | PageMeta | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 422 · 429