agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/issue
Give the invoice its number and freeze it.
Doğrulama
API açarını bearer token kimi göndərin. Açar agency.invoicing.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə sorğu parametri kimi org_id qəbul edir. Onu buraxın və sorğu bütün kirayə alt ağacınızı əhatə etsin; sorğunu bir təşkilatla məhdudlaşdırmaq üçün onu göndərin.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/issue \
-H "Authorization: Bearer zdk_live_…"Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
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`.
Parametrlər
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
invoiceId (path) | Uuid | Bəli | — |
org_id (query) | Uuid | Xeyr | 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… |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | Uuid | Bəli | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
number | string | Xeyr | 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> | Bəli | — |
is_overdue | boolean | Xeyr | ⭐ 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 | Xeyr | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client_name | string | Xeyr | — |
currency | string | Bəli | — |
issue_date | string | Bəli | — |
due_date | string | Xeyr | — |
reference | string | Xeyr | — |
notes | string | Xeyr | — |
footer | string | Xeyr | — |
subtotal_minor | integer | Xeyr | — |
discount_minor | integer | Xeyr | — |
tax_minor | integer | Xeyr | — |
total_minor | integer | Bəli | — |
amount_paid_minor | integer | Xeyr | — |
amount_due_minor | integer | Xeyr | — |
tax_breakdown | AgencyInvoiceTaxGroup[] | Xeyr | — |
source | string | Xeyr | Where the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it. |
sent_at | string | Xeyr | — |
last_sent_to | string | Xeyr | — |
paid_at | string | Xeyr | — |
void_reason | string | Xeyr | — |
created_at | string | Xeyr | — |
lines | AgencyInvoiceLine[] | Xeyr | — |
payments | AgencyInvoicePayment[] | Xeyr | — |
portal_url | string | Xeyr | 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,… |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 409 · 429