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,
"overageStrategy": "none",
"metadata": {},
"featurePlanVersion": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planVersionId": "<string>",
"type": "feature",
"featureId": "<string>",
"featureType": "flat",
"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>"
}
],
"usageMode": "tier",
"tierMode": "volume",
"units": 2
},
"billingConfig": {
"name": "<string>",
"billingInterval": "month",
"billingIntervalCount": 30,
"billingAnchor": 16,
"planType": "recurring"
},
"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>",
"aggregationMethod": "sum",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
],
"windowSize": "MINUTE"
}
},
"resetConfig": {
"name": "<string>",
"resetInterval": "month",
"resetIntervalCount": 30,
"resetAnchor": 16,
"planType": "recurring"
},
"defaultQuantity": 1,
"limit": 123,
"meterConfig": {
"eventId": "<string>",
"eventSlug": "<string>",
"aggregationMethod": "sum",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
],
"windowSize": "MINUTE"
}
},
"grants": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"customerEntitlementId": "<string>",
"type": "subscription",
"priority": 123,
"allowanceUnits": 1,
"effectiveAt": 123,
"expiresAt": 123,
"metadata": {}
}
],
"subscriptionPhase": {
"creditLinePolicy": "capped"
}
}
]Get active customer entitlements with their grants
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,
"overageStrategy": "none",
"metadata": {},
"featurePlanVersion": {
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"planVersionId": "<string>",
"type": "feature",
"featureId": "<string>",
"featureType": "flat",
"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>"
}
],
"usageMode": "tier",
"tierMode": "volume",
"units": 2
},
"billingConfig": {
"name": "<string>",
"billingInterval": "month",
"billingIntervalCount": 30,
"billingAnchor": 16,
"planType": "recurring"
},
"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>",
"aggregationMethod": "sum",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
],
"windowSize": "MINUTE"
}
},
"resetConfig": {
"name": "<string>",
"resetInterval": "month",
"resetIntervalCount": 30,
"resetAnchor": 16,
"planType": "recurring"
},
"defaultQuantity": 1,
"limit": 123,
"meterConfig": {
"eventId": "<string>",
"eventSlug": "<string>",
"aggregationMethod": "sum",
"aggregationField": "<string>",
"filters": {},
"groupBy": [
"<string>"
],
"windowSize": "MINUTE"
}
},
"grants": [
{
"id": "<string>",
"projectId": "<string>",
"createdAtM": 123,
"updatedAtM": 123,
"customerEntitlementId": "<string>",
"type": "subscription",
"priority": 123,
"allowanceUnits": 1,
"effectiveAt": 123,
"expiresAt": 123,
"metadata": {}
}
],
"subscriptionPhase": {
"creditLinePolicy": "capped"
}
}
]Documentation Index
Fetch the complete documentation index at: https://docs.unprice.dev/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body of the request
The result of the get customer entitlements
36363636363636none, last-call, always Show child attributes
Show child attributes
Show child attributes
Show child attributes