ai

GET /v1/ai/site-agent/allowance

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

Všechny koncové body ai

Autentizace

Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění sites.view; klíč bez něj je odmítnut s kódem 403, nikoli 404.

Sem patří ID vaší organizace

Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.

ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.

Vyzvednout

Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.

curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
  -H "Authorization: Bearer zdk_live_…"

Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API

Podrobnosti

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`.

Parametry

NázevTypPožadovánoCo to je
org_id (query)UuidNeWhich organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it.

Odpověď

NázevTypPožadovánoCo to je
tierstringAnoThe tier this organization falls into.
monthlyintegerAnoChecks from the tier
grantedintegerAnoExtra checks granted by staff that have not expired.
totalintegerAno`monthly` + `granted`.
usedintegerAnoBillable checks used this period. Ticket and staff checks are never counted.
remainingintegerAno
exhaustedbooleanAnoThe 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_checksintegerNeHow 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_entirelybooleanNeOut of allowance AND out of credit — the only state in which a self-serve check is actually refused.
in_good_standingbooleanAnoFalse while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable.
period_startstringAno

Chyby, které může tento koncový bod vrátit

401 · 403 · 422 · 429