agency-invoicing
POST /v1/agency-invoicing/invoices/{invoiceId}/send
Email the invoice to your client, with the PDF attached.
การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ agency.invoicing.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
พอยต์ข้อมูลนี้รับ org_id เป็นพารามิเตอร์คิวรี หากเว้นว่างไว้ การเรียกใช้งานจะครอบคลุมย่อยของเทแนนท์ทั้งหมดของคุณ แต่หากระบุค่า จะช่วยจำกัดขอบเขตการเรียกให้เหลือเพียงองค์กรเดียว
รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/send \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
Issues it first if it is still a draft. Leaves on YOUR mail account when you have connected one, otherwise on ours with your address as Reply-To and a line saying who issued it. The PDF is attached as bytes rather than linked — a link would expire, and it would put our storage hostname in front of your client. 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… |
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
to | string | ไม่ใช่ | Where to send it. Defaults to the client's stored email. |
locale | string | ไม่ใช่ | Which language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice. |
note | string | ไม่ใช่ | A covering line to put above the amount. |
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
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,… |
sent_to | string | ไม่ใช่ | — |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 409 · 422 · 429 · 503