agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس agency.invoicing.manage اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
جہاں آپ کی تنظیم کی آئی ڈی آتی ہے
یہ اینڈ پوائنٹ 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… |
درخواست کا باڈی
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
to | string | نہیں | Where to send it. Defaults to the client's stored email. |
locale | string | نہیں | 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 | نہیں | A covering line to put above the amount. |
جواب
| نام | قسم | لازمی | یہ کیا ہے |
|---|---|---|---|
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,… |
sent_to | string | نہیں | — |
وہ خرابیان جو یہ اینڈ پوائنٹ واپس کر سکتا ہے
401 · 403 · 404 · 409 · 422 · 429 · 503