Skip to main content
GET
/
api
/
v1
/
customers
/
{id}
/
entitlements
/
check
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.checkEntitlement('x');

console.log(response.data);
{
  "data": {
    "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
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.stigg.io/llms.txt

Use this file to discover all available pages before exploring further.

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

featureId
string

Feature ID (refId) to check. Mutually exclusive with currencyId.

Required string length: 1 - 255
currencyId
string

Currency ID (refId) to check for credit entitlements. Mutually exclusive with featureId.

Required string length: 1 - 255
resourceId
string

Resource ID to scope the entitlement check to a specific resource

Required string length: 1 - 255
requestedUsage
integer

Requested usage amount to evaluate against the entitlement limit (numeric features only)

Required range: x >= 0
requestedValues
string[]

Requested values to evaluate against allowed values (enum features only)

Response

The single entitlement (feature or credit) for the requested customer, including granted status and any access denied reason.

Response object

data
object
required