Request
string
required
The customer ID to load entitlements for.
string
Optional project ID. Only main-project keys can request another project.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
const { result, error } = await unprice.access.entitlements.list({
customerId: "cus_1234567890"
});
if (error) {
console.error(error.message);
return;
}
console.log(result);
[
{
"customerId": "cus_1234567890",
"featurePlanVersion": {
"featureType": "usage",
"unitOfMeasure": "messages"
}
}
]
Get active entitlements for a customer
const { result, error } = await unprice.access.entitlements.list({
customerId: "cus_1234567890"
});
if (error) {
console.error(error.message);
return;
}
console.log(result);
[
{
"customerId": "cus_1234567890",
"featurePlanVersion": {
"featureType": "usage",
"unitOfMeasure": "messages"
}
}
]
const { result, error } = await unprice.access.entitlements.list({
customerId: "cus_1234567890"
});
if (error) {
console.error(error.message);
return;
}
console.log(result);
[
{
"customerId": "cus_1234567890",
"featurePlanVersion": {
"featureType": "usage",
"unitOfMeasure": "messages"
}
}
]