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 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

組織 ID を入力する場所

このエンドポイントはクエリパラメータとして org_id を受け取ります。省略した場合はテナントサブツリー全体が対象になり、指定した場合は特定の組織のみに絞り込まれます。

組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

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コンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブ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