agency-invoicing

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

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

Lahat ng agency-invoicing endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na agency.invoicing.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Tinatanggap ng endpoint na ito ang org_id bilang parameter ng query. Huwag itong isama at saklaw ng tawag ang buong subtree ng iyong tenancy; ipadala ito para paliitin ang tawag sa isang organisasyon.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

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

Mga Parameter

PangalanUriKailanganAno ito
invoiceId (path)UuidOo
org_id (query)UuidHindiWhich 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…

Katawan ng kahilingan

PangalanUriKailanganAno ito
tostringHindiWhere to send it. Defaults to the client's stored email.
localestringHindiWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringHindiA covering line to put above the amount.

Tugon

PangalanUriKailanganAno ito
idUuidOoUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringHindiThe 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>Oo
is_overduebooleanHindi⭐ 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_idUuidHindiUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringHindi
currencystringOo
issue_datestringOo
due_datestringHindi
referencestringHindi
notesstringHindi
footerstringHindi
subtotal_minorintegerHindi
discount_minorintegerHindi
tax_minorintegerHindi
total_minorintegerOo
amount_paid_minorintegerHindi
amount_due_minorintegerHindi
tax_breakdownAgencyInvoiceTaxGroup[]Hindi
sourcestringHindiWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringHindi
last_sent_tostringHindi
paid_atstringHindi
void_reasonstringHindi
created_atstringHindi
linesAgencyInvoiceLine[]Hindi
paymentsAgencyInvoicePayment[]Hindi
portal_urlstringHindiThe 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_tostringHindi

Mga error na maibabalik ng endpoint na ito

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