agency-invoicing

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

Email the invoice to your client, with the PDF attached.

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}/send \
  -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

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`.

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ì
tostringKhôngWhere to send it. Defaults to the client's stored email.
localestringKhôngWhich language to render in. Defaults to the client's locale — an agency in Berlin invoicing a French client sends a French invoice.
notestringKhôngA covering line to put above the amount.

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,…
sent_tostringKhông

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

401 · 403 · 404 · 409 · 422 · 429 · 503