agency-invoicing
POST /v1/agency-invoicing/invoices
Start a draft invoice.
စစ်မှန်ကြောင်း အတည်ပြုခြင်း
API သော့တစ်ခုကို bearer token အဖြစ် ပို့ပါ။ သော့တွင် agency.invoicing.manage ခွင့်ပြုချက် ပါရှိရမည်ဖြစ်ပြီး၊ ၎င်းမပါရှိသော သော့ကို 404 အစား 403 ဖြင့် ငြင်းပယ်ပါမည်။
သင့်အဖွဲ့အစည်း၏ id ထည့်သွင်းရမည့်နေရာ
ဤအစွန်အဖျား (endpoint) သည် org_id ကို မေးမြန်းချက် ကန့်သတ်ဘောင် (query parameter) အဖြစ် လက်ခံပါသည်။ ၎င်းကို ချန်လှပ်ထားပါက ခေါ်ဆိုမှုသည် သင်၏ ငှားရမ်းမှု လက်အောက်ခံသစ်ပင် (tenancy subtree) တစ်ခုလုံးကို လွှမ်းခြုံမည်ဖြစ်ပြီး၊ အဖွဲ့အစည်းတစ်ခုတည်းသို့ ကန့်သတ်ခေါ်ဆိုရန် ၎င်းကို ပေးပို့ပါ။
သင့်အဖွဲ့အစည်း id သည် သင်၏ ဒက်ရှ်ဘုတ်ရှိ API သော့များ မျက်နှာပြင်တွင်၊ သော့၏ ဘေး၌ ရှိပါသည်။ ၎င်းသည် သင်ပြုလုပ်သည့် ခေါ်ဆိုမှုတိုင်းတွင် တူညီသော id ဖြစ်ပါသည်။
စမ်းကြည့်ရန်
ထောင့်ချိတ်များအတွင်းရှိ မည်သည့်အရာကိုမဆို သင်၏ကိုယ်ပိုင်တန်ဖိုးများဖြင့် အစားထိုးပြီး သင့်ဒက်ရှ်ဘုတ်မှ သော့ချက်တစ်ခုဖြင့် key ကို အစားထိုးပါ။
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'ဝင်ရောက်ပြီးပြီလား။ သင့်ဒက်ရှ်ဘုတ်ရှိ API ကွန်ဆိုးလ်တွင် သင့်၏ တကယ့်အဖွဲ့အစည်း ID နှင့် သင့်ကိုယ်ပိုင်သော့ချက်တို့ဖြင့် ဖြည့်သွင်းပေးပြီး တကယ့်တုံ့ပြန်ချက်ကို သင်မြင်နိုင်ရန် တိုက်ရိုက် API (live API) ကို အသုံးပြု၍ တောင်းဆိုမှုကို လုပ်ဆောင်ပေးပါသည်။ ဤအဆုံးသတ်အမှတ် (endpoint) ကို API ကွန်ဆိုးလ်တွင် ဖွင့်ပါ
အသေးစိတ်အချက်အလက်များ
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