agency-invoicing

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

Void an invoice.

Tất cả các điểm cuối agency-invoicing

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền agency.invoicing.manage; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Nơi điền id tổ chức của bạn

Điểm cuối này nhận org_id làm tham số truy vấn. Hãy bỏ trống để áp dụng cho toàn bộ cây thuê của bạn; hoặc truyền giá trị vào để thu hẹp phạm vi gọi về một tổ chức duy nhất.

Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

curl -X POST https://api.zinndigital.com/v1/agency-invoicing/invoices/{invoiceId}/void \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

⛔ The number is KEPT — a voided invoice is a document that says VOID on it, not an absence, and deleting the number would leave the gap the sequence exists to prevent. ⛔ Refused when payments have been recorded: that is a refund, which is a different act. Requires `agency.invoicing.manage`.

Tham số

TênLoạiBắt buộcNội dung này là gì
invoiceId (path)Uuid
org_id (query)UuidKhôngWhich 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…

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
reasonstringKhông

Phản hồi

TênLoạiBắt buộcNội dung này là gì
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
numberstringKhôngThe 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_overduebooleanKhông⭐ 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_idUuidKhôngUUIDv7 identifier — sortable by creation time (docs/02 §8).
client_namestringKhông
currencystring
issue_datestring
due_datestringKhông
referencestringKhông
notesstringKhông
footerstringKhông
subtotal_minorintegerKhông
discount_minorintegerKhông
tax_minorintegerKhông
total_minorinteger
amount_paid_minorintegerKhông
amount_due_minorintegerKhông
tax_breakdownAgencyInvoiceTaxGroup[]Không
sourcestringKhôngWhere the invoice came from — `time_tracking` when it was generated from tracked hours, empty when an agency typed it.
sent_atstringKhông
last_sent_tostringKhông
paid_atstringKhông
void_reasonstringKhông
created_atstringKhông
linesAgencyInvoiceLine[]Không
paymentsAgencyInvoicePayment[]Không
portal_urlstringKhôngThe 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,…

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 409 · 429