GetSiteSubscriptions


The GetSiteSubscriptions API method allows one to obtain subscription information for a specific member or the default subscriptions for the network site.

Parameters

PARTNERCODE – Identifier issued by Frankly Media

SITECODE – Partner’s unique identifier of the site

TIMESTAMP – Verification timestamp. UTC time of the client call. Must be in the following format: YYYYMMDDHHmmss

TOKEN – An encrypted string constructed using the passed-in parameters and the partner-specific “shared secret” provided by the Frankly Media. Unless requested differently by the partner, the MD5 hashing algorithm is used to produce the token. For the purpose of this call the following formula should be used: md5(PARTNERCODE+SITECODE+memberID+TIMESTAMP + shared secret). For the generic example refer to this article.

memberID – Indicates a request for a specific member. Can be left empty for a list of network subscriptions.

How to call

This request is an https get. The request is expected to be as follows:
https://api.enticent.com/Subscriptions.svc/GetSiteSubscriptions/{PARTNERCODE}/{SITECODE}/{TIMESTAMP}/{TOKEN}?memberID=

Where the text in the request that is in {CAPS} should be replaced with network-specific values; optionally, the “memberID” can be left empty (as shown), or a specific member ID can be specified (see examples below).

Return value

The call will return XML with the following structure (actual returned subscription data will vary):
<SubscriptionsContainer>
<SubscriptionGroups>
<a:SubscriptionGroup>
<a:GroupID>0</a:GroupID>
<a:GroupTitle>Test group title</a:GroupTitle>
<a:GroupDescription>Sample desc</a:GroupDescription>
<a:GroupImageURL>
</a:GroupImageURL>
<a:Subscriptions>
<b:SubscriptionInfo>
<b:SubscriptionID>961</b:SubscriptionID>
<b:SubscriptionName>Station Updates and Information</b:SubscriptionName>
<b:Description>
Stay current on the latest station events, news, and contests.
</b:Description>
<b:SubscriptionImageURL/>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>6392</b:SubscriptionID>
<b:SubscriptionName>0119 Subscription 10</b:SubscriptionName>
<b:Description/>
<b:SubscriptionImageURL/>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>6390</b:SubscriptionID>
<b:SubscriptionName>0119 Subscription 5</b:SubscriptionName>
<b:Description/>
<b:SubscriptionImageURL/>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>6384</b:SubscriptionID>
<b:SubscriptionName>WTRN 01192011</b:SubscriptionName>
<b:Description/>
<b:SubscriptionImageURL/>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
</a:Subscriptions>
</a:SubscriptionGroup>
<a:SubscriptionGroup>
<a:GroupID>9</a:GroupID>
<a:GroupTitle>Shopping Opportunities</a:GroupTitle>
<a:GroupDescription>
Sign up to get emails about local shopping opportunities
</a:GroupDescription>
<a:GroupImageURL/>
<a:Subscriptions>
<b:SubscriptionInfo>
<b:SubscriptionID>5764</b:SubscriptionID>
<b:SubscriptionName>Clothes</b:SubscriptionName>
<b:Description>Sign up to get cheap clothes</b:Description>
<b:SubscriptionImageURL/>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
</a:Subscriptions>
</a:SubscriptionGroup>
</SubscriptionGroups>
</SubscriptionsContainer>

Alternatively, in the case of an error, the following XML structure will be returned:
<SynchResponse xmlns=”http://schemas.datacontract.org/2004/07/ListenerAPI.DataObjects” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
<Status>FAILED</Status>
<MemberID i:nil=”true”/>
<Message>Call expired</Message>
<StatusCode>500</StatusCode>
</SynchResponse>

Remarks

MemberID parameter is optional, but “?memberID=” must be left on the query string regardless (see example 1 below).

Examples

EXAMPLE 1

Partner: testpartner01

Site: testsite01

Timestamp: 20110207184849

Token: fe8d4a55191f0c8ec362790fb54338d9

MemberID : <left empty for network subscriptions>
https://api.enticent.com/Subscriptions.svc/GetSiteSubscriptions/ testpartner01/testsite01/20110207184849/ fe8d4a55191f0c8ec362790fb54338d9?memberID=

EXAMPLE 2

Partner: partnerTest2

Site: siteTest2

Timestamp: 20110205184849

Token: fe8d4a55191f0c8ec362790fb54338d9

MemberID : 254787
https://api.enticent.com/Subscriptions.svc/GetSiteSubscriptions/partnerTest2/siteTest2/20110205184849/fe8d4a55191f0c8ec362790fb54338d9?memberID=254787