hosting
GET /v1/sites/{siteId}/usage
Get one site's metered visits for the current billing period.
Autentificare
Trimiteți o cheie API ca token de tip bearer. Acest punct final nu specifică o permisiune anume în specificație, așa că acordați cheii cele mai puține drepturi necesare și verificați răspunsul în loc să faceți presupuneri.
Acest endpoint nu necesită un ID de organizație. Cheia ta identifică deja organizația căreia îi aparține, iar răspunsul este limitat la aceasta.
Încearcă
Înlocuiți tot ce se află între paranteze unghiulare cu propriile valori și substituentul cheie cu o cheie din tabloul de bord.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/usage \
-H "Authorization: Bearer zdk_live_…"Autentificat? Consola API din panoul de control îți completează ID-ul real al organizației și propria cheie și rulează cererea în API-ul live, astfel încât să poți vedea răspunsul efectiv. Deschideți acest punct final în consola API
Detalii
This site's billable page views so far this billing period, alongside the organisation-wide allowance they count against. RLS-scoped to a site the caller can view (`sites.view`); an out-of-scope or unknown id is a `404`, exactly like `getSite`. **A visit is a human page view with bots excluded** (owner ruling 2026-08-11). Crawlers, automated agents, assets, redirects and error responses are all excluded, and `excludedPageViews` reports how many were — the rule is published so a customer can check it rather than take it on trust. **The organisation's totals are returned with the site's own** because a site figure cannot be read without its denominator: 40,000 views is unremarkable on Agency Growth and a chargeable overage on Starter. The allowance is granted to the plan, not to the site, and is shared across every site that plan pays for.
Parametri
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
siteId (path) | Uuid | Da | Site ID (UUIDv7). |
Răspuns
| Nume | Tip | Obligatoriu | Ce este |
|---|---|---|---|
period_start | string | Da | — |
period_end | string | Da | — |
page_views | integer | Da | This site's billable human page views this period. |
excluded_page_views | integer | Da | This site's page views excluded as automated. |
org_page_views | integer | Da | Billable page views across every site on the plan. |
org_allowance | integer | Da | The plan's allowance for this period. `-1` means unlimited. |
org_unlimited | boolean | Da | — |
org_over_limit | boolean | Da | Whether the plan's allowance is exceeded. The site keeps serving either way. |
Erori pe care le poate returna acest punct final
401 · 403 · 404 · 429