reseller

PUT /v1/reseller/ai/credits/settings

When to warn you your pool is low, and whether to refill it automatically.

כל נקודות הקצה מסוג reseller

אימות

שלחו מפתח 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_microsintegerכן`0` = derive it from what you allocate.
auto_buy_enabledbooleanכן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_codestringלאBlank = the smallest pack that covers the shortfall, resolved when it fires.
auto_buy_monthly_cap_microsintegerלא`0` = four of the chosen pack. A cooldown is not a ceiling.

תשובה

שםסוגנדרשמה זה
low_pool_threshold_microsintegerכן
auto_buy_enabledbooleanכן
auto_buy_pack_codestringכן
auto_buy_monthly_cap_microsintegerכן
is_lowbooleanכן

שגיאות שנקודה קצה זו עשויה להחזיר

401 · 403 · 404 · 422 · 429