Subscription data
Summary
A UI application will need to retrieve the user's subscription data to display the appropriate UI elements depending on content subscription state. For example, when browsing content subscribed content can be flagged as such with a "Subscribed" logo or text, and when selected subscribed content should give the option of Play/Watch rather than Purchase. It might also be necessary to display a list of subscribed products in a list for the customer's information.
Subscription data is held in the NAGRA SDP when it is deployed, as one of its primary functions is as a purchase manager.
Data models
The primary data model for subscription data is the Acquired Content List (ACL).
Acquired Content List (ACL)
Each Acquired Content List is a subscription to a single product. Any product can be associated to any number of BTV channels, events or VOD content (typically not a combination however). The ACL item contains details on the product subscription creation, start and end of validity, subscription type, and a link to the product itself.
ACL entries are generated internally by the SDP when a purchase is completed. Likewise, the ACL is managed for validity by the SDP. Once the ACL expires, its status changes to unsubscribed. Therefore, a client need only retrieve ACL data, there is no need to manage it.
A client must periodically update the list even when no client-side purchases are made, because subscriptions could also be managed by the operator. There is currently no notification mechanism to notify the client of ACL changes; a periodic retrieval mechanism must be used to keep the client up to date. Therefore, the general advice is to retrieve the ACL on application startup, every hour after that, and after a purchase is successful.
Use cases
The ACL should be retrieved from the SDP via the SDP Adaptor. The SDP adaptor is needed because the SDP does not store the external ids of the products in the ACL. The SDP Adaptor injects the product external id into the response on the fly. The external product id is required because this is the identifier used by other services such as the MDS and CDG.
The response contains a value for purchasedItemOriginKey, which is the product ID. This id can then be used with the MDS to retrieve further information about the product, or identify associated content.
See also:
Retrieving the ACL for an account
Typically, periodically retrieving the ACL for the account is sufficient. This returns all current entitlements to the account.
http://server:port/adaptor/hue-gateway/gateway/http/js/acquiredContentListService/getByAccountUID
By requesting a status of "CURRENT", only currently valid subscriptions are returned. The Account UID is the UID, that is, the SDP internal identifier, not the "number". This can be found by retrieving the account or context details.
See also: Account, User and Device data
Retrieving the ACL for an account and smartcard
When ACL is needed to be specifically retrieved for a smartcard in that account, the following API should be used.
http://<server>:<port>/adaptor/hue-gateway/gateway/http/js/acquiredContentListService/getByItemAndAccountUIDSmartCard
This returns a list of Acquired Content List objects that is associated with the account and the smartcard.