reseller

POST /v1/reseller/ai/credits/clients/{org_id}

Give one of your clients AI credit, or take unspent credit back.

Dukkan reseller wuraren ƙarshe

Tabbatar da Asali

Aika maɓallin API azaman alamar ɗauka (bearer token). Dole ne maɓallin ya kasance yana da izinin reseller.manage; idan babu shi, za a ƙi amfani da maɓallin tare da lambar 403, ba 404 ba.

Inda ID ɗin kungiyar ku ke zuwa

Wannan wurin shiga yana daukar ID din kungiyar ku a cikin URL din da kansa, azaman org_id. Maye gurbin shi a cikin hanyar - babu wani take ko sigar tambaya da zata yi maimakon haka.

Ana samun lambar kungiyar ku a kan shafin maɓallan API a cikin madanninku, kusa da maɓallin kansa. Shi ne lambar da ta dace a kowane kiran da kuka yi.

Gwada

May gurbin komai da ke cikin kusurwa da ƙimar ka, kuma may gurbin maballi da maballi daga allon sarrafa ka.

curl -X POST https://api.zinndigital.com/v1/reseller/ai/credits/clients/{org_id} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "delta_micros": <integer>, "reason": <string> }'

An shiga? Na'urar sarrafa API da ke cikin sashin kulawarka tana cika ainihin lambar ƙungiyarka da maɓallinka naka, sannan tana gudanar da buƙatar a kan ainihin API don haka zaka iya ganin amsar gaske. Buɗe wannan tashar a cikin na'urar kula da API

Bayani

Moves credit between your pool and one client's balance in one transaction: a positive `delta_micros` gives, a negative one takes back. A client who has already **spent** the credit cannot be taken below zero — the request is refused and names what is left. A client that is not yours is refused with the same code and message as one that does not exist, so this cannot be used to discover whether an organization id is real. This is the manual route, for a trial, a goodwill gesture, or a bundle sold offline. The self-serve route is your client buying a pack from you, which draws on the same pool. Requires `reseller.manage`.

Sigogi

SunaNau'iAna buƙataAbin da yake
org_id (path)UuidEhThe client organization whose balance moves. Must be one of yours.
org_id (query)UuidA'aWhich of YOUR organizations is acting. Not the client.

Jikin buƙata

SunaNau'iAna buƙataAbin da yake
delta_microsintegerEhSigned USD micros. Positive gives credit to the client, negative takes unspent credit back. Zero is refused — a ledger row that means nothing.
reasonstringEhWhy. Required, for the same reason a staff adjustment requires one: a movement of somebody's money with no stated cause is unanswerable three months later.

Martani

SunaNau'iAna buƙataAbin da yake
pool_balance_microsintegerEh
client_balance_microsintegerEh
typical_callsintegerEhRoughly how many AI questions the client's new balance buys. An **illustration** — a long article costs many times a short question.

Kuskuren da wannan matsaya za ta iya maido wa

401 · 403 · 404 · 422 · 429