reseller
GET /v1/reseller/ai/credits
Your AI credit pool, your prices, and what your clients hold.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Кілтте reseller.view рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.
Ұйымыңыздың идентификаторы орналасатын жер
Бұл соңғы нүкте сұрау параметрі ретінде org_id мәнін қабылдайды. Оны бос қалдырсаңыз, шақыру бүкіл жалға алушы тармағын қамтиды; шақыруды бір ұйымға шектеу үшін оны жіберіңіз.
Сіздің ұйым идентификаторыңыз басқару панеліндегі API кілттері экранында, кілттің өзінің жанында орналасқан. Бұл сіз жасайтын әрбір шақырудағы бірдей идентификатор.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
curl -X GET https://api.zinndigital.com/v1/reseller/ai/credits \
-H "Authorization: Bearer zdk_live_…"Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз
Мәліметтер
One request for the whole screen: the pool you buy from Zinn® and sell on, every pack priced three ways (Zinn®'s list, your wholesale cost, what your clients pay), and each client's own AI balance. Your pool is a balance on the same AI credit ledger your clients use — there is no separate pool store, so `balance_micros` here and a client's balance are the same kind of number and reconcile against one statement. `retail_source` says whether a price is yours (`price_list`) or Zinn®'s default (`default`). Requires `reseller.view`.
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
currency (query) | string | Жоқ | ISO-4217 code to price in. Defaults to USD. |
org_id (query) | Uuid | Жоқ | Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r… |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
pool | ResellerAiPool | Иә | — |
wholesale_discount_bps | integer | Иә | Your discount off Zinn®'s list price for AI credit, in basis points. Separate from your hosting discount — different product, different margin. |
packs | ResellerAiPack[] | Иә | — |
clients | ResellerAiClient[] | Иә | — |
Бұл соңғы нүкте қайтара алатын қателер
401 · 403 · 404 · 429