billing
POST /v1/sla/claims
Claim the service credit for one monitored site's month.
Authentication
Send an API key as a bearer token. This endpoint does not state a specific permission in the specification, so give your key the least it needs and check the response rather than assuming.
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
| Name | Type | Required | What it is |
|---|---|---|---|
org_id (query) | string | No | 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… |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
monitor_id | string | Yes | — |
period_start | string | Yes | Any instant in the calendar month being claimed; the month is derived from it. |
credit_percent | integer | No | 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… |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
period_start | string | Yes | — |
credit_percent | integer | Yes | — |
amount_minor | integer | Yes | The credit in integer minor units of `currency` (§2.8 — money is never a float). |
currency | string | Yes | — |
outcome | string<measured, unadjudicable> | Yes | Whether the month adjudicated, or the credit was granted because our coverage could not decide it. |
uptime_percent | string | Yes | — |
created_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 409 · 422