getSurveyResponses
Endpoint URL
https://endpoint/getSurveyResponses
Parameter | Data Type | Optional/ Mandatory | Default if not specified | Constraints | Description |
username | String | Mandatory | N/A - Mandatory Parameter | Must be a valid username within QuickTapSurvey | The username with API user access role. |
API Key | String | Mandatory | N/A - Mandatory Parameter | Must be a valid API key within QuickTapSurvey | The official API key generated by QuickTapSurvey. |
surveyId | int | Mandatory | N/A - Mandatory Parameter | Must be a valid survey ID on your account | Integer which uniquely references a survey. |
pageSize | int | Optional | 100 | Min 1, Max 1000 | The number of results to be returned in the current request or page. |
pageNumber | int | Optional | 1 | Min 1 | The page number of the result set being returned. |
fromDate | String | Optional | unfiltered | Format: YYYY-MM-DD HH:MM:SS TZ
Example: 2014-09-29 17:25:34 -0400 | The date that will be used to filter survey data so that responses collected prior to this date will not be returned in this request.
If dateFilterType parameter is not used, fromDate will be based on the date collected, otherwise dateFilterType will be respected. |
toDate | String | Optional | unfiltered | Format: YYYY-MM-DD HH:MM:SS TZ
Example: 2014-09-29 17:25:34 -0400 | The date that will be used to filter survey data so that responses collected after this date will not be returned in this request.
If dateFilterType parameter is not used, toDate will be based on the date collected, otherwise dateFilterType will be respected. |
dateFilterType | String | Optional | response ID | Must be one of the following strings:
• dateCollected • dateSent | Response filtering AND sort order will be based on the dateFilterType specified. Data will be presented in descending order from most recent to least recent.
If no dateFilterType is specified the response ID is used for the sort order. |
fromUsers | String
| Optional
| Responses From all users | Comma Separated list of username:
"user1,user2,user3"
| List of users from which you would like receive response from
|
showSkippedResponses | Boolean | Optional
| False (don't show skipped responses) | True or False | If True you will see all responses regardless if they were skipped via skip logic or skipped as a optional question.
|
surveyId | int | The integer that uniquely identifies a survey. |
pageNumber | int | The page number of the result set being returned. |
questions | array | A list of the questions in the survey. Each item in this list contains a questionNumber and questionTitle. |
questionNumber | int | A question’s numerical position within the survey. |
questionTitle | String | The title of a question in a survey. |
responseFilters | array | A list of response filters associated with this survey. |
responses | array | A list of responses to the survey. A response represents a single submission of the survey. |
username | String | The username of the Data Collector user who was logged into the device when the response was submitted. |
surveyResponseId | int | The integer that uniquely identifies a survey response. |
dateCollected | String | The date and time when the survey was submitted. |
dateSent | String | The date and time when the response was sent to QuickTapSurvey’s servers. |
responseFilterResponseValues | array | The values that were set on the device for each response filter at the time the response was sent. |
responseValues | array | A list of question-answer pairs for a response. Each item inside consists of a questionNumber and responseValue. |
responseValue | String | A representation of the answer that the user gave for a question. The format will vary depending on the question type. |
resultCode | String | A code corresponding to the result of the request. See result code explanations. |
resultDescription | String | A description of the result of the API request. |
Sample JSON Request
{ username: "APIuser", apiKey: "TQQBSVXSXK23YBPQROLQCM3UW6BKY1T0", surveyId: 38064, pageSize: 20, pageNumber: 1, fromDate: "2014-09-09 17:25:34 -0400", toDate: "2015-09-20 10:25:34 -0400", dateFilterType: "dateCollected" }
Sample JSON Response
{ surveyId: 38064, pageNumber: 1, questions: [ { questionNumber: 1, questionTitle: "MC single answer" }, { questionNumber: 2, questionTitle: "Yes or no" }, { questionNumber: 3, questionTitle: "What is your gender?" }, { questionNumber: 4, questionTitle: "Record a time." } ], responseFilters: [], responses: [ { responseId: 456677, username: "apiuser", dateCollected: "2014-10-14 12:58:14 -0400", dateSent: "2014-10-14 12:58:15 -0400", responseFilterResponseValues: [], responseValues: [ { questionNumber: 1, responseValue: "three" }, { questionNumber: 2, responseValue: "No" }, { questionNumber: 3, responseValue: "Male" }, { questionNumber: 4, responseValue: "00:00.6" } ] }, { responseId: 456678, username: "apiuser", dateCollected: "2014-10-14 16:38:14 -0400", dateSent: "2014-10-14 16:38:15 -0400", responseFilterResponseValues: [], responseValues: [ { questionNumber: 1, responseValue: "two" }, { questionNumber: 2, responseValue: "Yes" }, { questionNumber: 3, responseValue: "Female" }, { questionNumber: 4, responseValue: "00:01.5" } ] } ], resultCode: "30", resultDescription: "Get survey responses succeeded." }