billing
POST /v1/sla/claims
Claim the service credit for one monitored site's month.
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év | Típus | Kötelező | Mi ez |
|---|---|---|---|
org_id (query) | string | Nem | 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… |
Kérés törzse
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
monitor_id | string | Igen | — |
period_start | string | Igen | Any instant in the calendar month being claimed; the month is derived from it. |
credit_percent | integer | Nem | 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… |
Válasz
| Név | Típus | Kötelező | Mi ez |
|---|---|---|---|
id | string | Igen | — |
period_start | string | Igen | — |
credit_percent | integer | Igen | — |
amount_minor | integer | Igen | The credit in integer minor units of `currency` (§2.8 — money is never a float). |
currency | string | Igen | — |
outcome | string<measured, unadjudicable> | Igen | Whether the month adjudicated, or the credit was granted because our coverage could not decide it. |
uptime_percent | string | Igen | — |
created_at | string | Igen | — |
Hibák, amelyeket ez a végpont visszaadhattatlan
401 · 403 · 404 · 409 · 422