API Version
Product Catalog
Library
Deprecated

This API remains operational, but we recommend transitioning to its successor: Entitlements API.

Items represent the products or services that you offer to your customers. Items often differ from each other in the product features that are available in them. An item entitlement object represents the entitlement an item has towards a feature. An item can have multiple such entitlements, each corresponding to a unique feature it is entitled to.

Item entitlements can be created while creating a feature. All subscriptions containing an item also inherit its entitlements.

Sample item entitlement [ JSON ]

{ "item_entitlement": { "feature_id": "fea-38eae836-73b4-4056-9704-254818d145de", "feature_name": "Quickbooks Integration_123", "id": "item-ent-56a6f379-f8e1-44f7-9e83-a7d57522fa1b", "item_id": "enterprise", "item_type": "plan", "name": "Available", "object": "item_entitlement", "value": "true" } }

API Index URL GET

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

Model Class

id
string, max chars=100
A unique identifier for the item_entitlement. This is auto-generated.
item_id
optional, string, max chars=100
The id of the item to which this entitlement belongs.
item_type
optional, enumerated string
The type of the item to which this entitlement belongs.
Possible values are
planPlanaddonAddonchargeChargesubscriptionSubscription
Show all values[+]
feature_id
optional, string, max chars=50
The id of the feature towards which this entitlement has been granted.
feature_name
optional, string, max chars=50
The name of the feature towards which this entitlement has been granted.
value
optional, string, max chars=50
The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type:
  • When feature.type is quantity and:
    • If feature.levels[is_unlimited] is not true for any one of feature.levels[], then the value can be any one of feature.levels[value][].
    • If feature.levels[is_unlimited] is true for one of the feature.levels[], then the value can also be:
      • any one of feature.levels[value][]
      • or it can be unlimited (case-insensitive), indicating unlimited entitlement.
  • When type is range and:
    • If feature.levels[is_unlimited] is not true for any one of feature.levels[], then the value can be any whole number between levels[value][0] and levels[value][1] (inclusive).
    • If feature.levels[is_unlimited] is true for one of the feature.levels[], then the value can be:
      • any whole number equal to or greater than levels[value][0]
      • or it can be unlimited (case-insensitive), indicating unlimited entitlement.
  • When type is custom, then the value can be any one of feature.levels[value][].
  • When type is switch, then the value is set as available or true.

name
optional, string, max chars=50
The display name for the entitlement level. The default values are auto-generated based on feature.type as follows:
  • When feature.type is quantity or range, then name is the space-separated concatenation of value and the pluralized version of feature.unit. For example, if value is 20 and feature.unit is user, then name becomes 20 users.
  • When feature.type is custom, then name is the same as value.a

id id
string, max chars=100
A unique identifier for the item_entitlement. This is auto-generated.
item_id item_id
optional, string, max chars=100
The id of the item to which this entitlement belongs.
item_type item_type
optional, enumerated string
The type of the item to which this entitlement belongs.
feature_id feature_id
optional, string, max chars=50
The id of the feature towards which this entitlement has been granted.
feature_name feature_name
optional, string, max chars=50
The name of the feature towards which this entitlement has been granted.
value value
optional, string, max chars=50
The level of entitlement that the item has towards the feature. The possible values depend on the value of feature.type:
  • When feature.type is quantity and:
    • If feature.levels[is_unlimited] is not true for any one of feature.levels[], then the value can be any one of feature.levels[value][].
    • If feature.levels[is_unlimited] is true for one of the feature.levels[], then the value can also be:
      • any one of feature.levels[value][]
      • or it can be unlimited (case-insensitive), indicating unlimited entitlement.
  • When type is range and:
    • If feature.levels[is_unlimited] is not true for any one of feature.levels[], then the value can be any whole number between levels[value][0] and levels[value][1] (inclusive).
    • If feature.levels[is_unlimited] is true for one of the feature.levels[], then the value can be:
      • any whole number equal to or greater than levels[value][0]
      • or it can be unlimited (case-insensitive), indicating unlimited entitlement.
  • When type is custom, then the value can be any one of feature.levels[value][].
  • When type is switch, then the value is set as available or true.

name name
optional, string, max chars=50
The display name for the entitlement level. The default values are auto-generated based on feature.type as follows:
  • When feature.type is quantity or range, then name is the space-separated concatenation of value and the pluralized version of feature.unit. For example, if value is 20 and feature.unit is user, then name becomes 20 users.
  • When feature.type is custom, then name is the same as value.a

Deprecated

This endpoint remains operational, but we recommend transitioning to its successor: List entitlements.

Retrieves a list of all the item_entitlements for the item specified.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/items/enterprise/item_entitlements \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=2 \
     --data-urlencode offset="0"
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "item_entitlement": {
                "feature_id": "fea-38eae836-73b4-4056-9704-254818d145de",
                "feature_name": "Quickbooks Integration_123",
                "id": "item-ent-56a6f379-f8e1-44f7-9e83-a7d57522fa1b",
                "item_id": "enterprise",
                "item_type": "plan",
                "name": "Available",
                "object": "item_entitlement",
                "value": "true"
            }
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/items/{item-id}/item_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.
item_entitlement item_entitlement
always returned
Resource object representing item_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/item_entitlements/123x
Deprecated

This endpoint remains operational, but we recommend transitioning to its successor: List entitlements.

Retrieves a list of all the item_entitlements for the feature specified.

Notes

