This article covers
I'm trying to get the most recent subscription for a batched amount of customer ids at once. I'd like to do this in one API call instead of one API call per customer. What's the best way to do this?
Solution
The ID would be the unique and immutable identifier for the subscription. You can filter it out using the following parameters:
- is: To filter out one specific ID
- is_not: To opt-out of one specific ID from the filter
- starts_with: To pass the filter param which starts with the specific value. This would be helpful when the IDs have a common starting value
- in: To filter out the values which include the mentioned values.
- not_in: To filter out the values which do not include the mentioned values.
For the above scenario, you can use the customer ID filter in the List Customers API call where you pass the param id[in]=<list of Customer IDs>.
Reference:
- https://apidocs.chargebee.com/docs/api/customers?prod_cat_ver=2#list_customers_id