Xaqiijinta aqoonsiga
U dir furaha API ah calaamad dusha ah (bearer token). Furaha waa inuu wataa ruqadda billing.view; furaha aan wadan waxaa loo diidayaa 403, ee ma aha 404.
Meesha aqoonsiga ururkaagu galayo
Endpoint-kani wuxතික org_id oo ah cabbir su'aal ah. Ka tag oo wicitaanku wuxuu daboolayaa dhammaan geedkaaga kiraynta; soo dir si aad wicitaanka ugu koobto hal urur.
Aqoonsiga ururkaagu wuxuu ku yaallaa shaashada furayaasha API ee dashboard-kaaga, oo ku xiga furaha laftiisa. Waa isku aqoonsi wicitaan kasta oo aad sameyso.
Isku day
Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.
curl -X GET https://api.zinndigital.com/v1/invoices \
-H "Authorization: Bearer zdk_live_…"Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API
Faahfaahin
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).
Cabiraha
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
X-Zinn-Org (header) | string | Maya | **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 | Maya | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | Maya | Maximum items to return (page size). |
status (query) | InvoiceStatus | Maya | Filter by billing-document status. |
org_id (query) | Uuid | Maya | Restrict to one organization in scope. |
Jawaab
| Magaca | Nooc | Loo baahan yahay | Maxay tahay |
|---|---|---|---|
data | Invoice[] | Haa | — |
page | PageMeta | Haa | — |
Cilladaha ay bartaani soo celin karto
401 · 403 · 422 · 429