billing

GET /v1/entitlements

What this organization's plan grants, and how much of it is used.

Lahat ng billing endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na billing.view; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Tinatanggap ng endpoint na ito ang org_id bilang parameter ng query. Huwag itong isama at saklaw ng tawag ang buong subtree ng iyong tenancy; ipadala ito para paliitin ang tawag sa isang organisasyon.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

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

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

The customer-facing half of entitlement enforcement (#2726). Returns every **counted allowance** the engine refuses on — with `used`, `limit` and `remaining` — and every **boolean feature** it gates on, marked included or not. A cap the engine refuses on and the customer cannot see is a cap nobody can plan around: the first they learn of it is the moment it stops them. So the numbers here are the same numbers the refusal quotes. `limit` distinguishes three states (docs/144 §1) and they are **not** interchangeable: `-1` means the plan sold "unlimited" and says so; a non-negative integer is a real cap; **`null` means the plan states no cap at all**, which is neither a promise nor a limit and is the normal case — only 8 of 134 live plans state `team_seats`. `enforced` is the single field a client should branch on to decide whether to draw a usage bar. Resolution walks the organization tree: a reseller's client org holds no subscription of its own, so the answer comes from the nearest ancestor that grants one, and `entitling_org_id` names it. Requires `billing.view`.

Mga Parameter

PangalanUriKailanganAno ito
org_id (query)UuidHindiThe organization to report on; defaults to the caller's own.

Tugon

PangalanUriKailanganAno ito
entitling_org_idUuidOoThe organization whose plan grants these — the caller's own org or an ancestor. Null when nothing in the chain grants anything.
sourcestring<staff, subscription, none>OoWhere the grant came from. The customer's next move differs: a `staff` grant is not upgradable, a `subscription` one is, and `none` means there is nothing to upgrade *from* — bu…
plan_namestringOo
has_planbooleanOo
allowancesEntitlementAllowance[]Oo
featuresEntitlementFeature[]Oo

Mga error na maibabalik ng endpoint na ito

401 · 403 · 429