agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/payments
Record money received — mark it paid or part-paid.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão agency.invoicing.manage; 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 POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/payments \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'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
Defaults to the outstanding balance. The invoice's status is re-derived from the SUM of its payment rows, never incremented, so the two can never disagree. Requires `agency.invoicing.manage`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
invoiceId (path) | Uuid | Sim | — |
org_id (query) | Uuid | Não | Which of your organizations is invoicing. Required only when you belong to more than one — otherwise it is inferred from your DIRECT membership, never from the subtree-expanded… |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
amount_minor | integer | Não | Defaults to the outstanding balance. |
method | string<card, wallet, crypto, bank_transfer, cash, cheque, other> | Não | — |
note | string | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Não | The agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence. |
status | string<draft, sent, partially_paid, paid, void> | Sim | — |
is_overdue | boolean | Não | ⭐ DERIVED from the due date and the status, never stored — so there is no sweep to maintain a flag and nothing to go stale. A draft is never overdue however old it is: nobody ha… |
client_id | Uuid | Não | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Não | — |
currency | string | Sim | — |
issue_date | string | Sim | — |
due_date | string | Não | — |
reference | string | Não | — |
notes | string | Não | — |
footer | string | Não | — |
subtotal_minor | integer | Não | — |
discount_minor | integer | Não | — |
tax_minor | integer | Não | — |
total_minor | integer | Sim | — |
amount_paid_minor | integer | Não | — |
amount_due_minor | integer | Não | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Não | — |
source | string | Não | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Não | — |
last_sent_to | string | Não | — |
paid_at | string | Não | — |
void_reason | string | Não | — |
created_at | string | Não | — |
lines | AgencyInvoiceLine[] | Não | — |
payments | AgencyInvoicePayment[] | Não | — |
portal_url | string | Não | The payment link to send to the client. ⛔ Returned on a SINGLE-invoice read only, never in a list: a list is the thing that gets logged, cached and pasted into a support ticket,… |
Erros que este endpoint pode retornar
401 · 403 · 404 · 422 · 429