agency-invoicing

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

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

همه نقاط پایانی agency-invoicing

احراز هویت

یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز agency.invoicing.manage باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد می‌شود، نه 404.

جایی که شناسه سازمان شما قرار می‌گیرد

این نقطه پایانی org_id را به عنوان یک پارامتر پرس‌وجو می‌پذیرد. آن را رها کنید تا فراخوانی کل زیردرخت اجاره‌ای شما را پوشش دهد؛ آن را ارسال کنید تا فراخوانی به یک سازمان محدود شود.

شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواست‌هایی که ارسال می‌کنید یکسان است.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

وارد شده‌اید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی API زنده اجرا می‌کند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید

جزئیات

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`.

پارامترها

نامنوعالزامیچیست
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…

بدنه درخواست

نامنوعالزامیچیست
tostringخیرWhere to send it. Defaults to the client's stored email.
localestringخیرWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringخیرA covering line to put above the amount.

پاسخ

نامنوعالزامیچیست
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,…
sent_tostringخیر

خطاهایی که این نقطه پایانی می‌تواند برگرداند

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