Survey_Get_Responses(string key, int surveyId)

Description

Retrieve responses for a specific survey
If the ‘page’ optionalParameter is provided, results are paginated to 1000 surveys per page.
If the ‘offset’ optionalParameter is provided, the result set will start at that parameter’s value (indexed from 0).

The return value is an array of responses. Each response has array keys for the question ID the response goes with.

Parameter Type Required Description
key string Yes
Your API key – used to authenticate your account
surveyId int Yes
The ID of the survey you want to retrieve the responses for
optionalParameters[startDate] date No
Return only survey responses started on this date (UTC)
optionalParameters[endDate] date No
Return only survey responses completed on this date (UTC)
optionalParameters[is_complete] bool No
Return only survey responses that are complete (true) or incomplete (false)
optionalParameters[page] int No
Return questions on this page of the search results
optionalParameters[offset] Int No
Starting index to return results from. Indexed from 0.
optionalParameters[num] int No
Number of results to return
optionalParameters[response_id] int No
Unique response identifier
optionalParameters[contact_id] int No
Unique respondent identifier created
optionalParameters[person_code] int No
Unique respondent identifier provided
optionalParameters[sortDir] string No
Sort direction, valid values: U, D
Call (GET)
http://api.surveytown.com/2/REST/?method=Survey_Get_Responses&key=YOUR_API_KEY&surveyId=1
Example Response