Docs

Log in to read the version of docs relevant to your site, or use the dropdown versions

How to find the plans that are associated with a feature using API?

Scope

  1. How to find the plans/items that are associated with a feature?
  2. How to find the plans/items that are associated with entitlements?
  3. How can I filter out the plans/items that are associated with a feature and entitlements using APIs?

Solution

At present, we do not have the option to filter the features associated with a plan from the Chargebee UI. This is possible using only API currently.

a) To retrieve the item entitlements for an item (plans/Addons/charges)

API used: List item entitlements for an item

Input: Plan/ Addon/Charge ID (not the item price)

Limit: Number of resources to be retrieved

Offset - Determines your position in the list for pagination

Sample API call:

curl https://imtestingqb-test.chargebee.com/api/v2/items/enterprise/item_entitlements \

 -G  

 -u test_xxxxxxxxxxxxxxxxxxxxxxxx:

 --data-urlencode limit=2 

 --data-urlencode offset="0"

b) To retrieve the entitlements for a feature

API used: List item entitlements for a feature

Input: Feature ID

Limit: Number of resources to be retrieved

Offset: Determines your position in the list for pagination.

Was this article helpful?