reseller

POST /v1/reseller/client-wallets/{walletId}/adjustments

Correct a client's balance.

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 POST https://api.zinndigital.com/v1/reseller/client-wallets/{walletId}/adjustments \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "amount_minor": <integer>, "reason": <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

Signed — positive credits, negative takes back. ⛔ A negative adjustment that would put the client below zero is refused with 422 naming what is available: you may correct your own mistake, you may not push a customer into debt. `reason` is required and the client sees it on their statement. A wallet belonging to another reseller answers 404, never 403, so this is not an existence oracle. Requires `reseller.manage`.

Tham số

TênLoạiBắt buộcNội dung này là gì
walletId (path)Uuid
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ì
amount_minorintegerSigned minor units. ⛔ Cannot take the client below zero.
reasonstringRequired, and the client sees it on their statement. An unexplained movement of somebody else's money is the first thing an audit asks about.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
org_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
currencystring
balance_minorintegerWhat you are **owed** — the float your provider is holding for you.
spendable_minorintegerWhat you can **spend today**. Lower than `balance_minor` when your provider's reseller programme is suspended: the deposit is still yours, but nobody is delivering service again…
reseller_org_idUuid | nullKhôngThe provider whose float this is.
entriesClientWalletEntry[]
other_floatsClientOtherFloat[]Balances a **previous** provider still holds for you. ⛔ Normally empty. A client who changed provider is still owed what the old one took; omitting it would make that money disa…
providerstring<reseller, zinn>Không⭐ **Who is holding this money.** One screen serves both, because *"credit you hold with your provider"* is one question whose answer depends on the customer, not on the feature.…
pursesWalletPurse[]KhôngThe owner's *"one ledger, named purses"* — a balance may be restricted to a kind of spending. ⛔ Empty for a reseller float, which has no purses. A purse whose authoritative stor…

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

401 · 403 · 404 · 422 · 429