reseller

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

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

Dhammaan reseller bixiyayaasha

Xaqiijinta aqoonsiga

U dir furaha API ah calaamad dusha ah (bearer token). Furaha waa inuu wataa ruqadda reseller.manage; furaha aan wadan waxaa loo diidayaa 403, ee ma aha 404.

Meesha aqoonsiga ururkaagu galayo

Bankani wuxuu qaataa aqoonsiga ururkaaga URL-ka dhexdiisa, sida org_id. Ku beddel wadada dhexdeeda — ma jiro madax (header) ama cabbir weydiin (query parameter) beddeli kara.

Aqoonsiga ururkaagu wuxuu ku yaallaa shaashada furayaasha API ee dashboard-kaaga, oo ku xiga furaha laftiisa. Waa isku aqoonsi wicitaan kasta oo aad sameyso.

Isku day

Ku beddel wax kasta oo ku dhex jira qeebaha xaglaha ah qiimayaashaada, sidoo kalena haystaaha furaha ku beddel fure ka dhex muuqda dashboordigaaga.

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

Ma sign-garaysay? Qalabka API ee ku jira dashboard-kaagu wuxuu buuxiyaa aqoonsigaaga ururka ee dhabta ah iyo furahaaga gaarka ah, wuxuuna ku shaqeysiiyaa codsiga API-ga nool si aad u aragto jawaabta dhabta ah. Kani ka fur barta kontoroolka ee API

Faahfaahin

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

Cabiraha

MagacaNoocLoo baahan yahayMaxay tahay
org_id (path)UuidHaaThe client organization whose balance moves. Must be one of yours.
org_id (query)UuidMayaWhich of YOUR organizations is acting. Not the client.

Codsiga jidhkiisa

MagacaNoocLoo baahan yahayMaxay tahay
delta_microsintegerHaaSigned USD micros. Positive gives credit to the client, negative takes unspent credit back. Zero is refused — a ledger row that means nothing.
reasonstringHaaWhy. 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.

Jawaab

MagacaNoocLoo baahan yahayMaxay tahay
pool_balance_microsintegerHaa
client_balance_microsintegerHaa
typical_callsintegerHaaRoughly how many AI questions the client's new balance buys. An **illustration** — a long article costs many times a short question.

Cilladaha ay bartaani soo celin karto

401 · 403 · 404 · 422 · 429