reseller

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

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

सर्व reseller एंडपॉइंट्स

प्रमाणीकरण

बेरर टोकन म्हणून API की पाठवा. की मध्ये reseller.manage परवानगी असणे आवश्यक आहे; ती नसलेली की 404 ऐवजी 403 सह नाकारली जाते.

जिथे तुमचा ऑर्गनायझेशन आयडी (organization id) जाईल

हा एन्डकॉप्ट तुमच्या संस्थेची आयडी थेट URL मध्ये org_id म्हणून घेतो. तो पाथमध्ये टाका — त्यासाठी दुसरा कोणताही हेडर किंवा क्वेरी पॅरामीटर चालणार नाही.

तुमची संस्था आयडी (organisation id) तुमच्या डॅशबोर्डवरील API की स्क्रीनवर, की च्या बाजूला आहे. तुम्ही केलेल्या प्रत्येक कॉलमधील तोच आयडी असतो.

प्रयत्न करा

कोनसांस्कृतिक कंसात (<>) असलेली कोणतीही गोष्ट तुमच्या स्वतःच्या मूल्यांनी बदला आणि key प्लेसहोल्डरला तुमच्या डॅशबोर्डवरील किने बदला.

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

साइन इन केलेले आहे? तुमच्या डॅशबोर्डमधील API कन्सोल तुमची खरी संस्था आयडी आणि तुमची स्वतःची की आपोआप भरतो आणि लाइव्ह API विरुद्ध विनंती कार्यान्वित करतो जेणेकरून तुम्हाला वास्तविक प्रतिसाद पाहता येईल. एपी कन्सोलमध्ये हा एंडपॉइंट उघडा

तपशील

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

पॅरामीटर्स

नावप्रकारआवश्यकहे काय आहे
org_id (path)UuidहोयThe client organization whose balance moves. Must be one of yours.
org_id (query)UuidनाहीWhich of YOUR organizations is acting. Not the client.

विनंती मुख्य भाग

नावप्रकारआवश्यकहे काय आहे
delta_microsintegerहोयSigned USD micros. Positive gives credit to the client, negative takes unspent credit back. Zero is refused — a ledger row that means nothing.
reasonstringहोयWhy. 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.

प्रतिसाद

नावप्रकारआवश्यकहे काय आहे
pool_balance_microsintegerहोय
client_balance_microsintegerहोय
typical_callsintegerहोयRoughly how many AI questions the client's new balance buys. An **illustration** — a long article costs many times a short question.

ही एंडपॉइंट परत करू शकेल अशा त्रुटी

401 · 403 · 404 · 422 · 429