ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението 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, за да можете да видите действителния отговор. Отворете този крайpoint в 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 | Да | — |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429