ማረጋገጫ
የAPI ቁልፉን እንደ bearer token ይላኩ። ቁልፉ የbilling.view ፈቃድ ሊኖረው ይገባል፤ ይህ ፈቃድ የሌለው ቁልፍ በ404 ሳይሆን በ403 ውድቅ ይደረጋል።
የድርጅትዎ መታወቂያ የሚገባበት ቦታ
ይህ ማቆሚያ ነጥብ org_id እንደ ጥያቄ መለኪያ ይወስዳል። እሱን ይተውት እና ጥሪው አጠቃላይ የኪራይ ንዑስ ዛፍዎን ይሸፍናል፤ ጥሪውን ወደ አንድ ድርጅት ለማጥበብ ይላኩት።
የድርጅትዎ መለያ ቁጥር (ID) በዳሽቦርድዎ ላይ በሚገኙት የኤፒአይ ቁልፎች (API keys) ማያ ገጽ ላይ ከቁልፉ አጠገብ ይገኛል። በሚያደርጉት እያንዳንዱ ጥያቄ ላይ የሚጠቀሙበት መለያ ቁጥር አንድ አይነት ነው።
ሞክሩት
በቅንፍ ውስጥ ያለውን ማንኛውንም ነገር በራስዎ እሴቶች ይተኩ፣ እና ቁልፍ ቦታ ያዢውን ከዳሽቦርድዎ በመጣ ቁልፍ ይተኩ።
curl -X GET https://api.zinndigital.com/v1/invoices \
-H "Authorization: Bearer zdk_live_…"ገብተዋል? የመቆጣጠሪያ ማዕከልዎ ውስጥ ያለው የኤፒአይ ኮንሶል ትክክለኛውን የድርጅት መታወቂያዎን እና የራስዎን ቁልፍ ይሞላል፣ እና ትክክለኛውን ምላሽ ማየት እንዲችሉ ጥያቄውን በቀጥታ ከሚሰራው ኤፒአይ ጋር ያካሂደዋል። ይህን ኤንድፖይንት በAPI ኮንሶል ውስጥ ይክፈቱ
ዝርዝሮች
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).
መለኪያዎች
| ስም | ዓይነት | የሚያስፈልግ | ምንነቱ |
|---|---|---|---|
X-Zinn-Org (header) | string | አይ | **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 | አይ | Opaque cursor from a previous page's `page.next_cursor`. |
limit (query) | integer | አይ | Maximum items to return (page size). |
status (query) | InvoiceStatus | አይ | Filter by billing-document status. |
org_id (query) | Uuid | አይ | Restrict to one organization in scope. |
ምላሽ
| ስም | ዓይነት | የሚያስፈልግ | ምንነቱ |
|---|---|---|---|
data | Invoice[] | አዎ | — |
page | PageMeta | አዎ | — |
ይህ ማብቂያ ሊመልሳቸው የሚችሉ ስህተቶች
401 · 403 · 422 · 429