ai

GET /v1/ai/site-agent/allowance

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

Tous les points de terminaison ai

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation sites.view ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Où insérer l'ID de votre organisation

Cet point de terminaison prend org_id comme paramètre de requête. Omettez-le et l'appel couvrira l'ensemble de votre sous-arbre de location ; envoyez-le pour restreindre l'appel à une seule organisation.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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

Paramètres

NomTypeObligatoireQu'est-ce que c'est
org_id (query)UuidNonWhich organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it.

Réponse

NomTypeObligatoireQu'est-ce que c'est
tierstringOuiThe tier this organization falls into.
monthlyintegerOuiChecks from the tier
grantedintegerOuiExtra checks granted by staff that have not expired.
totalintegerOui`monthly` + `granted`.
usedintegerOuiBillable checks used this period. Ticket and staff checks are never counted.
remainingintegerOui
exhaustedbooleanOuiThe 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_checksintegerNonHow 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_entirelybooleanNonOut of allowance AND out of credit — the only state in which a self-serve check is actually refused.
in_good_standingbooleanOuiFalse while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable.
period_startstringOui

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422 · 429