reseller

PUT /v1/reseller/legal-entity

Save the company details your clients' invoices are issued under.

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

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 reseller.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/reseller/legal-entity \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string>, "country": <string>, "number_prefix": <string> }'

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

Creates the entity the first time and updates it afterwards — never a second row. `number_prefix` is **globally unique across every company on the platform** because it is what keeps two issuers' invoice numbers apart, so a value already in use is a 409; and it **freezes once an invoice has been issued** under this company, because releasing it would let the next taker mint numbers you have already issued. Everything else stays editable — a company that moves office must be able to say so. Requires `reseller.manage`.

Tham số

TênLoạiBắt buộcNội dung này là gì
org_id (query)UuidKhôngWhich of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r…

Nội dung yêu cầu

TênLoạiBắt buộcNội dung này là gì
idUuidKhôngUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestring
company_numberstringKhông
address_line1stringKhông
address_line2stringKhông
citystringKhông
regionstringKhông
postcodestringKhông
countrystringISO 3166-1 alpha-2. Stored uppercase.
vat_numberstringKhông
footer_textstringKhông
number_prefixstringThe prefix in every invoice number you issue (`AG-INV-2026-000123`). Globally unique across all companies on the platform, and frozen once you have issued an invoice.
number_prefix_lockedbooleanKhôngTrue once an invoice has been issued under this company.
created_atstringKhông
updated_atstringKhông

Phản hồi

TênLoạiBắt buộcNội dung này là gì
dataResellerLegalEntity | null`null` when no company details are held yet.

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

401 · 403 · 404 · 409 · 422 · 429