agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
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}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'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
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`.
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… |
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
to | string | Xeyr | Where to send it. Defaults to the client's stored email. |
locale | string | Xeyr | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | Xeyr | A covering line to put above the amount. |
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,… |
sent_to | string | Xeyr | — |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 404 · 409 · 422 · 429 · 503