reseller

PUT /v1/reseller/ai/credits/settings

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

Lahat ng reseller endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na reseller.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Tinatanggap ng endpoint na ito ang org_id bilang parameter ng query. Huwag itong isama at saklaw ng tawag ang buong subtree ng iyong tenancy; ipadala ito para paliitin ang tawag sa isang organisasyon.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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> }'

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

`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`.

Mga Parameter

PangalanUriKailanganAno ito
org_id (query)UuidHindiWhich of your organizations this applies to.

Katawan ng kahilingan

PangalanUriKailanganAno ito
low_pool_threshold_microsintegerOo`0` = derive it from what you allocate.
auto_buy_enabledbooleanOoBuy 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_codestringHindiBlank = the smallest pack that covers the shortfall, resolved when it fires.
auto_buy_monthly_cap_microsintegerHindi`0` = four of the chosen pack. A cooldown is not a ceiling.

Tugon

PangalanUriKailanganAno ito
low_pool_threshold_microsintegerOo
auto_buy_enabledbooleanOo
auto_buy_pack_codestringOo
auto_buy_monthly_cap_microsintegerOo
is_lowbooleanOo

Mga error na maibabalik ng endpoint na ito

401 · 403 · 404 · 422 · 429