billing

POST /v1/sla/claims

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

All billing endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The key must carry the sla.claim permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a query parameter. Leave it out and the call covers your whole tenancy subtree; send it to narrow the call to one organisation.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your 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> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the 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

NameTypeRequiredWhat it is
org_id (query)stringNoNarrow 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…

Request body

NameTypeRequiredWhat it is
monitor_idstringYes—
period_startstringYesAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerNoThe 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…

Response

NameTypeRequiredWhat it is
idstringYes—
period_startstringYes—
credit_percentintegerYes—
amount_minorintegerYesThe credit in integer minor units of currency (§2.8 — money is never a float).
currencystringYes—
outcomestring<measured, unadjudicable>YesWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringYes—
created_atstringYes—

Errors this endpoint can return

401 · 403 · 404 · 409 · 422