reseller

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

Correct a client's balance.

Все эндпоинты reseller

Вся документация для разработчиков

Аутентификация

Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение reseller.manage; ключ без него отклоняется с кодом 403, а не 404.

Идентификатор вашей организации

Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.

Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.

Попробовать

Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.

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> }'

Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли

Подробнее

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.

Параметры

ИмяТипОбязательноЧто это
walletId (path)UuidДа
org_id (query)UuidНетWhich 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…

Тело запроса

ИмяТипОбязательноЧто это
amount_minorintegerДаSigned minor units. ⛔ Cannot take the client below zero.
reasonstringДаRequired, and the client sees it on their statement. An unexplained movement of somebody else's money is the first thing an audit asks about.

Ответ

ИмяТипОбязательноЧто это
org_idUuidДаUUIDv7 identifier — sortable by creation time (docs/02 §8).
currencystringДа
balance_minorintegerДаWhat you are owed — the float your provider is holding for you.
spendable_minorintegerДаWhat 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 against…
reseller_org_idUuid | nullНетThe 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…
providerstring<reseller, zinn>Нет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[]НетThe 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 store…

Ошибки, которые может возвращать этот эндпоинт

401 · 403 · 404 · 422 · 429