billing

POST /v1/sla/claims

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

Bütün billing nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Bu səhifə spresifikasiyada xüsusi icazə tələb etmir, buna görə də açarınıza ehtiyac duyduğu minimum səviyyədə icazə verin və güman etmək əvəzinə cavabı yoxlayın.

Təşkilatınızın identifikatorunun yerləşdiyi yer

Bu son nöqtə sorğu parametri kimi org_id qəbul edir. Onu buraxın və sorğu bütün kirayə alt ağacınızı əhatə etsin; sorğunu bir təşkilatla məhdudlaşdırmaq üçün onu göndərin.

Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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

Parametrlər

AdTipTələb olunurNədir
org_id (query)stringXeyrNarrow 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…

Sorğu gövdəsi

AdTipTələb olunurNədir
monitor_idstringBəli
period_startstringBəliAny instant in the calendar month being claimed; the month is derived from it.
credit_percentintegerXeyrThe 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…

Cavab

AdTipTələb olunurNədir
idstringBəli
period_startstringBəli
credit_percentintegerBəli
amount_minorintegerBəliThe credit in integer minor units of `currency` (§2.8 — money is never a float).
currencystringBəli
outcomestring<measured, unadjudicable>BəliWhether the month adjudicated, or the credit was granted because our coverage could not decide it.
uptime_percentstringBəli
created_atstringBəli

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 404 · 409 · 422