ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.view; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X GET https://api.zinndigital.com/v1/ai/site-agent/allowance \
-H "Authorization: Bearer zdk_live_…"Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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`.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id (query) | Uuid | Não | Which organization this is about. Required when the caller belongs to more than one; a caller in exactly one may omit it. |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
tier | string | Sim | The tier this organization falls into. |
monthly | integer | Sim | Checks from the tier |
granted | integer | Sim | Extra checks granted by staff that have not expired. |
total | integer | Sim | `monthly` + `granted`. |
used | integer | Sim | Billable checks used this period. Ticket and staff checks are never counted. |
remaining | integer | Sim | — |
exhausted | boolean | Sim | 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 | Não | 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 | Não | Out of allowance AND out of credit — the only state in which a self-serve check is actually refused. |
in_good_standing | boolean | Sim | 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 | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429