billing

POST /v1/sla/claims

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

Tüm billing uç noktaları

Kimlik Doğrulama

Bir API anahtarını bearer token olarak gönderin. Bu uç nokta, teknik özelliklerde belirli bir yetki belirtmemektedir; bu nedenle, varsaymak yerine anahtarınıza ihtiyaç duyduğu en az yetkiyi verin ve yanıtı kontrol edin.

Kurum kimliğinizin yazılacağı yer

Bu uç nokta, org_id parametresini bir sorgu parametresi olarak alır. Bu parametreyi dışarıda bırakırsanız çağrı tüm kiracı alt ağacınızı kapsar; çağrıyı tek bir kuruluşa daraltmak için gönderin.

Kuruluş kimliğiniz (id), kontrol panelinizdeki API anahtarları ekranında, anahtarın hemen yanında yer alır. Yaptığınız her çağrıda aynı kimlik kullanılır.

Dene

Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.

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> }'

Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın

Ayrıntılar

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`.

Parametreler

AdTürZorunluNe olduğu
org_id (query)stringHayırNarrow 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…

İstek gövdesi

AdTürZorunluNe olduğu
monitor_idstringEvet
period_startstringEvetAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerHayırThe 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…

Yanıt

AdTürZorunluNe olduğu
idstringEvet
period_startstringEvet
credit_percentintegerEvet
amount_minorintegerEvetThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringEvet
outcomestring<measured, unadjudicable>EvetWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringEvet
created_atstringEvet

Bu uç noktanın dönderebileceği hatalar

401 · 403 · 404 · 409 · 422