Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya billing.view; ufunguo usio nayo unakataliwa kwa 403, si 404.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Kigezo hiki kinachukua org_id kama kigezo cha utafutaji. Iache wazi na simu itashughulikia tawi lako lote la wapangaji; itume ili kupunguza simu iwe ya shirika moja tu.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
curl -X GET https://api.zinndigital.com/v1/invoices \
-H "Authorization: Bearer zdk_live_…"Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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).
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
X-Zinn-Org (header) | string | Hapana | **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 | Hapana | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Hapana | Maximum items to return (page size). |
status (query) | InvoiceStatus | Hapana | Filter by billing-document status. |
org_id (query) | Uuid | Hapana | Restrict to one organization in scope. |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
data | Invoice[] | Ndiyo | — |
page | PageMeta | Ndiyo | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403 · 422 · 429