subscriptions inherit entitlements from items and/or item prices that are in them. Even so, there are many reasons why you may want to override the inherited entitlements on a subscription:
- A customer wants access to a
featurethat theitems on theirsubscriptionare not entitled to. - A customer wants a higher
feature.levelwithout having to pay more. - A customer does not want to see or access a
featurebecause it is irrelevant to them. - You offer customized
featurebundles for eachsubscriptioninstead of groupingfeatures into a product catalog ofitems.
This API helps you implement each of the above use cases, offering a method to override the entitlements for a subscription at the subscription, item price, or charge-item level.
entitlement_override expiry
If expires_at has been set, then the entitlement_override object is no longer returned after expires_at has passed. The expiration of an entitlement_override does not trigger any event immediately. However, after expiry, the entitlement_override record gets deleted within 12 hours. This deletion triggers the entitlement_overrides_auto_removed event which can be considered as a notification, albeit delayed, for one or more entitlement_overrides having expired.
Sample Entitlement overrideJSON
API Index URL
Entitlement overrides attributes
Unique identifier for the entitlement override. This is always auto-generated.
The id of the subscription to which this entitlement override belongr
The id of the entity at whose level the entitlement override is being set for the subscription. If the entity_id is not currently a part of the subscription, the entitlement_override takes effect as soon as the entity is added to the subscription.
The type of the entity at whose level the entitlement override is being set for the subscription.
The id of the feature for which the entitlement override is being set.
The name
of the feature
towards which this entitlement override has been granted.
The level of entitlement that the item 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 also 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 astrueif the feature is available; it is set asfalsewhen the feature is unavailable.
The display name for the entitlement level. The default values are auto-generated based on feature.type as follows:
- When
feature.typeisquantityorrange, thennameis the space-separated concatenation ofvalueand the pluralized version offeature.unit. For example, ifvalueis20andfeature.unitisuser, thennamebecomes20 users. - When
feature.typeiscustom, thennameis the same asvalue. - When
feature.typeisswitch, thenameis set toAvailablewhenvalueistrue; it's set toNot Availablewhenvalueisfalse.
The expiry date for the entitlement_override. The entitlement_override object is no longer returned after this date has passed.