GetAllSubscriptions
Description
Returns the list of Subscription objects available in the instance and filters them depending on the parameters provided.
This method retrieves all the subscriptions applying some filters:
- Filtering out by SubscriptionPurchaseType = Top-down (Returning only subscriptions with SubscriptionPurchaseType Api-Only or Both)
- Filtering out by UserType (Depending if is Anonymous, Tef-User, Non-Tef-User)
- Filtering out by the type of device the user is logged on (Depending if is OTT, IPTV or Hybrid)
- Filters them depending on the typeFilter parameter provided (see SubscriptionType). If no typeFilter is provided, this method returns all the subscriptions.
Then it filters the resulting subscriptions applying childrenProductType filter. It will only return the Subscriptions that have children products associated (by Content Criteria) with Product Types that match the childrenProductType filter (see ProductType). If no childrenProductType filter is provided it will return subscriptions with any product types. For example, if we provide childrenProductType = "2,3", it will only return subscriptions that contain Movie or Bundles.
Parameters
- typeFilter (String, optional)
- Comma separated list of SubscriptionType enumeration values (example "1,2,4") used to filter the result to return only the desired subscription types. If not provided it will return only Normal and AllPlaylist subscription types (default value = "1,4")
- childrenProductType (String, optional)
- ProductType used to filter the result to return only subscriptions that contain any product matching the ProductType filter provided. If not provided it will return subscriptions with any product types.
- token (String, required)
- A valid token for identifying the API session context. The token can be anonymous or logged.
- offset (int, optional)
- The offset number of the returned values for this request
- limit (int, optional)
- The limit number of values for this request
Returns
Returns a JSON object containing an array of Subscription.
Example:
{
- "Offset": 0,
- "Limit": 100,
- "Count": 6,
- "List":
- [ Array of Subscription objects ]
}
Exceptions
None
Caching
This method is cached.
Known issues
None
Version history
API Version Number | Change description | Changes author |
---|---|---|
1.0 | Initial method design | Harley Cabral |
See also
- SubscriptionType enumeration
- ProductType enumeration
- Subscription object
- Subscription Service methods