agency-invoicing

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

Email the invoice to your client, with the PDF attached.

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}/send \
  -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

Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. 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 é
tostringNãoWhere to send it. Defaults to the client's stored email.
localestringNãoWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringNãoA covering line to put above the amount.

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,…
sent_tostringNão

Erros que este endpoint pode retornar

401 · 403 · 404 · 409 · 422 · 429 · 503