billing

POST /v1/sla/claims

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

Alle billing-eindpunten

Authenticatie

Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.

Waar je organisatie-id komt te staan

Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.

Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.

Probeer het

Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.

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

Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console

Details

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

Parameters

NaamTypeVerplichtWat dit is
org_id (query)stringNeeNarrow 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…

Aanvraaglichaam

NaamTypeVerplichtWat dit is
monitor_idstringJa
period_startstringJaAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerNeeThe 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…

Reactie

NaamTypeVerplichtWat dit is
idstringJa
period_startstringJa
credit_percentintegerJa
amount_minorintegerJaThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringJa
outcomestring<measured, unadjudicable>JaWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringJa
created_atstringJa

Fouten die dit eindpunt kan retourneren

401 · 403 · 404 · 409 · 422