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

ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา

ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

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

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API

รายละเอียด

One billing document — an invoice or a credit note — with its own lines and the payment summaries of the order it bills. RBAC + RLS scoped; an out-of-scope or unknown id is a 404.

พารามิเตอร์

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
invoiceId (path)Uuidใช่The billing document's id. This is the Invoice/CreditNote id — not the order's. It was the order's id while /v1/invoices projected orders (docs/34 §7); the projection…

การตอบกลับ

ชื่อประเภทจำเป็นต้องมีลักษณะของสิ่งนี้
idUuidใช่UUIDv7 identifier — sortable by creation time (docs/02 §8).
document_typeInvoiceDocumentTypeใช่Which kind of legal document this is (docs/34 §1.3). An invoice is what we bill; a credit_note is what we un-bill — it carries its own ZD-CRN series number and names the…
order_idobjectไม่ใช่The order this document bills; null for a document raised without one.
credits_invoice_idobjectไม่ใช่For a credit_note, the invoice it un-bills. Always null on an invoice.
numberstringใช่The gapless legal document number (docs/34 §1.2), allocated per legal entity, series and year. Credit notes use the separate ZD-CRN series.
statusInvoiceStatusใช่A billing document's payment state, read off the document itself (docs/34 §4.1). paid — money captured; due — issued and still owed; overdue — past its due date unpaid;…
currencyCurrencyCodeใช่ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
subtotal_minorintegerใช่
tax_minorintegerใช่
discount_minorintegerใช่
total_minorintegerใช่
issued_atobjectไม่ใช่When the document was issued and its number allocated.
pdf_urlobjectใช่A short-lived PDF link once rendered (docs/34 §4.2); null until then.
linesInvoiceLine[]ใช่
paymentsPayment[]ใช่Payment attempts against the order this document bills, so a customer can see how an invoice was settled. Empty for a document with no order.
created_atstringใช่

ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้

401 · 403 · 404 · 429