billing
POST /v1/sla/claims
Claim the service credit for one monitored site's month.
Autentikasi
Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.
Tempat ID organisasi Anda dimasukkan
Titik akhir ini menerima org_id sebagai parameter kueri. Kosongkan parameter tersebut dan panggilan ini akan mencakup seluruh subpohon penyewa Anda; kirimkan untuk mempersempit panggilan ke satu organisasi.
ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
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> }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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`.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
org_id (query) | string | Tidak | 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… |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
monitor_id | string | Ya | — |
period_start | string | Ya | Any instant in the calendar month being claimed; the month is derived from it. |
credit_percent | integer | Tidak | 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… |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
id | string | Ya | — |
period_start | string | Ya | — |
credit_percent | integer | Ya | — |
amount_minor | integer | Ya | The credit in integer minor units of `currency` (§2.8 — money is never a float). |
currency | string | Ya | — |
outcome | string<measured, unadjudicable> | Ya | Whether the month adjudicated, or the credit was granted because our coverage could not decide it. |
uptime_percent | string | Ya | — |
created_at | string | Ya | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 404 · 409 · 422