agency-invoicing

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

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

Усі кінцеві точки agency-invoicing

Автентифікація

Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл agency.invoicing.manage; ключ без нього відхиляється з кодом 403, а не 404.

Де вказується ідентифікатор вашої організації

Цей ендпоїнт приймає org_id як параметр запиту. Залиште його порожнім, і виклик охопить увесь ваше дерево орендарів; надішліть його, щоб звузити виклик до однієї організації.

Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.

Спробувати

Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.

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

Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API

Деталі

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

Параметри

НазваТипОбов'язковеЩо це таке
invoiceId (path)UuidТак
org_id (query)UuidНі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…

Тіло запиту

НазваТипОбов'язковеЩо це таке
tostringНіWhere to send it. Defaults to the client's stored email.
localestringНіWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringНіA covering line to put above the amount.

Відповідь

НазваТипОбов'язковеЩо це таке
idUuidТакUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringНіThe 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>Так
is_overduebooleanНі⭐ 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_idUuidНіUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringНі
currencystringТак
issue_datestringТак
due_datestringНі
referencestringНі
notesstringНі
footerstringНі
subtotal_minorintegerНі
discount_minorintegerНі
tax_minorintegerНі
total_minorintegerТак
amount_paid_minorintegerНі
amount_due_minorintegerНі
tax_breakdownAgencyInvoiceTaxGroup[]Ні
sourcestringНіWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringНі
last_sent_tostringНі
paid_atstringНі
void_reasonstringНі
created_atstringНі
linesAgencyInvoiceLine[]Ні
paymentsAgencyInvoicePayment[]Ні
portal_urlstringНі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,…
sent_tostringНі

Помилки, які може повертати ця кінцева точка

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