API Version
Product Catalog
Library

The customer_entitlement resource can be viewed as a subset of the subscription_entitlement resource enhanced with the customer's ID. It is introduced to help retrieve all subscription entitlements for a specific customer.

Sample customer entitlement [ JSON ]

{ "customer_entitlement": { "customer_id": "cus01", "subscription_id": "sub123", "feature_id": "licenses", "value": "60", "name": "60 licenses", "is_enabled": true, "object": "customer_entitlement" } }

API Index URL

https://{site}.chargebee.com/api/v2/customer_entitlements

Model Class

customer_id
string, max chars=50
The unique identifier of the customer to which this entitlement belongs.
subscription_id
optional, string, max chars=50
The unique identifier of the subscription to which this entitlement belongs.
feature_id
optional, string, max chars=50
The unique identifier of the feature towards which this subscription entitlement has been granted.
value
optional, string, max chars=50
The value denoting the effective entitlement level that the subscription has towards the feature.
name
optional, string, max chars=50

The display name for the entitlement level. The value is automatically generated based on feature.type:

  • When feature.type is range or quantity: the name is the space-separated concatenation of value and the pluralized form of feature.unit. For example, if value is 20 and feature.unit is user, then name becomes 20 users.
  • When feature.type is custom, the name is the same as value.
  • When feature.type is switch: name is set to Available when value is true; it's set to Not Available when value is false.

is_enabled
boolean
When true, indicates that the subscription_entitlement is enabled.
customer_id customer_id
string, max chars=50
The unique identifier of the customer to which this entitlement belongs.
subscription_id subscription_id
optional, string, max chars=50
The unique identifier of the subscription to which this entitlement belongs.
feature_id feature_id
optional, string, max chars=50
The unique identifier of the feature towards which this subscription entitlement has been granted.
value value
optional, string, max chars=50
The value denoting the effective entitlement level that the subscription has towards the feature.
name name
optional, string, max chars=50

The display name for the entitlement level. The value is automatically generated based on feature.type:

  • When feature.type is range or quantity: the name is the space-separated concatenation of value and the pluralized form of feature.unit. For example, if value is 20 and feature.unit is user, then name becomes 20 users.
  • When feature.type is custom, the name is the same as value.
  • When feature.type is switch: name is set to Available when value is true; it's set to Not Available when value is false.

is_enabled is_enabled
boolean
When true, indicates that the subscription_entitlement is enabled.
Try in API Explorer

Disabled by default

This endpoint is disabled by default. To enable it, contact Chargebee Support.

Tip

To retrieve subscription entitlements for a specific subscription, use the List subscription entitlements API.

Returns a list of customer_entitlement objects for the specified customer. The entitlements returned are for active subscriptions only. Specifically, these are subscriptions with a status of active or non_renewing.

Sample Request
Try in API Explorer
curl  https://{site}.chargebee.com/api/v2/customers/cus01/customer_entitlements \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=10
copy
Click to Copy
List customer entitlements for a customer
200:
OK
STATUS

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "customer_entitlement": {
                "customer_id": "cus01",
                "subscription_id": "sub123",
                "feature_id": "licenses",
                "value": "60",
                "name": "60 licenses",
                "is_enabled": true,
                "object": "customer_entitlement"
            }
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/customers/{customer-id}/customer_entitlements

Method

limit[]
optional, integer, default=10, min=1, max=100
The number of resources to be returned.
offset[]
optional, string, max chars=1000
Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set 'offset' to the value of 'next_offset' obtained in the previous iteration of the API call.
consolidate_entitlements[]
optional, boolean, default=false
When set to true, the response returns a unified view of entitlement values for each feature across the customer. This includes entitlements assigned directly to the customer as well as those inherited from any of the customer's subscriptions. In this mode, the subscription_id field is omitted from the response objects. The consolidated entitlement value is derived using the same logic described in the Subscription Entitlements documentation, based on the feature type.
customer_entitlement customer_entitlement
always returned
Resource object representing customer_entitlement
next_offset next_offset
optional, string, max chars=1000
This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

Sample admin console URL

https://{site}.chargebee.com/admin-console/customer_entitlements/123x