billing

GET /v1/entitlements

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

Бүх billing төгсгөлийн цэгүүд

Баталгаажуулалт

API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Түлхүүр нь billing.view эрхтэй байх ёстой бөгөөд үүнгүйгээр 404 биш, харин 403 алдаа буцааж татгалзах болно.

Таны байгууллагын дугаар орох газар

Энэ төгсгөл цэг нь org_id-г асуулгын параметр болгон авдаг. Үүнийг орхивол дуудлага таны бүх түрээсийн дэд модыг хамрах бөгөөд дуудлагыг зөвхөн нэг байгууллагаар хязгаарлахын тулд үүнийг илгээнэ үү.

Танай байгууллагын ID нь таны хяналтын самбар дээрх API түлхүүрийн дэлгэцэнд, түлхүүр өөрөө хажууд байрладаг. Энэ нь таны хийх дуудлага бүрт ижил ID байна.

Туршиж үзэх

Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.

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

Та нэвтэрсэн байна уу? Таны хяналтын самбар дахь API консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй API рүү хүсэлт илгээх тул та бодит хариуг харах боломжтой болно. Энэ төгсгөлийн цэгийг API консол дээр нээх

Дэлгэрэнгүй

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

Параметрүүд

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
org_id (query)UuidҮгүйThe organization to report on; defaults to the caller's own.

Хариу үйлдэл

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
entitling_org_idUuidТиймThe 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>ТиймWhere 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_namestringТийм
has_planbooleanТийм
allowancesEntitlementAllowance[]Тийм
featuresEntitlementFeature[]Тийм

Энэ төгсгөл цэгээс буцааж болох алдаанууд

401 · 403 · 429