reseller
GET /v1/reseller/ai/credits
Your AI credit pool, your prices, and what your clients hold.
Autentifikacija
Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu reseller.view; ključ bez nje se odbija s kodom 403, a ne 404.
Gdje dolazi ID vaše organizacije
Ova krajnja točka uzima org_id kao parametar upita. Izostavite ga i poziv obuhvaćett cijelo stablo vašeg najma; pošaljite ga kako biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na zaslonu API ključeva u vašoj nadzornoj ploči, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X GET https://api.zinndigital.com/v1/reseller/ai/credits \
-H "Authorization: Bearer zdk_live_…"Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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 | Što je to |
|---|---|---|---|
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 | Što je to |
|---|---|---|---|
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 | — |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 429