billing

POST /v1/sla/claims

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

Semua titik akhir billing

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

NamaJenisWajibTentang apa ini
org_id (query)stringTidakNarrow 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

NamaJenisWajibTentang apa ini
monitor_idstringYa
period_startstringYaAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerTidakThe 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

NamaJenisWajibTentang apa ini
idstringYa
period_startstringYa
credit_percentintegerYa
amount_minorintegerYaThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringYa
outcomestring<measured, unadjudicable>YaWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringYa
created_atstringYa

Kesalahan yang dapat dikembalikan oleh titik akhir ini

401 · 403 · 404 · 409 · 422