Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu billing.view; ključ bez nje se odbija sa 403, a ne sa 404.
Gde ide ID vaše organizacije
Ova krajnja tačka prihvata org_id kao parametar upita. Izostavite ga i poziv obuhvata celokupno stablo vašeg zakupca; pošaljite ga da biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
curl -X GET https://api.zinndigital.com/v1/invoices \
-H "Authorization: Bearer zdk_live_…"Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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).
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
X-Zinn-Org (header) | string | Ne | **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 | Ne | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Ne | Maximum items to return (page size). |
status (query) | InvoiceStatus | Ne | Filter by billing-document status. |
org_id (query) | Uuid | Ne | Restrict to one organization in scope. |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
data | Invoice[] | Da | — |
page | PageMeta | Da | — |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 422 · 429