Questions
List of operations for the resource
Name | URL | Description |
| Returns a list of questions for the survey with the specified ID. |
Description of response parameters
Name/path | Description | Possible values |
| Question ID | |
| ID of the page where the question is located | |
| Question number | |
| Question type |
|
| Question creation date | |
| Date the question was last modified | |
| Question text | |
| Question description | |
| Flag indicating whether the question is mandatory |
|
| number of answers in the question | |
| internal (system) question name | |
| Flag indicating whether there should be space for a long text answer in the open-ended question. Parameter visible only for the open-ended question |
|
| In multiple choice questions: minimum number of selected answers |
|
| In multiple choice questions: maximum number of selected answers |
|
| Flag indicating whether the display order of answers (cafeteria) should be randomized Randomizing the order should be handled on the client application side. Regardless of this flag, the API will always return these answers in the same order. Information available for questions: single choice, multiple choice, matrix single choice, matrix multiple choice, ranking, form, slider, drop-down list, drag and drop |
|
| Flag indicating whether answers should be displayed next to each other (Horizontal orientation of displaying answers) Information available for questions: single choice and multiple choice. |
|
| Number of slider positions. Option available only in the slider question. | |
| Answers in the question (cafeteria). Field present in questions: single choice, multiple choice, matrix single choice, matrix multiple choice, ranking, form, drop-down list, drag and drop, rating |
|
| Answer text | |
| Flag indicating whether it is possible to provide a custom answer for a given option |
|
| Flag indicating whether filling in the answer field is mandatory. Parameter available only for the form type question |
|
| Subsequent scale positions (fixed) available for questions: matrix single choice, matrix multiple choice, matrix open-ended, drag and drop, rating | Array |
| Scale label text | |
| Extreme labels of the continuous scale, available only for the slider question | Array |
| Text on the left side of the scale | |
| Text on the right side of the scale |
List of questions
URL
(GET) https://app.customerhero.com/api/v2/questions/:id_survey/:id_pageParameters (GET)
Name | Description |
| ID of the survey containing the questions. Mandatory parameter |
| ID of the page containing the questions. The page must belong to the survey (id_survey). Optional parameter |
Example response
[
{
"id":782299,
"id_page":258355,
"number":1,
"type":0,
"date_created":"2011-07-14 22:24:46",
"date_modified":"2011-12-29 18:04:24",
"text":"Single choice",
"desc":"",
"required":1,
"answers_count":3,
"internalName": ""
"options":{
"shuffle_answers":false,
"horizontal_display":false
},
"answers":[
{
"text":"yes",
"custom_response_available":false
},
{
"text":"no",
"custom_response_available":false
},
{
"text":"other",
"custom_response_available":true
}
]
},
{
"id":782300,
"id_page":258355,
"number":2,
"type":6,
"date_created":"2011-07-14 22:24:58",
"date_modified":"2011-12-29 18:04:13",
"text":"Multiple choice",
"desc":"",
"required":1,
"answers_count":4,
"internalName": ""
"options":{
"min":2,
"max":2,
"shuffle_answers":false,
"horizontal_display":false
},
"answers":[
{
"text":"yes",
"custom_response_available":false
},
{
"text":"no",
"custom_response_available":false
},
{
"text":"maybe",
"custom_response_available":false
},
{
"text":"other",
"custom_response_available":true
}
]
},
{
"id":782301,
"id_page":258355,
"number":3,
"type":1,
"date_created":"2011-07-14 22:25:10",
"date_modified":"2011-12-29 18:04:04",
"text":"matrix single choice",
"desc":"",
"required":1,
"answers_count":2,
"internalName": ""
"options":{
"shuffle_answers":false
},
"answers":[
{
"text":"ola"
},
{
"text":"jola"
}
],
"scales":[
{
"text":"yes"
},
{
"text":"no"
}
]
},{
"id":782302,
"id_page":258355,
"number":4,
"type":7,
"date_created":"2011-07-14 22:25:27",
"date_modified":"2011-12-29 18:03:54",
"text":"matrix multiple choice",
"desc":"Enter your eye color",
"required":1,
"answers_count":4,
"internalName": ""
"options":{
"shuffle_answers":false
},
"answers":[
{
"text":"ola"
},
{
"text":"jola"
},
{
"text":"ala"
},
{
"text":"zuza"
}
],
"scales":[
{
"text":"blue"
},
{
"text":"green"
},
{
"text":"hazel"
}
]
},
{
"id":782303,
"id_page":258355,
"number":5,
"type":2,
"date_created":"2011-07-14 22:25:36",
"date_modified":null,
"text":"open-ended",
"desc":"",
"required":1,
"answers_count":1,
"internalName": ""
"options":{
"long_answer":false
}
},
{
"id":782304,
"id_page":258355,
"number":6,
"type":5,
"date_created":"2011-07-14 22:25:52",
"date_modified":null,
"text":"Ranking question",
"desc":"",
"required":1,
"answers_count":3,
"internalName": ""
"options":{
"shuffle_answers":true
},
"answers":[
{
"text":"one"
},
{
"text":"two"
},
{
"text":"three"
}
]
},
{
"id":782305,
"id_page":258355,
"number":7,
"type":4,
"date_created":"2011-07-14 22:26:04",
"date_modified":"2011-12-29 18:04:59",
"text":"Form",
"desc":"",
"required":0,
"answers_count":4,
"internalName": ""
"options":{
"shuffle_answers":false
},
"answers":[
{
"text":"First name",
"required":false
},
{
"text":"Last name",
"required":false
},
{
"text":"PESEL",
"required":true
},
{
"text":"Phone",
"required":true
}
]
},
{
"id":782306,
"id_page":258355,
"number":8,
"type":8,
"date_created":"2011-07-14 22:26:27",
"date_modified":null,
"text":"Differential",
"desc":"",
"required":1,
"answers_count":2,
"internalName": ""
"options":{
"shuffle_answers":false,
"range_positions_number":6
},
"ranges":[
{
"left":"bad",
"right":"good"
},
{
"left":"sad",
"right":"happy"
}
]
},
{
"id":819543,
"id_page":258355,
"number":9,
"type":13,
"date_created":"2011-12-29 16:56:00",
"date_modified":null,
"text":"Drop-down list",
"desc":"",
"required":1,
"answers_count":4,
"internalName": ""
"options":{
"shuffle_answers":true
},
"answers":[
{
"text":"one"
},
{
"text":"two"
},
{
"text":"three"
},
{
"text":"four"
}
]
},
{
"id":819544,
"id_page":258355,
"number":10,
"type":10,
"date_created":"2011-12-29 16:57:27",
"date_modified":"2011-12-29 18:03:18",
"text":"Number question",
"desc":"Additional description for the number question",
"required":1,
"answers_count":1,
"internalName": ""
"options":{
"min":null,
"max":10
}
},
{
"id":819545,
"id_page":258355,
"number":11,
"type":11,
"date_created":"2011-12-29 16:57:48",
"date_modified":null,
"text":"E-mail question",
"desc":"",
"required":1,
"answers_count":1,
"internalName": ""
},
{
"id":819546,
"id_page":258355,
"number":12,
"type":12,
"date_created":"2011-12-29 16:58:07",
"date_modified":null,
"text":"Date question",
"desc":"",
"required":1,
"answers_count":1,
"internalName": ""
"options":{
"min":"01-12-2011",
"max":"29-02-2012"
}
},
{
"id":1955652,
"id_page":258355,
"number":13,
"type":16,
"date_created":"2014-10-04 15:32:36",
"date_modified":"2014-10-17 16:36:39",
"text":"How likely are you to recommend our services to your friends?",
"desc":"",
"required":1,
"answers_count":11,
"internalName": ""
"options":{
"left_scale":"Definitely will not recommend",
"right_scale":"Definitely will recommend",
"justification":"Justify your answer"
},
"answers":[
{
"text":"0",
"custom_response_available":true
},
{
"text":"1",
"custom_response_available":true
},
{
"text":"2",
"custom_response_available":true
},
{
"text":"3",
"custom_response_available":true
},
{
"text":"4",
"custom_response_available":true
},
{
"text":"5",
"custom_response_available":true
},
{
"text":"6",
"custom_response_available":true
},
{
"text":"7",
"custom_response_available":true
},
{
"text":"8",
"custom_response_available":true
},
{
"text":"9",
"custom_response_available":true
},
{
"text":"10",
"custom_response_available":true
}
]
},
{
"id":1955653,
"id_page":258355,
"number":14,
"type":19,
"date_created":"2011-07-14 22:25:10",
"date_modified":"2011-12-29 18:04:04",
"text":"drag and drop",
"desc":"",
"required":1,
"answers_count":2,
"internalName": ""
"options":{
"shuffle_answers":false
},
"answers":[
{
"text":"sea bath"
},
{
"text":"skiing in the mountains"
}
],
"scales":[
{
"text":"summer"
},
{
"text":"winter"
}
]
},
]Returned errors
400 Bad request– Incompatible parameters, the survey with ID:id_surveydoes not have a page with ID:id_page.401 Unauthorized– The user references a foreign resource – a survey that they do not own.404 Not Found– The survey with the given:id_surveywas not found.406 Not Acceptable– The:id_surveyparameter was not passed.