billing
GET /v1/entitlements
What this organization's plan grants, and how much of it is used.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran billing.view; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X GET https://api.zinndigital.com/v1/entitlements \
-H "Authorization: Bearer zdk_live_…"Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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`.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
org_id (query) | Uuid | Tidak | The organization to report on; defaults to the caller's own. |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
entitling_org_id | Uuid | Ya | 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> | Ya | 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_name | string | Ya | — |
has_plan | boolean | Ya | — |
allowances | EntitlementAllowance[] | Ya | — |
features | EntitlementFeature[] | Ya | — |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 429