ai

GET /v1/ai/site-agent/allowance

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

جميع نقاط نهاية ai

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (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

التفاصيل

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.

الاستجابة

الاسمالنوعمطلوبما هو هذا
tierstringنعمThe tier this organization falls into.
monthlyintegerنعمChecks from the tier
grantedintegerنعمExtra checks granted by staff that have not expired.
totalintegerنعم`monthly` + `granted`.
usedintegerنعمBillable checks used this period. Ticket and staff checks are never counted.
remainingintegerنعم
exhaustedbooleanنعم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_checksintegerلا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_entirelybooleanلاOut of allowance AND out of credit — the only state in which a self-serve check is actually refused.
in_good_standingbooleanنعمFalse while the account is suspended or unpaid. Pauses metered checks only — the ticket path stays free and previously-purchased results stay readable.
period_startstringنعم

الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه

401 · 403 · 422 · 429