Skip to main content
GET
/
api
/
v1
/
customers
/
{id}
/
promotional-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
});

// Automatically fetches more pages as needed.
for await (const promotionalEntitlementListResponse of client.v1.customers.promotionalEntitlements.list(
  'x',
)) {
  console.log(promotionalEntitlementListResponse.id);
}
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "description": "<string>",
      "featureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "startDate": "2023-11-07T05:31:56Z",
      "endDate": "2023-11-07T05:31:56Z",
      "isVisible": true,
      "usageLimit": 123,
      "hasSoftLimit": true,
      "hasUnlimitedUsage": true,
      "status": "Active",
      "period": "1 week",
      "resetPeriod": "YEAR",
      "resetPeriodConfiguration": {
        "accordingTo": "SubscriptionStart"
      },
      "environmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "enumValues": [
        "<string>"
      ],
      "featureGroupIds": [
        "<string>"
      ]
    }
  ],
  "pagination": {
    "next": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "prev": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

API Key

Path Parameters

id
string
required

The unique identifier of the entity

Required string length: 1 - 255

Query Parameters

after
string<uuid>

Return items that come after this cursor

before
string<uuid>

Return items that come before this cursor

limit
integer
default:20

Maximum number of items to return

Required range: 1 <= x <= 100
status
string

Filter by promotional entitlement status. Supports comma-separated values for multiple statuses

createdAt
object

Filter by creation date using range operators: gt, gte, lt, lte

Response

A paginated list of promotional entitlement objects.

Response list object

data
PromotionalEntitlement · object[]
required
pagination
object
required

Pagination metadata including cursors for navigating through results