billing

GET /v1/usage/visits

Get the organisation's metered visits and any overage charge.

Tất cả các điểm cuối billing

Xác thực

Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền billing.view; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.

Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.

Dùng thử

Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.

curl -X GET https://api.zinndigital.com/v1/usage/visits \
  -H "Authorization: Bearer zdk_live_…"

Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API

Chi tiết

Billable page views for the current billing period against the plan's `monthly_visits` allowance, plus the overage that has accrued. Requires `billing.view` rather than `sites.view`: this endpoint's distinguishing content is a **charge**, and a teammate granted site access to publish content should not thereby learn what the account is about to be invoiced. **Over the allowance, the site keeps serving** (owner ruling 2026-08-11). Nothing is throttled, suspended or refused for being popular; the excess is billed per block of 10,000 page views and shown here before the invoice is raised. **The first partial period is pro-rated.** Metering began on 2026-08-11 and nothing before it can be measured, so a period that started earlier has its allowance scaled to the part actually observed and `prorated` is `true` — otherwise a customer would be billed for a gap in our own instrumentation. `fullAllowance` carries the unscaled monthly figure so the UI can show both. `overageAmountMinor` and `overageCurrency` are `null` **together** when no overage rate is in force. That is a real state and it is not zero: "not yet priced" and "costs nothing" are different facts, and only one of them is safe to show a customer as a bill.

Phản hồi

TênLoạiBắt buộcNội dung này là gì
period_startstringStart of the subscription's current billing period.
period_endstringEnd of the subscription's current billing period.
page_viewsintegerBillable human page views this period, across every site the plan pays for.
excluded_page_viewsintegerPage views excluded as automated. Published so the bot rule is auditable — a customer disputing an invoice can see what they were not charged for.
allowanceintegerThe ceiling applied to this period, already pro-rated where `prorated` is true. `-1` means unlimited.
full_allowanceintegerThe plan's unscaled monthly `monthly_visits` grant, so the UI can quote the pricing-page figure alongside a pro-rated one.
proratedbooleanWhether `allowance` was scaled down because this period began before metering did. Surfaced so a number that will not match the pricing page can be explained rather than looking…
unlimitedbooleanWhether the plan grants unlimited visits.
remainingintegerPage views left in the allowance. Never negative.
over_byintegerPage views beyond the allowance. Never negative.
over_limitbooleanWhether the allowance has been exceeded. The site keeps serving either way.
overage_blocksintegerBlocks of overage, rounded **up** — one page view over the allowance buys a whole block.
overage_amount_minorintegerThe overage charge in minor units of `overage_currency` (integer minor units, never a float). `null` when no overage rate is in force, which is not the same as zero.
overage_currencystringISO 4217 code for `overage_amount_minor`. Null exactly when it is.

Các lỗi điểm cuối này có thể trả về

401 · 403 · 404 · 429