reseller

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

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

ყველა reseller ენდპოინტი

ავტორიზაცია

API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს reseller.manage ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.

სwhere your organisation id goes-ის ადგილი

ეს ენდპოინტი იღებს თქვენი ორგანიზაციის ID-ს თავად URL-ში, როგორც org_id. ჩაანაცვლეთ ის მისამართში — არ არსებობს ჰედერი ან ქუერის პარამეტრი, რომელიც ამას შეცვლის.

თქვენი ორგანიზაციის ID მითითებულია თქვენი სამართავი პანელის API გასაღებების ეკრანზე, თავად გასაღებთან ახლოს. ის ერთნაირია თქვენ მიერ განხორციელებულ ყველა გამოძახებაში.

სცადეთ

შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.

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 კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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