agency-invoicing

POST /v1/agency-invoicing/invoices/{invoiceId}/payments

Record money received — mark it paid or part-paid.

Todos os endpoints de agency-invoicing

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

NomeTipoObrigatórioO que é
invoiceId (path)UuidSim
org_id (query)UuidNãoWhich 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

NomeTipoObrigatórioO que é
amount_minorintegerNãoDefaults to the outstanding balance.
methodstring<card, wallet, crypto, bank_transfer, cash, cheque, other>Não
notestringNão

Resposta

NomeTipoObrigatórioO que é
idUuidSimUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringNãoThe agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence.
statusstring<draft, sent, partially_paid, paid, void>Sim
is_overduebooleanNã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_idUuidNãoUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringNão
currencystringSim
issue_datestringSim
due_datestringNão
referencestringNão
notesstringNão
footerstringNão
subtotal_minorintegerNão
discount_minorintegerNão
tax_minorintegerNão
total_minorintegerSim
amount_paid_minorintegerNão
amount_due_minorintegerNão
tax_breakdownAgencyInvoiceTaxGroup[]Não
sourcestringNãoWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringNão
last_sent_tostringNão
paid_atstringNão
void_reasonstringNão
created_atstringNão
linesAgencyInvoiceLine[]Não
paymentsAgencyInvoicePayment[]Não
portal_urlstringNãoThe 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