billing

PUT /v1/billing/profile

Replace the organization's billing profile.

Tất cả các điểm cuối billing

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 billing.invoice.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 PUT https://api.zinndigital.com/v1/billing/profile \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "billing_address": <BillingAddress> }'

Đã đă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

A full replace (PUT) of the editable "Bill to" fields; an omitted field resets to blank. `billing_address` (with its required `country`, needed for tax) is the one mandatory member. Editing changes only invoices issued **afterwards** — a past invoice snapshotted the buyer block at issue time and is never rewritten (docs/34 §1.1). `vat_status` is engine-owned (the validate-not-trust flow, §2.3) and is not accepted here; changing `vat_number` resets it to `unvalidated`. Requires `billing.invoice.manage` in the target organization.

Tham số

TênLoạiBắt buộcNội dung này là gì
org_id (query)UuidKhôngThe organization whose profile to replace; defaults to the caller's own.

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
legal_namestringKhông
company_namestringKhông
billing_addressBillingAddressA billing address. Everything is optional **except** `country`, which tax determination needs (docs/34 §2.2). `country` is an ISO 3166-1 alpha-2 code, uppercased by the server.
vat_numberstringKhông
tax_idLabelValueKhông
custom_invoice_fieldsLabelValue[]Không
billing_emailstringKhông
invoice_localestringKhông

Phản hồi

TênLoạiBắt buộcNội dung này là gì
org_idstring
legal_namestring
company_namestring
billing_addressBillingAddressA billing address. Everything is optional **except** `country`, which tax determination needs (docs/34 §2.2). `country` is an ISO 3166-1 alpha-2 code, uppercased by the server.
vat_numberstring
vat_statusstring<unvalidated, pending, valid, invalid>State of the validate-not-trust check on `vat_number` (docs/34 §2.3). Read-only; a change to `vat_number` resets it to `unvalidated`.
tax_idLabelValueKhôngA free-label secondary tax id (US EIN, AU ABN, …). Null when unset.
custom_invoice_fieldsLabelValue[]Up to five customer-defined `{label, value}` lines, rendered verbatim.
billing_emailstringWhere invoices are delivered; blank means the account email.
invoice_localestringPreferred invoice language; blank means the account language.
updated_atstringKhôngWhen the profile was last saved. Null if it has never been saved.

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

401 · 403 · 422 · 429