reseller
GET /v1/reseller/ai/credits
Your AI credit pool, your prices, and what your clients hold.
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu reseller.view; ključ bez nje se odbija sa 403, a ne sa 404.
Gde ide ID vaše organizacije
Ova krajnja tačka prihvata org_id kao parametar upita. Izostavite ga i poziv obuhvata celokupno stablo vašeg zakupca; pošaljite ga da biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
curl -X GET https://api.zinndigital.com/v1/reseller/ai/credits \
-H "Authorization: Bearer zdk_live_…"Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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`.
Parametri
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
currency (query) | string | Ne | ISO-4217 code to price in. Defaults to USD. |
org_id (query) | Uuid | Ne | 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… |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
pool | ResellerAiPool | Da | — |
wholesale_discount_bps | integer | Da | Your discount off Zinn®'s list price for AI credit, in basis points. Separate from your hosting discount — different product, different margin. |
packs | ResellerAiPack[] | Da | — |
clients | ResellerAiClient[] | Da | — |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 429