ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
認証
ベアラー トークンとして API キーを送信します。キーには sites.view 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
組織 ID を入力する場所
このエンドポイントはクエリパラメータとして org_id を受け取ります。省略した場合はテナントサブツリー全体が対象になり、指定した場合は特定の組織のみに絞り込まれます。
組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
-H "Authorization: Bearer zdk_live_…"ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
One allowance per organization per calendar month, sized by how many sites the organization has — not per site. Free grants from staff are added to it. Checks run from the **support ticket form are free and unmetered** and never appear in `used`: a customer who has exhausted their allowance can still open a ticket and still gets a full check on their site. `in_good_standing` is false while an account is suspended or unpaid, which pauses metered checks only — the ticket path and previously-purchased results are unaffected. Requires `sites.view`.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
org_id (query) | Uuid | いいえ | Which organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
tier | string | はい | The tier this organization falls into. |
monthly | integer | はい | Checks from the tier |
granted | integer | はい | Extra checks granted by staff that have not expired. |
total | integer | はい | `monthly` + `granted`. |
used | integer | はい | Billable checks used this period. Ticket and staff checks are never counted. |
remaining | integer | はい | — |
exhausted | boolean | はい | The monthly allowance is spent. ⛔ This does NOT mean checks are refused — see `credit_checks`. Rendering "0 left" on this field alone tells a customer whose credit covers hundre… |
credit_checks | integer | いいえ | How many further checks the organization's Zinn® AI credit would cover once the allowance is gone. The allowance is the *included* tier of the one meter; beyond it a check is fu… |
exhausted_entirely | boolean | いいえ | Out of allowance AND out of credit — the only state in which a self-serve check is actually refused. |
in_good_standing | boolean | はい | False while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable. |
period_start | string | はい | — |
このエンドポイントが返すエラー
401 · 403 · 422 · 429