billing

POST /v1/sla/claims

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

Minden billing végpont

Hitelesítés

Küldjön egy API-kulcsot bearer tokenként. Ez a végpont nem határoz meg konkrét jogosultságot a specifikációban, ezért adja meg a kulcsnak a legkevesebbet, amire szüksége van, és a feltételezés helyett ellenőrizze a választ.

A szervezet azonosítójának helye

Ez a végpont a(z) org_id paramétert lekérdezési paraméterként várja. Hagyja ki, ha a hívás az Ön teljes bérlői részfáját lefedje; küldje el a hívás egyetlen szervezetre történő szűkítéséhez.

A szervezeted azonosítója a vezérlőpult API-kulcsok képernyőjén található, közvetlenül a kulcs mellett. Ez ugyanaz az azonosító minden indított hívásban.

Próbálja ki

Cserélje ki a hegyes zárójelek közötti részt a saját értékeivel, a kulcshelyőrzőt pedig a vezérlőpultján található kulccsal.

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> }'

Be van jelentkezve? A vezérlőpultban lévő API-konzol kitölti a valós szervezetazonosítóját és a saját kulcsát, és a kérést az éles API-n futtatja, hogy láthassa a tényleges választ. Nyissa meg ezt a végpontot az API konzolban

Részletek

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`.

Paraméterek

NévTípusKötelezőMi ez
org_id (query)stringNemNarrow 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…

Kérés törzse

NévTípusKötelezőMi ez
monitor_idstringIgen
period_startstringIgenAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerNemThe 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…

Válasz

NévTípusKötelezőMi ez
idstringIgen
period_startstringIgen
credit_percentintegerIgen
amount_minorintegerIgenThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringIgen
outcomestring<measured, unadjudicable>IgenWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringIgen
created_atstringIgen

Hibák, amelyeket ez a végpont visszaadhattatlan

401 · 403 · 404 · 409 · 422