reseller
PUT /v1/reseller/ai/credits/settings
When to warn you your pool is low, and whether to refill it automatically.
Authentification
Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation reseller.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.
Où insérer l'ID de votre organisation
Cet point de terminaison prend org_id comme paramètre de requête. Omettez-le et l'appel couvrira l'ensemble de votre sous-arbre de location ; envoyez-le pour restreindre l'appel à une seule organisation.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X PUT https://api.zinndigital.com/v1/reseller/ai/credits/settings \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "low_pool_threshold_micros": <integer>, "auto_buy_enabled": <boolean> }'Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
`low_pool_threshold_micros` of `0` means "work it out from what I actually allocate" — two allocations' worth of head-room, which means the same thing to a reseller moving thousands and to one with three clients. `auto_buy_enabled` is **off** unless you switch it on: it charges your card without anybody clicking, so it is never a default. `auto_buy_monthly_cap_micros` of `0` means four packs' worth of the pack you chose — a cooldown is not a ceiling. Saving clears any standing low-pool notice, so a new threshold warns you again at the new line. Requires `reseller.manage`.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
org_id (query) | Uuid | Non | Which of your organizations this applies to. |
Corps de la requête
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
low_pool_threshold_micros | integer | Oui | `0` = derive it from what you allocate. |
auto_buy_enabled | boolean | Oui | Buy a pack from Zinn® automatically when your pool cannot cover a client's purchase. Off unless you turn it on — it charges your card with nobody watching. |
auto_buy_pack_code | string | Non | Blank = the smallest pack that covers the shortfall, resolved when it fires. |
auto_buy_monthly_cap_micros | integer | Non | `0` = four of the chosen pack. A cooldown is not a ceiling. |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
low_pool_threshold_micros | integer | Oui | — |
auto_buy_enabled | boolean | Oui | — |
auto_buy_pack_code | string | Oui | — |
auto_buy_monthly_cap_micros | integer | Oui | — |
is_low | boolean | Oui | — |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 404 · 422 · 429