agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/issue
Give the invoice its number and freeze it.
Санҷиши ҳаққоният
Kaliti API-ро ҳамчун рамзи доранда (bearer token) фиристед. Калит бояд дорои иҷозати agency.invoicing.manage бошад; калиди бидуни он бо хатои 403 рад карда мешавад, на 404.
Ҷое, ки рақами мушаххаси ташкилоти шумо ҷойгир аст
Ин нуқтаи поёнӣ org_id-ро ҳамчун параметри дархостӣ қабул мекунад. Онро хориҷ кунед ва даъват тамоми зердарахти иҷораи шуморо фаро мегирад; барои маҳдуд кардани даъват ба як созмон онро фиристед.
Rakami муайянкунандаи ташкилоти шумо дар экрани калидҳои API дар панели идоракунии шумо, дар паҳлӯи худи калид ҷойгир аст. Ин як раками муайянкунанда дар ҳар یک дархосте, ки шумо иҷро мекунед, якхела аст.
Санҷидан
Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/issue \
-H "Authorization: Bearer zdk_live_…"Воarid шудаед? Консоли 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… |
Ҷавоб
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
id | Uuid | Бале | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Не | The agency's own number. ⛔ Empty until issue: a number allocated to something that may never be sent leaves a hole in a sequence. |
status | string<draft, sent, partially_paid, paid, void> | Бале | — |
is_overdue | boolean | Не | ⭐ 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_id | Uuid | Не | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Не | — |
currency | string | Бале | — |
issue_date | string | Бале | — |
due_date | string | Не | — |
reference | string | Не | — |
notes | string | Не | — |
footer | string | Не | — |
subtotal_minor | integer | Не | — |
discount_minor | integer | Не | — |
tax_minor | integer | Не | — |
total_minor | integer | Бале | — |
amount_paid_minor | integer | Не | — |
amount_due_minor | integer | Не | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Не | — |
source | string | Не | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Не | — |
last_sent_to | string | Не | — |
paid_at | string | Не | — |
void_reason | string | Не | — |
created_at | string | Не | — |
lines | AgencyInvoiceLine[] | Не | — |
payments | AgencyInvoicePayment[] | Не | — |
portal_url | string | Не | 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