The entitlement resource establishes a connection between a feature
and an item
or an item_price
in Chargebee Billing. By defining this relationship, it specifies the scope of access or rights the item or item price has in relation to that particular feature.
Sample EntitlementJSON
Entitlements attributes
The unique identifier of the entity being granted entitlement to a specific feature.
The type of the entity that holds this entitlement.
Indicates that the entity is an item with type set to plan.
Indicates that the entity is an item with type set to addon.
Indicates that the entity is an item with type set to charge.
Indicates that the entity is an item_price associated with an item of type plan.
Indicates that the entity is an item_price associated with an item with type set to addon.
The unique identifier of the feature to which the entity gains entitlement.
The level of entitlement that the entity has towards the feature. The possible values depend on the value of feature.type
:
-
When
feature.typeisquantityand: -
If
feature.levels[is_unlimited]is nottruefor any one offeature.levels[], then the value can be any one offeature.levels[value][]. -
If
feature.levels[is_unlimited]istruefor one of thefeature.levels[], then the value can be:- any one of
feature.levels[value][] - or it can be
unlimited(case-insensitive), indicating unlimited entitlement.
- any one of
-
When
typeisrangeand: -
If
feature.levels[is_unlimited]is nottruefor any one offeature.levels[], then the value can be any whole number betweenlevels[value][0]andlevels[value][1](inclusive). -
If
feature.levels[is_unlimited]istruefor one of thefeature.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.
- any whole number equal to or greater than
-
When
typeiscustom, then the value can be any one offeature.levels[value][]. -
When
typeisswitch, then the value is set asavailableortrue.
The display name for the entitlement level. The value is automatically generated based on feature.type:
- When
feature.typeisquantityorrange, thenameis the space-separated concatenation ofvalueand the plural form offeature.unit. For instance, ifvalueis20andfeature.unitisuser, thenamewill be20 users. - When
feature.typeiscustom, thenamematches thevalue. - When
feature.typeisswitch, thenameis set toAvailablewhenvalueistrue; it's set toNot Availablewhenvalueisfalse.