ai

GET /v1/ai/site-agent/allowance

How many self-serve site checks are left this month.

Све ai крајње тачке

Сва документација за програмере →

Аутентификација

Пошаљите API кључ као bearer токен. Кључ мора имати дозволу sites.view; кључ без ње се одбија уз 403, а не 404.

Где се уноси ID ваше организације

Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.

Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.

Испробајте

Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.

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.

Одговор

НазивТипОбавезноШта је ово
tierstringДаThe tier this organization falls into.
monthlyintegerДаChecks from the tier
grantedintegerДаExtra checks granted by staff that have not expired.
totalintegerДаmonthly + granted.
usedintegerДаBillable checks used this period. Ticket and staff checks are never counted.
remainingintegerДа—
exhaustedbooleanДа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 hundreds…
credit_checksintegerНе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…
exhausted_entirelybooleanНеOut of allowance AND out of credit — the only state in which a self-serve check is actually refused.
in_good_standingbooleanДаFalse while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable.
period_startstringДа—

Грешке које ова крајња тачка може вратити

401 · 403 · 422 · 429