Skip to main content
GET
/
api
/
v1
/
customers
/
{id}
/
entitlements
JavaScript
import Stigg from '@stigg/typescript';

const client = new Stigg({
  apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});

const response = await client.v1.customers.retrieveEntitlements('x');

console.log(response.data);
{
  "data": {
    "entitlements": [
      {
        "isGranted": true,
        "type": "FEATURE",
        "accessDeniedReason": null,
        "feature": {
          "id": "feature-api-calls",
          "displayName": "API Calls",
          "featureType": "NUMBER",
          "featureStatus": "ACTIVE"
        },
        "usageLimit": 10000,
        "hasUnlimitedUsage": false,
        "resetPeriod": "MONTH",
        "currentUsage": 2500
      },
      {
        "isGranted": true,
        "type": "FEATURE",
        "accessDeniedReason": null,
        "feature": {
          "id": "feature-sso",
          "displayName": "Single Sign-On",
          "featureType": "BOOLEAN",
          "featureStatus": "ACTIVE"
        }
      }
    ],
    "accessDeniedReason": null
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Query Parameters

resourceId
string

Resource ID to scope entitlements to a specific resource

Maximum string length: 255

Response

The entitlements state including feature and credit entitlements, and an optional access denied reason.

Response object

data
CustomerEntitlementsState · object
required

The effective entitlements state for a customer or resource.