reseller
PUT /v1/reseller/ai/credits/settings
When to warn you your pool is low, and whether to refill it automatically.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie reseller.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
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> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
`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`.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id (query) | Uuid | Nie | Which of your organizations this applies to. |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
low_pool_threshold_micros | integer | Tak | `0` = derive it from what you allocate. |
auto_buy_enabled | boolean | Tak | 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 | Nie | Blank = the smallest pack that covers the shortfall, resolved when it fires. |
auto_buy_monthly_cap_micros | integer | Nie | `0` = four of the chosen pack. A cooldown is not a ceiling. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
low_pool_threshold_micros | integer | Tak | — |
auto_buy_enabled | boolean | Tak | — |
auto_buy_pack_code | string | Tak | — |
auto_buy_monthly_cap_micros | integer | Tak | — |
is_low | boolean | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 404 · 422 · 429