ai
GET /v1/ai/site-agent/allowance
How many self-serve site checks are left this month.
אימות
שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה 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