agency-invoicing

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

Give the invoice its number and freeze it.

Усі кінцеві точки 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}/issue \
  -H "Authorization: Bearer zdk_live_…"

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

Деталі

Allocates the next number in YOUR series, freezes both parties onto the document and makes the payment link live. ⛔ An invoice with no lines, or one totalling zero, is refused — a numbered document for nothing is a gap in a sequence a tax authority expects to be unbroken. 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…

Відповідь

НазваТипОбов'язковеЩо це таке
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,…

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

401 · 403 · 404 · 409 · 429