agency-invoicing

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

Give the invoice its number and freeze it.

ចំណុចបញ្ចប់ agency-invoicing ទាំងអស់

ការផ្ទៀងផ្ទាត់ភាពត្រឹមត្រូវ

បញ្ជូនសោ API ជា bearer token។ សោនេះត្រូវតែមានសិទ្ធិ agency.invoicing.manage។ សោដែលគ្មានសិទ្ធិនេះនឹងត្រូវបដិសេធដោយកូដ 403 មិនមែន 404 ទេ។

កន្លែងដែលលេខសម្គាល់អង្គការរបស់អ្នកត្រូវដាក់

ចំណុចប្រទាក់នេះទទួលយក org_id ជាប៉ារ៉ាម៉ែត្រសំណួរ។ សូមទុកវាចោល ហើយការហៅនេះនឹងគ្របដណ្តប់លើដើមឈើភតិកៈទាំងមូលរបស់អ្នក; សូមបញ្ជូនវាដើម្បីកំណត់ការហៅឱ្យចង្អៀតមកត្រឹមអង្គការតែមួយ។

លេខសម្គាល់អង្គការរបស់អ្នកស្ថិតនៅលើអេក្រង់គ្រាប់ចុច API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក នៅជាប់នឹងគ្រាប់ចុចផ្ទាល់តែម្ដង។ វាគឺជាលេខសម្គាល់ដូចគ្នានៅក្នុងការហៅទូរសព្ទនីមួយៗដែលអ្នកធ្វើ។

សាកល្បង

ជំនួសអ្វីមួយនៅក្នុងសញ្ញាពងក្រពើ < > ដោយប្រើតម្លៃផ្ទាល់ខ្លួនរបស់អ្នក ហើយជំនួសកន្លែងរក្សាទុកសោដោយប្រើសោចេញពីផ្ទាំងគ្រប់គ្រងរបស់អ្នក។

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/issue \
  -H "Authorization: Bearer zdk_live_…"

បានចូលគណនីរួចហើយមែនទេ? កុងសូល API ក្នុងផ្ទាំងគ្រប់គ្រងរបស់អ្នក បំពេញលេខសម្គាល់ស្ថាប័នពិតប្រាកដរបស់អ្នក និងសោផ្ទាល់ខ្លួនរបស់អ្នក ហើយដំណើរការសំណើទល់នឹង API ផ្ទាល់ ដូច្នេះអ្នកអាចមើលឃើញការឆ្លើយតបពិតប្រាកដ។ បើកចំណុចបញ្ចប់នេះក្នុងកុងសូល API

ព័ត៌មានលម្អិត

Allocates the next number in YOUR series, freezes both parties onto the document and makes the payment link live. ⛔ An invoice with no lines, or one totalling zero, is refused — a numbered document for nothing is a gap in a sequence a tax authority expects to be unbroken. 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…

ផ្អាកដំណើរការ

ឈ្មោះប្រភេទតម្រូវការតើវាជាអ្វី
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,…

កំហុសដែលចំណុចបញ្ចប់នេះអាចបង្វិលត្រឡប់មកវិញ

401 · 403 · 404 · 409 · 429