agency-invoicing

POST /v1/agency-invoicing/invoices

Start a draft invoice.

จุดสิ้นสุด agency-invoicing ทั้งหมด

การยืนยันตัวตน

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ agency.invoicing.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

พอยต์ข้อมูลนี้รับ 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 '{  }'

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล 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_idUuidไม่ใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
clientAgencyClientWriteไม่ใช่
currencystringไม่ใช่
issue_datestringไม่ใช่
due_datestringไม่ใช่
referencestringไม่ใช่
notesstringไม่ใช่
footerstringไม่ใช่
linesAgencyInvoiceLineWrite[]ไม่ใช่

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
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 · 422 · 429