billing
GET /v1/entitlements
What this organization's plan grants, and how much of it is used.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie billing.view; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X GET https://api.zinndigital.com/v1/entitlements \
-H "Authorization: Bearer zdk_live_…"Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id (query) | Uuid | Nie | The organization to report on; defaults to the caller's own. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
entitling_org_id | Uuid | Tak | The organization whose plan grants these — the caller's own org or an ancestor. Null when nothing in the chain grants anything. |
source | string<staff, subscription, none> | Tak | 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_name | string | Tak | — |
has_plan | boolean | Tak | — |
allowances | EntitlementAllowance[] | Tak | — |
features | EntitlementFeature[] | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 429