get customer entitlements
curl --request POST \
--url https://api.unprice.dev/v1/entitlements/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "cus_1H7KQFLr7RepUyQBKdnvY",
"projectId": "prj_1H7KQFLr7RepUyQBKdnvY"
}
'[
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"customerId": "<string>",
"featurePlanVersionId": "<string>",
"subscriptionId": "<string>",
"subscriptionPhaseId": "<string>",
"subscriptionItemId": "<string>",
"effectiveAt": 123,
"expiresAt": 123,
"metadata": {},
"featurePlanVersion": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planVersionId": "<string>",
"featureId": "<string>",
"unitOfMeasure": "<string>",
"config": {
"price": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"tiers": [
{
"unitPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"flatPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"firstUnit": 2,
"lastUnit": 2,
"label": "<string>"
}
],
"units": 2
},
"billingConfig": {
"name": "<string>",
"billingIntervalCount": 30,
"billingAnchor": 16
},
"metadata": {
"realtime": false,
"notifyUsageThreshold": 95,
"overageStrategy": "none",
"blockCustomer": false,
"hidden": false
},
"order": 123,
"feature": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"slug": "<string>",
"code": 123,
"unitOfMeasure": "<string>",
"title": "<string>",
"description": "<string>",
"meterConfig": {
"eventId": "<string>",
"eventSlug": "<string>",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
]
}
},
"resetConfig": {
"name": "<string>",
"resetIntervalCount": 30,
"resetAnchor": 16
},
"defaultQuantity": 1,
"limit": 123,
"meterConfig": {
"eventId": "<string>",
"eventSlug": "<string>",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
]
}
},
"grants": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"customerEntitlementId": "<string>",
"priority": 123,
"allowanceUnits": 1,
"effectiveAt": 123,
"expiresAt": 123,
"metadata": {}
}
],
"subscriptionPhase": {}
}
]entitlements
get customer entitlements
Get active customer entitlements with their grants
POST
/
v1
/
entitlements
/
get
get customer entitlements
curl --request POST \
--url https://api.unprice.dev/v1/entitlements/get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "cus_1H7KQFLr7RepUyQBKdnvY",
"projectId": "prj_1H7KQFLr7RepUyQBKdnvY"
}
'[
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"customerId": "<string>",
"featurePlanVersionId": "<string>",
"subscriptionId": "<string>",
"subscriptionPhaseId": "<string>",
"subscriptionItemId": "<string>",
"effectiveAt": 123,
"expiresAt": 123,
"metadata": {},
"featurePlanVersion": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planVersionId": "<string>",
"featureId": "<string>",
"unitOfMeasure": "<string>",
"config": {
"price": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"tiers": [
{
"unitPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"flatPrice": {
"dinero": {
"amount": 123,
"currency": {
"code": "<string>",
"base": 123,
"exponent": 123
},
"scale": 123
},
"displayAmount": "<string>"
},
"firstUnit": 2,
"lastUnit": 2,
"label": "<string>"
}
],
"units": 2
},
"billingConfig": {
"name": "<string>",
"billingIntervalCount": 30,
"billingAnchor": 16
},
"metadata": {
"realtime": false,
"notifyUsageThreshold": 95,
"overageStrategy": "none",
"blockCustomer": false,
"hidden": false
},
"order": 123,
"feature": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"slug": "<string>",
"code": 123,
"unitOfMeasure": "<string>",
"title": "<string>",
"description": "<string>",
"meterConfig": {
"eventId": "<string>",
"eventSlug": "<string>",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
]
}
},
"resetConfig": {
"name": "<string>",
"resetIntervalCount": 30,
"resetAnchor": 16
},
"defaultQuantity": 1,
"limit": 123,
"meterConfig": {
"eventId": "<string>",
"eventSlug": "<string>",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
]
}
},
"grants": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"customerEntitlementId": "<string>",
"priority": 123,
"allowanceUnits": 1,
"effectiveAt": 123,
"expiresAt": 123,
"metadata": {}
}
],
"subscriptionPhase": {}
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Body of the request
Response
The result of the get customer entitlements
Maximum string length:
36Maximum string length:
36Maximum string length:
36Maximum string length:
36Maximum string length:
36Maximum string length:
36Maximum string length:
36Available options:
none, last-call, always Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

