reseller

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

Correct a client's balance.

Todos los endpoints de reseller

Autenticación

Envía una clave de API como token de portador. La clave debe tener el permiso reseller.manage; una clave que no lo tenga se rechazará con un código 403, no 404.

Donde va el ID de tu organización

Este endpoint acepta org_id como parámetro de consulta. Omítelo y la llamada abarcará todo tu subárbol de inquilinos; envíalo para acotar la llamada a una sola organización.

El id de tu organización se encuentra en la pantalla de claves de API en tu panel de control, junto a la propia clave. Es el mismo id en cada llamada que realices.

Pruébalo

Reemplaza cualquier elemento entre corchetes angulares por tus propios valores, y el marcador de posición key con una clave de tu panel de control.

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

¿Has iniciado sesión? La consola de la API en tu panel de control rellena el ID de tu organización real y tu propia clave, y ejecuta la solicitud contra la API en vivo para que puedas ver la respuesta real. Abre este endpoint en la consola de la API

Detalles

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

Parámetros

NombreTipoObligatorio¿Qué es esto?
walletId (path)Uuid
org_id (query)UuidNoWhich 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…

Cuerpo de la solicitud

NombreTipoObligatorio¿Qué es esto?
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.

Respuesta

NombreTipoObligatorio¿Qué es esto?
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 | nullNoThe 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>No⭐ **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[]NoThe 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…

Errores que este endpoint puede devolver

401 · 403 · 404 · 422 · 429