reseller

PUT /v1/reseller/ai/credits/settings

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

همه نقاط پایانی reseller

احراز هویت

یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز 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