billing

GET /v1/invoices

List the organization's billing documents.

Semua titik akhir billing

Autentikasi

Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin billing.view; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.

Tempat ID organisasi Anda dimasukkan

Titik akhir ini menerima org_id sebagai parameter kueri. Kosongkan parameter tersebut dan panggilan ini akan mencakup seluruh subpohon penyewa Anda; kirimkan untuk mempersempit panggilan ke satu organisasi.

ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.

Coba

Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.

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

Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API

Detail

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

Parameter

NamaJenisWajibTentang apa ini
X-Zinn-Org (header)stringTidak**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)stringTidakOpaque cursor from a previous page's `page.next_cursor`.
limit (query)integerTidakMaximum items to return (page size).
status (query)InvoiceStatusTidakFilter by billing-document status.
org_id (query)UuidTidakRestrict to one organization in scope.

Tanggapan

NamaJenisWajibTentang apa ini
dataInvoice[]Ya
pagePageMetaYa

Kesalahan yang dapat dikembalikan oleh titik akhir ini

401 · 403 · 422 · 429