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);
}import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
page = client.v1.customers.promotional_entitlements.list(
id="x",
)
page = page.data[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.V1.Customers.PromotionalEntitlements.List(
context.TODO(),
"x",
stigg.V1CustomerPromotionalEntitlementListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.promotionalentitlements.PromotionalEntitlementListPage;
import io.stigg.models.v1.customers.promotionalentitlements.PromotionalEntitlementListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
PromotionalEntitlementListPage page = client.v1().customers().promotionalEntitlements().list("x");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
page = stigg.v1.customers.promotional_entitlements.list("x")
puts(page)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers.PromotionalEntitlements;
StiggClient client = new();
PromotionalEntitlementListParams parameters = new() { ID = "x" };
var page = await client.V1.Customers.PromotionalEntitlements.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}stigg v1:customers:promotional-entitlements list \
--api-key 'My API Key' \
--id xcurl --request GET \
--url https://api.stigg.io/api/v1/customers/{id}/promotional-entitlements \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/customers/{id}/promotional-entitlements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"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"
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Promotional Entitlements
Get a list of promotional entitlements
Retrieves a paginated list of a customer’s promotional entitlements.
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);
}import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
page = client.v1.customers.promotional_entitlements.list(
id="x",
)
page = page.data[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.V1.Customers.PromotionalEntitlements.List(
context.TODO(),
"x",
stigg.V1CustomerPromotionalEntitlementListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.promotionalentitlements.PromotionalEntitlementListPage;
import io.stigg.models.v1.customers.promotionalentitlements.PromotionalEntitlementListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
PromotionalEntitlementListPage page = client.v1().customers().promotionalEntitlements().list("x");
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
page = stigg.v1.customers.promotional_entitlements.list("x")
puts(page)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers.PromotionalEntitlements;
StiggClient client = new();
PromotionalEntitlementListParams parameters = new() { ID = "x" };
var page = await client.V1.Customers.PromotionalEntitlements.List(parameters);
await foreach (var item in page.Paginate())
{
Console.WriteLine(item);
}stigg v1:customers:promotional-entitlements list \
--api-key 'My API Key' \
--id xcurl --request GET \
--url https://api.stigg.io/api/v1/customers/{id}/promotional-entitlements \
--header 'X-API-KEY: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/customers/{id}/promotional-entitlements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"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"
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Authorizations
Server API Key
Headers
Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.
Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).
Path Parameters
The unique identifier of the entity
Required string length:
1 - 255Query Parameters
Return items that come after this cursor
Return items that come before this cursor
Maximum number of items to return
Required range:
1 <= x <= 100Filter by promotional entitlement status. Supports comma-separated values for multiple statuses
Available options:
Active, Expired, Paused Filter by creation date using range operators: gt, gte, lt, lte
Show child attributes
Show child attributes
Related topics
Get a list of plan entitlementsGet a list of addon entitlementsGet a list of addonsGet a list of plansGet a list of credit grants