reseller

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

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

Vituo vyote vya reseller

Uthibitishaji

Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya reseller.manage; ufunguo usio nayo unakataliwa kwa 403, si 404.

Mahali ambapo kitambulisho cha shirika lako huwekwa

Kituo hiki cha mwisho kinachukua kitambulisho cha shirika lako katika URL yenyewe, kama org_id. Kiweke kwenye njia — hakuna kichwa au kigezo cha hoja ambacho kitafanya kazi badala yake.

Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.

Jaribu

Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.

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

Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API

Maelezo

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

Vigezo

JinaAinaInayohitajikaKilicho hiki
org_id (path)UuidNdiyoThe client organization whose balance moves. Must be one of yours.
org_id (query)UuidHapanaWhich of YOUR organizations is acting. Not the client.

Mwili wa ombi

JinaAinaInayohitajikaKilicho hiki
delta_microsintegerNdiyoSigned USD micros. Positive gives credit to the client, negative takes unspent credit back. Zero is refused — a ledger row that means nothing.
reasonstringNdiyoWhy. 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.

Majibu

JinaAinaInayohitajikaKilicho hiki
pool_balance_microsintegerNdiyo
client_balance_microsintegerNdiyo
typical_callsintegerNdiyoRoughly how many AI questions the client's new balance buys. An **illustration** — a long article costs many times a short question.

Hitilafu ambazo mwisho huu unaweza kurudisha

401 · 403 · 404 · 422 · 429