reseller
PUT /v1/reseller/ai/credits/settings
When to warn you your pool is low, and whether to refill it automatically.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה reseller.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.
המקום שבו מזהה הארגון שלך נכנס
נקודת קצה זו מקבלת את org_id כפרמטר שאילתת חיפוש. השאר אותו ריק והקריאה תכסה את כל תת-עץ הדיירות שלך; שלח אותו כדי לצמצם את הקריאה לארגון אחד.
מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
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> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
`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`.
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
org_id (query) | Uuid | לא | Which of your organizations this applies to. |
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
low_pool_threshold_micros | integer | כן | `0` = derive it from what you allocate. |
auto_buy_enabled | boolean | כן | 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 | לא | Blank = the smallest pack that covers the shortfall, resolved when it fires. |
auto_buy_monthly_cap_micros | integer | לא | `0` = four of the chosen pack. A cooldown is not a ceiling. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
low_pool_threshold_micros | integer | כן | — |
auto_buy_enabled | boolean | כן | — |
auto_buy_pack_code | string | כן | — |
auto_buy_monthly_cap_micros | integer | כן | — |
is_low | boolean | כן | — |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 404 · 422 · 429