SurveyResponse Sub-Object

The following API calls are currently available for the SurveyResponse object:

For info on returned fields and example returns go to SurveyResponse Sub-Object Returned Fields.

GET LIST - Get a list of all of your survey responses. View Example Return.

https://api.alchemer.com/v4/survey/123456/surveyresponse

Filtering Your List

It is worth noting that the GET LIST will pull all responses regardless of the response status; this includes deleted responses. If you wish to exclude deleted responses you can filter your GET LIST like the below call. Learn more about

filtering.

https://api.alchemer.com/v4/survey/123456/surveyresponse.debug?filter[field][0]=status&filter[operator][0]=!=&filter[value][0]=deleted
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345
True
pagepage=3False
resultsperpageresultsperpage=100False
filtersfilter[field][0]=subtype&filter[operator][1]==&filter[value][1]=surveyFalse

GET SURVEYRESPONSE - Get information about a specified survey response. View Example Return.

https://api.alchemer.com/v4/survey/123456/surveyresponse/121
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True

CREATE SURVEYRESPONSE - Create a new survey response. View Example Return.

https://api.alchemer.com/v4/survey/123456/surveyresponse?_method=PUT
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345
True
statusComplete, Partial, DisqualifiedFalse
data[ID][option SKU]
(Populate a select question using ID)
data[1][10001]=Yes (Option title or Reporting value)False
data[ID][value]
(Populate an open-text question)
data[1][value]=Response textFalse
data[ID][option SKU-other]
(Populate other text field)
data[1][10005-other]=Response textFalse
data[ID][comment]
(Populate comment field)
data[1][comment]=Response textFalse
data[Shortname][option SKU]
(Populate a select question using Shortname)
data[Shortname*][10001]=Yes (Option title or Reporting value)False
data[Shortname][value]
(Populate an open-text question using Shortname)
data[Shortname*][value=Response text]
 
False
data[ID][option SKU-other]data[1][10005-other]=Response textFalse

*Shortname is case sensitive

Back to the Top

UPDATE SURVEYRESPONSE - Update a specified survey response. View Example Return.

https://api.alchemer.com/v4/survey/123456/surveyresponse/121?_method=POST
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True
statusComplete, Partial, DisqualifiedFalse
data[ID][option SKU]
(Update a select question using ID)
data[1][10001]=Yes (Option title or Reporting value)False
data[ID][value]
(Update an open-text question)
data[1][value]=Response textFalse
data[ID][option SKU-other]
(Update other text field)
data[1][10005-other]=Response textFalse
data[ID][comment]
(Update comment field)
data[1][comment]=Response textFalse
data[Shortname][option SKU]
(Update a select question using Shortname)
data[Shortname*][10001]=Yes (Option title or Reporting value)False
data[Shortname][value]
(Update an open-text question using Shortname)
data[Shortname*][value=Response text]False

*Shortname is case sensitive

DELETE SURVEYRESPONSE - Delete a specified surveyresponse. View Example Return.

https://api.alchemer.com/v4/survey/123456/surveyresponse/121?_method=DELETE
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True

Filtering SurveyResponse Returns

When pulling surveyresponses it is fairly common to filter the responses that return. Below we cover filtering the surveyresponse object. Learn more about filtering other objects in our Filtering Tutorial.

Filtering can be used in conjunction with the GET method on the surveyresponse object. Filtering is not supported in the PUT, POST or DELETE methods.

Fields

Possible FieldsExampleAssociated Objects
Question[question(2)]surveyresponse
Question Option[question(2), option(10001)]surveyresponse
URL Variable[url("variablename")]*surveyresponse
Date Submitted datesubmitted (EST/EDT or GMT -5/GMT -4)datesubmittedsurveyresponse
Is Test Dataistestdatasurveyresponse
Contact ID (v4 API only)contact_idsurveyresponse
Statusstatussurveyresponse, survey, surveycampaign

*URL Encode the square brackets and the double quotes.

Operators

OperationSyntaxRequires a Value
Is Equal To=True
Is Not Equal To<> or !=True
Greater Than>True
Less Than<True
Less Than or Equal To<=True
Greater Than or Equal To>=True
Is Answered / Is Not BlankIS NOT NULLFalse
Is Not Answered / Is BlankIS NULLFalse
In Comma Separated ListinTrue

Filtering Examples

This query would return responses with question-id 2 answered yes.

https://api.alchemer.com/v4/survey/123456/surveyresponse?filter[field][0]=[question(2)]&filter[operator][0]==&filter[value][0]=yes

This query would return responses with submission times greater than or equal to 2011-02-23 13:23:28 and with the status of Complete.

https://api.alchemer.com/v4/survey/123456/surveyresponse?filter[field][0]=datesubmitted&filter[operator][0]=>=&filter[value][0]=2011-02-23+13:23:28&filter[field][1]=status&filter[operator][1]==&filter[value][1]=Complete

Browsing Survey Responses

Returns default to 50 results for page. Use the page and resultsperpage parameters to customize your return for these calls.

ParameterExampleAssociated Objects
pagepage=3surveyresponse, survey, surveycampaign, surveyquestion, surveypage, contact
resultsperpage*resultsperpage=100 (max=500)surveyresponse, survey

*Note: The limit for resultsperpage is 500 (subject to change), if set over the limit it will default back to the limit.

Browsing Examples

To view a different page of results use the page parameter. The below call would return results 101-150 as results are displayed 50 per page.

https://api.alchemer.com/v4/survey/123456/surveyresponse?page=3

To view more results per page use the resultsperpage parameter. The below call would return results 1-100.

https://api.alchemer.com/v4/survey/123456/surveyresponse?resultsperpage=100

Use the page and resultsperpage parameters in conjunction. This below call would return results 201-300.

https://api.alchemer.com/v4/survey/123456/surveyresponse?page=3&resultsperpage=100