SubmitCode
The SubmitCode API allows posting of consumer’s answers to the currently active bonus or sponsor code promotions. If the code matches any currently active and valid Bonus Code or Sponsor Code (codeword or unique code) and the member has not reached the frequency limit on a unique code (if applicable) then the member will be credited the appropriate points and the API will return a success message with the number of points awarded. The success message will display at the bottom of the page and read “Your account was credited with [x] [points]. Your now have [y] [points] in your account. ” If the code does not match a currently active and valid code or if the member has reached the limit on a unique code (if applicable) then an error message will be returned and points will not be credited.
Parameters
- memberID– Unique member identifier in the FM database
- siteID– Unique siteidentifier in the FM database
- code– The code provided by the member
- partnerName – Unique identifier of the 3rd party calling the API. Provided by Frankly Media
- 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(memberID + shared secret). For the generic example refer to this article.
- timestamp– Verification timestamp. UTC time of the client call. Must be in the following format: YYYYMMDDHHmmss
How to call
URL Format: https://api.enticent.com/Subscriptions.svc/SubmitCode/{memberID}/{siteID}/{code}/{partnerName}/{token}/{timestamp}. https://api.enticent.com/Subscriptions.svc/SubmitCode/18536568/1083/answer/partner/1E-BE-99-58-31-4E-E6-F0-49-9D-1B-75-5B-A2-75-27/0/0/457/20100505145523
Return Value
The following XML structure is returned in the success scenario.
<receipt xmlns=”http://schemas.datacontract.org/2004/07/ListenerAPI.DataObjects” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
<totalpoints>198340</totalpoints>
<credit>10</credit>
</receipt>
The receipt contains the total number of points in the member’s account and the number of points credited in this transaction.
In the case of failure the following message format will be returned:
<SynchError xmlns=”http://schemas.datacontract.org/2004/07/ListenerAPI.DataObjects” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”>
<messageText>Error details.</messageText>