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