LoadSurvey
The LoadSurvey API provides information about a specific surveys. Stealth and inactive surveys are included
Parameters
- surveyID– Unique identifier of the survey in the Frankly Media database
- siteID– Unique identifier of the site in the Frankly Media database. Request the ID(s) from the FM support
- partnerName – Unique identifier of the 3rd party calling the API. This information must be requested from Frankly Media in order to use any API methods
- 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.
- timestampVerification 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/LoadActiveSurveys/{siteID}/{partnerName}/{token}/{timestamp}. https//api.enticent.com/subscriptions.svc/LoadActiveSurveys/1562/CLRCHNNY/ 83-32-1D-4D-47-01-86-A6-85-89-87-C0-F9-32-E1-22/20101029
Return Value
The following XML structure is returned in the success scenario:
<survey xmlns=”http://schemas.datacontract.org/2004/07/ListenerAPI.DataObjects” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”><SurveyID>52282</SurveyID><Name>Russian research</Name><Points>400</Points><Begins>2010-10-28T00:00:00</Begins><Ends>2010-10-30T00:00:00</Ends><Blurb><![CDATA[Russian culture opinion poll]]</Blurb><FeaturedUrl>/ProductImages/godby75.jpg</FeaturedUrl><AdvertiserText/><AdvertiserImage/><SID>41511</SID><UseBreakoutOptin>false</UseBreakoutOptin><YesButtonText/><NoButtonText/><InstanceURL>asp3/SurveyDetail.aspx?SurveyScheduleID=52282</InstanceURL><RedirectOfferUrl/><SurveyTypeID>9</SurveyTypeID><Featured>false</Featured><Questions><surveyquestion><QuestionID>117160</QuestionID><QuestionType>2</QuestionType><Question>Your favorite vodka</Question><Answers><surveyanswer><AnswerID>556119</AnswerID><QuestionID>117160</QuestionID><Answer>Stoly</Answer><DisplayOrder>1</DisplayOrder></surveyanswer><surveyanswer><AnswerID>556120</AnswerID><QuestionID>117160</QuestionID><Answer>Standard</Answer><DisplayOrder>2</DisplayOrder></surveyanswer><surveyanswer><AnswerID>556121</AnswerID><QuestionID>117160</QuestionID><Answer>Svedka</Answer><DisplayOrder>3</DisplayOrder></surveyanswer></Answers><IsOptIn>false</IsOptIn></surveyquestion><surveyquestion><QuestionID>117162</QuestionID><QuestionType>1</QuestionType><Question>Best season</Question><Answers><surveyanswer><AnswerID>556122</AnswerID><QuestionID>117162</QuestionID><Answer>Winter</Answer><DisplayOrder>1</DisplayOrder></surveyanswer><surveyanswer><AnswerID>556123</AnswerID><QuestionID>117162</QuestionID><Answer>Early winter</Answer><DisplayOrder>2</DisplayOrder></surveyanswer></Answers><IsOptIn>false</IsOptIn></surveyquestion></Questions></survey>
In the case of an error, a SynchError node will be returned by the service. The explanation of the error will be embedded in the messageText node.
Here is an example of the XML structure:
<SynchError xmlns=”http://schemas.datacontract.org/2004/07/ListenerAPI.DataObjects” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”><messageText>Request declined. Invalid token for partner CLRCHNNY. System.Exception: Validation of the checksum failed</messageText></SynchError>
Remarks
The API supports the following Survey Types:
Type ID Name
1 Feedback
2 Film
3 Music
4 Television
5 Shopping
9 Travel
10 Goods & Services
11 Trivia
12 Music Feedback
13 Contests
14 Advertiser
15 Interview
16 Station Feedback
17 News
Note! The API only returns the Type ID value
The API supports the following question type values:
TypeID Name
1 Single Answer
2 Multiple Answers
5 Comment Only
Note! The API only returns the Type ID value