billing

POST /v1/sla/claims

Claim the service credit for one monitored site's month.

כל נקודות הקצה מסוג billing

אימות

שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.

המקום שבו מזהה הארגון שלך נכנס

נקודת קצה זו מקבלת את org_id כפרמטר שאילתת חיפוש. השאר אותו ריק והקריאה תכסה את כל תת-עץ הדיירות שלך; שלח אותו כדי לצמצם את הקריאה לארגון אחד.

מזהה הארגון שלך נמצא במסוף מפתחות ה-API בלוח הבקרה שלך, לצד המפתח עצמו. זהו אותו מזהה בכל קריאה שאתה מבצע.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

curl -X POST https://api.zinndigital.com/v1/sla/claims \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "monitor_id": <string>, "period_start": <string> }'

מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API

פרטים

Issues account credit — not cash — as a share of that site's monthly fee, and records it. **Idempotent by construction:** one month and one monitor may be credited exactly once, enforced by a unique constraint, so a retry, a race and a double click all lose the same way. `credit_percent` is read **only** when the month is `unadjudicable`; a measured month is credited at the tier its own figure reaches and a better one cannot be claimed. Gated on `sla.claim`.

פרמטרים

שםסוגנדרשמה זה
org_id (query)stringלאNarrow to one organisation in the caller's subtree — what the dashboard's org switcher sends. ⛔ **Narrow only:** intersected with what the caller may already write to, so an org…

גוף הבקשה

שםסוגנדרשמה זה
monitor_idstringכן
period_startstringכןAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerלאThe published tier claimed. Read **only** when the month is `unadjudicable`, and refused unless it is one of `SlaPolicy.tiers[].credit_percent` — a tier is never rounded to the…

תשובה

שםסוגנדרשמה זה
idstringכן
period_startstringכן
credit_percentintegerכן
amount_minorintegerכןThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringכן
outcomestring<measured, unadjudicable>כןWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringכן
created_atstringכן

שגיאות שנקודה קצה זו עשויה להחזיר

401 · 403 · 404 · 409 · 422