reseller
PUT /v1/reseller/ai/credits/settings
When to warn you your pool is low, and whether to refill it automatically.
認証
ベアラー トークンとして 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_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