billing

GET /v1/invoices

List the organization's billing documents.

Todos os endpoints de billing

Autenticação

Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.view; uma chave sem ela é recusada com 403, e não 404.

Onde vai o ID da sua organização

Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.

O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.

Experimente

Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.

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

Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API

Detalhes

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

Parâmetros

NomeTipoObrigatórioO que é
X-Zinn-Org (header)stringNão**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)stringNãoOpaque cursor from a previous page's `page.next_cursor`.
limit (query)integerNãoMaximum items to return (page size).
status (query)InvoiceStatusNãoFilter by billing-document status.
org_id (query)UuidNãoRestrict to one organization in scope.

Resposta

NomeTipoObrigatórioO que é
dataInvoice[]Sim
pagePageMetaSim

Erros que este endpoint pode retornar

401 · 403 · 422 · 429