Skip to content

问卷

获取问卷结果

接口说明

通过task_id获取问卷结果

请求信息

配置说明参数值
URL/qn/result/<task_id>
MethodGET

Path参数

参数名类型描述是否必填
task_idstring任务idYes

响应数据


data数据格式

参数名类型描述
task_idstring任务id
task_namestring任务name
codestring问卷code
timeoutboolean任务是否超时
namestring问卷名称
questions[]object问题列表
+ codestring问题code
+ contentstring问题内容
+ input_typeint32问题输入类型。1:字符串, 2:数字, 3:小数, 4:单选题, 5:多选题, 6:条形码, 7:二维码, 8:二维码+条形码
+ options[]object问题所有选项,只有输入类型是选择题时才有数据
++ codestring选项code
++ namestring选项name
+ answer_valuestring答题内容,输入类型是123678时,答题内容以字符串形式通过该字段返回
+ answer_option_values[]object选择题答题内容,输入类型是45时,答题内容以数组形式通过该字段返回
++ codestring选项code
++ namestring选项name

响应数据样例

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"
        }]
      }
    ]
  }
}