UpdateMemberSubscriptions
The UpdateMemberSubscriptions API method allows one to update member subscriptions.
Parameters
• partnerCode – Required. Partner identifier issued by Frankly Media
• siteCode – Required. Used for the token generation. Partner’s unique identifier of the site
• memberID – Unique ID of the member in the FM database. Required.
• 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 + SubIDList + shared secret).
• Subscriptions – XML structure containing a list of subscriptions that the member will be subscribed or unsubscribed to (see How to Call for details).
Note: SubIdList is a string composed of SubscriptionID1 + OptIn1 + SubscriptionID2 + OptIn2 + SubscriptionIDN + OptInN…
For example: “123true456true789false” where 123, 456, and 789 are valid subscription ID’s
How to call
This request is an http post. The contenttype attribute must be set to application/XML. The body of the post must be in the following format:
<UpdateMemberSubscriptions xmlns=”http://www.franklymedia.com/ISubscriptions” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
<partnerCode>testPartner01</partnerCode>
<siteCode>testSite01</siteCode>
<memberID>123456</memberID>
<timeStamp>20110207211914</timeStamp>
<token>d7b2627c824694b65f1131008d85ae94</token>
<Subscriptions xmlns:b=”http://www.franklymedia.com/datacontract/SubscriptionInfo”>
<b:SubscriptionInfo>
<b:SubscriptionID>123</b:SubscriptionID>
<b:OptIn>true</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>456</b:SubscriptionID>
<b:OptIn>true</b:OptIn>
</b:SubscriptionInfo>
<b:SubscriptionInfo>
<b:SubscriptionID>789</b:SubscriptionID>
<b:OptIn>false</b:OptIn>
</b:SubscriptionInfo>
</Subscriptions>
</UpdateMemberSubscriptions>
Return value
<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>
Status: “SUCCESS” or “FAILED”
StatusCode: 200, 400 or 500 (200 means no errors, it was successfully processed. 400 means client error, and 500 means system error)
Message: error message
MemberID: will be filled if it was successfully processed. And this is the FM member id you may want to hold on for future use.
Remarks
At least one SubscriptionInfo structure must be passed, otherwise, there is no need to call the method.
Examples
See documentation on UpdateMember for example of using PHP to call the API