billing

GET /v1/entitlements

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

Всички крайни точки в billing

Всички документи за разработчици

Упълномощаване

Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението billing.view; ключ без него се отхвърля с 403, а не с 404.

Където отива идентификаторът на вашата организация

Този ендпойнт приема org_id като параметър на заявката. Оставете го празен и извикването ще обхване цялото ви поддървано дърво; изпратете го, за да ограничите извикването до една организация.

ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.

Опитайте

Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.

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

Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в 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 — buy…
plan_namestringДа
has_planbooleanДа
allowancesEntitlementAllowance[]Да
featuresEntitlementFeature[]Да

Грешки, които този крайpoint може да върне

401 · 403 · 429