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 زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول 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 | بله | — |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 422 · 429