agency-invoicing

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

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

Bütün agency-invoicing nöqtələri

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

AdTipTələb olunurNədir
invoiceId (path)UuidBəli
org_id (query)UuidXeyrWhich 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

AdTipTələb olunurNədir
tostringXeyrWhere to send it. Defaults to the client's stored email.
localestringXeyrWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringXeyrA covering line to put above the amount.

Cavab

AdTipTələb olunurNədir
idUuidBəliUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringXeyrThe 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>Bəli
is_overduebooleanXeyr⭐ 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_idUuidXeyrUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringXeyr
currencystringBəli
issue_datestringBəli
due_datestringXeyr
referencestringXeyr
notesstringXeyr
footerstringXeyr
subtotal_minorintegerXeyr
discount_minorintegerXeyr
tax_minorintegerXeyr
total_minorintegerBəli
amount_paid_minorintegerXeyr
amount_due_minorintegerXeyr
tax_breakdownAgencyInvoiceTaxGroup[]Xeyr
sourcestringXeyrWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringXeyr
last_sent_tostringXeyr
paid_atstringXeyr
void_reasonstringXeyr
created_atstringXeyr
linesAgencyInvoiceLine[]Xeyr
paymentsAgencyInvoicePayment[]Xeyr
portal_urlstringXeyrThe 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_tostringXeyr

Bu son nöqtənin qaytara biləcəyi xətalar

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