agency-invoicing
POST /v1/agency-invoicing/invoices
Start a draft invoice.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই agency.invoicing.manage অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
যেখানে আপনার অর্গানাইজেশন আইডি দেওয়া হবে
এই এন্ডপয়েন্টটি org_id-কে একটি কুয়েরি প্যারামিটার হিসেবে গ্রহণ করে। এটি বাদ দিলে কলটি আপনার পুরো টেনেন্সি সাবট্রিকে কভার করে; এটিকে পাঠালে কলটি একটি সংস্থায় সীমাবদ্ধ হয়।
আপনার ড্যাশবোর্ডের API কি স্ক্রিনে, কি-এর ঠিক পাশেই আপনার অর্গানাইজেশন আইডি রয়েছে। আপনি যে কলই করুন না কেন, সবগুলিতেই এই আইডি একই থাকে।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
Give a `client_id`, or a `client` object to create one inline — a client typed during invoicing is SAVED, so next time you can just select them. ⛔ Totals are never accepted from the caller; they are computed from the lines. Requires `agency.invoicing.manage`.
পরামিতি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
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… |
অনুরোধের বডি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
client_id | Uuid | না | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
client | AgencyClientWrite | না | — |
currency | string | না | — |
issue_date | string | না | — |
due_date | string | না | — |
reference | string | না | — |
notes | string | না | — |
footer | string | না | — |
lines | AgencyInvoiceLineWrite[] | না | — |
প্রতিক্রিয়া
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
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,… |
এই এন্ডপয়েন্ট থেকে যেসব ত্রুটি আসতে পারে
401 · 403 · 404 · 422 · 429