Sample Request
curl  https://{site}.chargebee.com/api/v2/features/fea-66ee05d2-2800-449f-a418-eaa863a67f9f/item_entitlements \
     -G  \
     -u {site_api_key}:\
     --data-urlencode limit=2 \
     --data-urlencode offset="0"
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "item_entitlement": {
                "feature_id": "fea-66ee05d2-2800-449f-a418-eaa863a67f9f",
                "feature_name": "Quickbooks Integration_1234",
                "id": "item-ent-15292c03-0b77-426a-aa5b-a18bb0acafdc",
                "item_id": "enterprise",
                "item_type": "plan",
                "name": "Available",
                "object": "item_entitlement",
                "value": "true"
            }
        },
        {..}
    ]
}

URL Format GET

https://{site}.chargebee.com/api/v2/features/{feature-id}/item_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.
item_entitlement item_entitlement
always returned
Resource object representing item_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/item_entitlements/123x
Deprecated

This endpoint remains operational, but we recommend transitioning to its successor: Manage entitlements.

Upserts or removes a set of item_entitlements for an feature depending on the action specified. The API returns the upserted or deleted item_entitlements after successfully completing the operation. The operation returns an error when the first item_entitlement fails to be processed. Either all the item_entitlements provided in the request are processed or none.

Notes

Sample Request
# Adding item entitlements for a feature
curl  https://{site}.chargebee.com/api/v2/features/fea-38eae836-73b4-4056-9704-254818d145de/item_entitlements \
     -X POST  \
     -u {site_api_key}:\
     -d action="UPSERT" \
     -d item_entitlements[value][0]="true" \
     -d item_entitlements[item_id][0]="enterprise" \
     -d item_entitlements[item_type][0]="PLAN" 
# Removal of item entitlements from a feature
curl  https://{site}.chargebee.com/api/v2/features/fea-51f6e581-2738-47f5-ac08-55f90122f6e2/item_entitlements \
     -X POST  \
     -u {site_api_key}:\
     -d action="REMOVE" \
     -d item_entitlements[value][0]="true" \
     -d item_entitlements[item_id][0]="enterprise" \
     -d item_entitlements[item_type][0]="PLAN" 
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "item_entitlement": {
                "feature_id": "fea-38eae836-73b4-4056-9704-254818d145de",
                "feature_name": "Quickbooks Integration_123",
                "id": "item-ent-56a6f379-f8e1-44f7-9e83-a7d57522fa1b",
                "item_id": "enterprise",
                "item_type": "plan",
                "name": "Available",
                "object": "item_entitlement",
                "value": "true"
            }
        },
        {..}
    ]
}

URL Format POST

https://{site}.chargebee.com/api/v2/features/{feature-id}/item_entitlements

Method

action[]
required, enumerated string
The specific action to be performed for each item_entitlement specified.
Possible values are
upsertIf the item_entitlement already exists for the feature_id and item_id combination, the value of the item_entitlement is updated. If it doesn’t exist, a new item_entitelment is created.removeDeletes the item_entitlement for the feature_id and item_id combination, if it exists.
Show all values[+]
item_entitlements[item_id][0..n]
required, string, max chars=100
item_entitlements[item_type][0..n]
optional, enumerated string
Possible values are
planPlanaddonAddonchargeChargesubscriptionSubscription
Show all values[+]
item_entitlements[value][0..n]
optional, string, max chars=50
item_entitlement item_entitlement
always returned
Resource object representing item_entitlement

Sample admin console URL

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

This endpoint remains operational, but we recommend transitioning to its successor: Manage entitlements.

Upserts or removes a set of item_entitlements for an item depending on the action specified. The API returns the upserted or deleted item_entitlements after successfully completing the operation. The operation returns an error when the first item_entitlement fails to be processed. Either all the item_entitlements provided in the request are processed or none.

Notes

Sample Request
# Adding item entitlements for an item
curl  https://{site}.chargebee.com/api/v2/items/basic/item_entitlements \
     -X POST  \
     -u {site_api_key}:\
     -d action="UPSERT" \
     -d item_entitlements[value][0]="true" \
     -d item_entitlements[feature_id][0]="fea-2959f91d-a517-4440-a7d0-b00cf2fcec62" 
# Remove item entitlements for an item
curl  https://{site}.chargebee.com/api/v2/items/enterprise/item_entitlements \
     -X POST  \
     -u {site_api_key}:\
     -d action="REMOVE" \
     -d item_entitlements[feature_id][0]="fea-3be1c4bf-cd37-4c93-adf5-823db1db3130" 
copy
Click to Copy

Sample Response [ JSON ]

Show more...
{
    "list": [
        {
            "item_entitlement": {
                "feature_id": "fea-2959f91d-a517-4440-a7d0-b00cf2fcec62",
                "feature_name": "Quickbooks Integration_aie",
                "id": "item-ent-50a3657a-1452-4f7f-bb50-a8e5ac0a9907",
                "item_id": "basic",
                "item_type": "plan",
                "name": "Available",
                "object": "item_entitlement",
                "value": "true"
            }
        },
        {..}
    ]
}

URL Format POST

https://{site}.chargebee.com/api/v2/items/{item-id}/item_entitlements

Method

action[]
required, enumerated string
The specific action to be performed for each item_entitlement specified.
Possible values are
upsertIf the item_entitlement already exists for the feature_id and item_id combination, the value of the item_entitlement is updated. If it doesn’t exist, a new item_entitelment is created.removeDeletes the item_entitlement for the feature_id and item_id combination, if it exists.
Show all values[+]
item_entitlements[feature_id][0..n]
required, string, max chars=50
item_entitlements[value][0..n]
optional, string, max chars=50
item_entitlement item_entitlement
always returned
Resource object representing item_entitlement

Sample admin console URL

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