Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу billing.view; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.

Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

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

Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у 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.

Одговор

НазивТипОбавезноШта је ово
dataInvoice[]Да—
pagePageMetaДа—

Грешке које ова крајња тачка може вратити

401 · 403 · 422 · 429