billing
POST /v1/sla/claims
Claim the service credit for one monitored site's month.
Autentifikacija
Pošaljite API ključ kao bearer token. Ova krajnja tačka ne navodi specifičnu dozvolu u specifikaciji, zato dodelite svom ključu minimum potrebnih ovlašćenja i proverite odgovor umesto da pretpostavljate.
Gde ide ID vaše organizacije
Ova krajnja tačka prihvata org_id kao parametar upita. Izostavite ga i poziv obuhvata celokupno stablo vašeg zakupca; pošaljite ga da biste suzili poziv na jednu organizaciju.
ID vaše organizacije nalazi se na ekranu sa API ključevima u vašoj kontrolnoj tabli, pored samog ključa. To je isti ID u svakom pozivu koji uputite.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
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> }'Prijavljeni ste? API konzola na vašoj kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
org_id (query) | string | Ne | 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… |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
monitor_id | string | Da | — |
period_start | string | Da | Any instant in the calendar month being claimed; the month is derived from it. |
credit_percent | integer | Ne | 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… |
Odgovor
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
id | string | Da | — |
period_start | string | Da | — |
credit_percent | integer | Da | — |
amount_minor | integer | Da | The credit in integer minor units of `currency` (§2.8 — money is never a float). |
currency | string | Da | — |
outcome | string<measured, unadjudicable> | Da | Whether the month adjudicated, or the credit was granted because our coverage could not decide it. |
uptime_percent | string | Da | — |
created_at | string | Da | — |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 409 · 422