Questionnaire
Get Questionnaire Result
Description
Retrieve questionnaire result via the task_id of the questionnaire.
Request Config
| Config | Definition |
|---|---|
| URL | /qn/result/<task_id> |
| Method | GET |
Params
| Name | Type | Description | Required |
|---|---|---|---|
| task_id | string | Task id | Yes |
Response
Schema of data
| Name | Type | Description |
|---|---|---|
| task_id | string | Task id |
| task_name | string | Task name |
| code | string | Questionnaire code |
| timeout | boolean | Whether the task timed out |
| name | string | Questionnaire name |
| questions | []object | Question list |
| + code | string | Question code |
| + content | string | Question content |
| + input_type | int32 | Question input type.1:String, 2:Number, 3:Decimal, 4:Single-choice, 5:Multiple-choice, 6:Bar code, 7:QR code, 8:Bar code + QR code |
| + options | []object | All options of the question, data is available only when the input type is 4 or 5 |
| ++ code | string | Option code |
| ++ name | string | Option name |
| + answer_value | string | Answer content,data is available when the input type is 1, 2, 3, 6, 7 or 8,the answer content will returned in the form of a string. |
| + answer_option_values | []object | Multiple-choice question answer, when the input type is 4 or 5, the answer will be returned in the form of an array. |
| ++ code | string | Option code |
| ++ name | string | Option name |
Response Body Sample
json
{
"code": 0,
"message": "",
"data": {
"task_id": "b5fed073-d66a-451f-93c0-ea412d7543e8",
"task_name": "KO Cooler",
"code": "nielsenQN-101",
"timeout": false,
"name": "HS Coke Custom Modern Tank Slide Shelves",
"questions": [{
"code": "nielsenQ-119",
"content": "Product facing",
"input_type": 2,
"options": [],
"answer_value": "3",
"answer_option_values": []
},
{
"code": "nielsenQ-104",
"content": "manufacturer name",
"input_type": 4,
"options": [{
"code": "1015",
"name": "Wei Chuan Company"
}, {
"code": "1013",
"name": "Jing Tian Company"
}, {
"code": "1012",
"name": "Watsons"
}],
"answer_value": "",
"answer_option_values": [{
"code": "1015",
"name": "Wei Chuan Company"
}]
}
]
}
}