ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение sites.view; ключ без него отклоняется с кодом 403, а не 404.
Идентификатор вашей организации
Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему 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