billing

POST /v1/sla/claims

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

Toate punctele finale billing

Autentificare

Trimiteți o cheie API ca token de tip bearer. Acest punct final nu specifică o permisiune anume în specificație, așa că acordați cheii cele mai puține drepturi necesare și verificați răspunsul în loc să faceți presupuneri.

Unde merge ID-ul organizației tale

Acest punct final acceptă org_id ca parametru de interogare. Omiteți-l și apelul va acoperi întregul subarbore al chiriașului dvs.; trimiteți-l pentru a restrânge apelul la o singură organizație.

ID-ul organizației tale se află pe ecranul cheilor API din panoul de control, lângă cheia însăși. Este același ID în fiecare apel pe care îl faci.

Încearcă

Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.

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

Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API

Detalii

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

Parametri

NumeTipObligatoriuCe este
org_id (query)stringNuNarrow 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…

Corp cerere

NumeTipObligatoriuCe este
monitor_idstringDa
period_startstringDaAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerNuThe 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…

Răspuns

NumeTipObligatoriuCe este
idstringDa
period_startstringDa
credit_percentintegerDa
amount_minorintegerDaThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringDa
outcomestring<measured, unadjudicable>DaWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringDa
created_atstringDa

Erori pe care le poate returna acest punct final

401 · 403 · 404 · 409 · 422