License
SDK method for reading your organisation's Enterprise License state, edition and granted plugins.
The client.license namespace reads your own organisation's Enterprise License: GET /api/v1/license. Available in TypeScript, Python, and Go SDKs. See Enterprise License for what a license grants, its lifecycle and how it is installed.
| SDK | Install | Namespace |
|---|---|---|
| TypeScript | npm install @caldera/platformxe-sdk (1.19.0+, pending release) | client.license |
| Python | pip install platformxe (1.15.0+, pending release) | client.license (sync and async) |
| Go | go get github.com/calderaxe/platformxe-go (v1.15.0+, pending release) | client.License |
Requires the license:read scope (billing:read does not grant it, and license:read reads no invoices). It is not one of the scopes a self-registered or portal sign-up key starts with: a key holds it when its scope list names it or holds *, or when it has no scope list. An organisation key is needed: a platform key with no organisation is refused with 403 FORBIDDEN. Default rate tier (1,000 requests/hr per API key).
Read-only. A license is installed by its holder on the portal's Billing page (the License card), never through the API. The answer never carries money, the license text, your business registration or another organisation's grants.
Get the license
const { edition, bypass, license } = await client.license.get();
console.log(edition.plan, edition.source); // e.g. ENTERPRISE license
if (license) {
console.log(license.state, license.expiresAt, license.daysLeft, license.plugins);
if (license.renewalDue) console.log('Renewal due: contact licensing');
}
view = client.license.get()
print(view["edition"]["plan"], view["edition"]["source"])
if view["license"]:
print(view["license"]["state"], view["license"]["daysLeft"], view["license"]["plugins"])
# Async client
view = await async_client.license.get()
view, err := client.License.Get()
if err != nil {
log.Fatal(err)
}
fmt.Println(view.Edition.Plan, view.Edition.Source)
if view.License != nil {
fmt.Println(view.License.State, view.License.DaysLeft, view.License.Plugins)
}
The answer is { edition, bypass, license }:
| Field | Meaning |
|---|---|
edition.plan | Your organisation's effective plan: FREE, BASIC, PRO or ENTERPRISE. Every plan-level limit follows it. |
edition.source | license (a live license grant's edition), plan (your stored plan; Free and Basic need no license) or first_party (a Caldera first-party tenant, always Enterprise). |
bypass | first_party or demo when your organisation needs no license, else null. |
license | The license that covers your organisation, or null when none does (a holder whose license does not cover the holder itself gets null too; the portal's License card still shows it the license). |
A license is:
| Field | Meaning |
|---|---|
licenseId | The license id (lic_...). |
kind | trial (7 days, no grace) or standard (365 or 730 days). |
issuedAt / expiresAt / graceEndsAt | The validity window: valid from issuedAt, then a renewal grace until graceEndsAt. |
state | valid, grace (everything still runs), lapsed (its plugins pause; your data is kept) or revoked. |
live | true while the grant is live for your organisation: installed, valid or in grace, and your verified business registration still matches the license. |
daysLeft | Days to the expiry day, counted on Lagos dates (negative after it). |
renewalDue | true in the last 30 days before expiry and during grace. |
holderName | The organisation that holds the license (it installs it for every organisation it covers). |
isHolder | true when your organisation is the holder. |
edition | Your organisation's edition under the grant: PRO or ENTERPRISE. |
plugins | The plugins granted to your organisation only, packs before add-ons (for example insurance, insurance.health). |
Errors
| Status | Code | When |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | The key lacks license:read; its organisation is inactive; or it is a platform key with no organisation |
| 404 | NOT_FOUND | The key's organisation does not exist |
| 429 | RATE_LIMITED | Over the key's budget |
| 500 | INTERNAL_ERROR | Anything else |
Any method other than GET on /api/v1/license is answered 405 Method Not Allowed: there is no API route that installs a license.
Scopes required
| Method | Scope | Rate limit |
|---|---|---|
license.get() | license:read | Default (1,000/hr) |