billing

GET /v1/invoices

List the organization's billing documents.

Alle billing-eindpunten

Authenticatie

Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie billing.view beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.

Waar je organisatie-id komt te staan

Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.

Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.

Probeer het

Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.

curl -X GET https://api.zinndigital.com/v1/invoices \
  -H "Authorization: Bearer zdk_live_…"

Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console

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).

Parameters

NaamTypeVerplichtWat dit is
X-Zinn-Org (header)stringNee**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)stringNeeOpaque cursor from a previous page's `page.next_cursor`.
limit (query)integerNeeMaximum items to return (page size).
status (query)InvoiceStatusNeeFilter by billing-document status.
org_id (query)UuidNeeRestrict to one organization in scope.

Reactie

NaamTypeVerplichtWat dit is
dataInvoice[]Ja
pagePageMetaJa

Fouten die dit eindpunt kan retourneren

401 · 403 · 422 · 429