Skip to main content
Version: latest

获取回答详情

重要提示

该功能为 尊享版 付费功能,如未升级,请先 升级 后再使用

接口概述

  • 功能:获取问卷的某个回答详情
  • 请求方式:GET
  • 请求地址:/api/surveys/{survey_id}/answers/{answer_id}?appid={appid}&access_token={access_token}

请求参数

参数名类型参数位置描述示例值
survey_idintegeruri问卷ID292192
answer_idstringuri答案ID,支持两种格式(二选一):
1. answer_id:回答序号(如:2)
2. wj_answer_id_hash:从答题后跳转链接获取的哈希值
2 或 Dl68Q58mWk

响应参数

参数名类型描述
survey_idinteger问卷ID
answer_idinteger答卷ID
respondent_idinteger用户标识 (答题人在问卷系统中的ID,答题免登录情况下返回0)
openidstring非微信OpenID,废弃字段
qqinteger用户在腾讯问卷的QQ号(已废弃,请勿使用)
weixin_openidstring用户在腾讯问卷的微信OpenID(已废弃,请勿使用)
started_atstring用户开始回答的时间
ended_atstring用户提交答案的时间
scoreinteger用户回答的分数(默认null)(暂不提供)
third_party_userobject第三方用户信息(特定使用,关联第三方系统对接)
answerarray[object]用户的回答详情(每个问卷的结构不一样,结构也会有所出入,实际数据结构以实际推送的为准)

响应参数-answer

参数名类型描述
idstring问卷页码
questionsarray[object]详细回答详情
questions[_].idstring题目ID
questions[_].typestring题目类型
questions[_].textstring文本输入(单行文本、多行文本、量表题等)
questions[_].optionsarray[object]选择输入(下拉、多选、排序等)
questions[_].options[_].idstring回答ID
questions[_].options[_].checkedinteger是否选中(默认1)
questions[_].options[_].textstring回答内容
questions[_].groupsarray[object]组合输入(矩阵多选、矩阵单选、矩阵量表等)
questions[_].groups[_].idstring回答ID
questions[_].groups[_].textstring矩阵量表题
questions[_].groups[_].optionsarray[object]组合详情
questions[_].groups[_].options[_].idstring回答ID
questions[_].groups[_].options][_].checkedinteger是否选中(默认1)
questions[_].groups[_].options][_].textstring回答内容
questions[_].blanksarray[object]填空题
questions[_].blanks[_].idstring填空题ID
questions[_].blanks[_].valuestring填空题内容
questions[_].id_listarray[string]联动题-题目ID
questions[_].text_listarray[string]联动题-ID对应内容
questions[_].file_name_srcstring废弃
questions[_].file_name_dststring废弃
questions[_].filesarray[object]回答者上传的附件
questions[_].files[_].namestring附件名称
questions[_].files[_].urlstring附件下载地址(有效期7天)

响应示例

  • 请求成功
{
"code": "OK",
"error": {
"type": ""
},
"data": {
"survey_id": 292192,
"answer_id": 5,
"qq": 1411902221,
"openid": "",
"weixin_openid": "",
"started_at": "2021-07-01 10:51:54",
"ended_at": "2021-07-01 10:53:34",
"score": 1,
"third_party_user": {
"respondent_id": 1411902221,
"openid": "abcdefg",
"nickname": "张三"
},
"answer": [
{
"id": "p-1-abcd",
"questions": [
{
"id": "q-1-abcd", // 题目ID
"type": "radio", // 题目类型-单选题
"options": [
{
"id": "o-100-ABCD", // 选项ID
"checked": 1, // 选中
"text": "选项" // 选项内容
}
],
"blanks": []
},
{
"id": "q-2-tJQP", // 题目ID
"type": "checkbox", // 题目类型-多选题
"options": [
{
"id": "o-0-ewtp", // 选项ID
"checked": 1, // 选中
"text": "选项" // 选项内容
},
{
"id": "o-1-es3e",
"checked": 1,
"text": "选项"
}
],
"blanks": []
},
{
"id": "q-3-fRq4", // 题目ID
"type": "select", // 题目类型-下拉题
"options": [
{
"id": "o-0-KSha",
"checked": 1,
"text": "选项"
}
]
},
{
"id": "q-4-kyUN",
"type": "image_radio", // 题目类型-图片单选题
"options": [
{
"id": "o-0-zY8L",
"checked": 1,
"text": "选项"
}
]
},
{
"id": "q-5-JonQ",
"type": "image_checkbox", // 题目类型-图片多选题
"options": [
{
"id": "o-0-jLV0",
"checked": 1,
"text": "选项"
},
{
"id": "o-1-VIsn",
"checked": 1,
"text": "选项"
}
]
},
{
"id": "q-6-wd0W",
"type": "text", // 题目类型-单行文本题
"text": "测试文本" // 文本内容
},
{
"id": "q-7-sGeQ", // 题目ID
"type": "blanks", // 题目类型-填空题
"blanks": [
{
"id": "fillblank-f5a0", // 填空ID
"value": "测试" // 填空内容
},
{
"id": "fillblank-fee6",
"value": "cat"
},
{
"id": "fillblank-519a",
"value": "apple"
}
]
},
{
"id": "q-8-Qu2R", // 题目ID
"type": "textarea", // 题目类型-多行文本题
"text": "测试多行文本" // 文本内容
},
{
"id": "q-9-iFUk", // 题目ID
"type": "star", // 题目类型-量表题
"text": "7" // 量表分值
},
{
"id": "q-10-wrrV", // 题目ID
"type": "nps", // 题目类型-NPS题
"text": "9" // NPS分值
},
{
"id": "q-11-aTdU", // 题目ID
"type": "star", // 题目类型-评价打分题
"text": "4" // 分值
},
{
"id": "q-12-CBZu", // 题目ID
"type": "sort", // 题目类型-排序题
"options": [
{
"id": "o-0-se03", // 选项ID
"sort_no": 1 // 排序顺序
},
{
"id": "o-1-Fcs1",
"sort_no": 2
}
],
"blanks": []
},
{
"id": "q-13-9OV2", // 题目ID
"type": "upload", // 题目类型-图片附件题
"files": [
{
"name": "logo.png",
"url": "https://wj.qq.com/api/files/show?file_id=123&survey_id=292192&question_id=q-11-3rG8&file_name=292192_0_6603fef4e5abd7616bfef24eb516aaef.png"
},
{
"name": "logo2.png",
"url": "https://wj.qq.com/api/files/show?file_id=124&survey_id=292192&question_id=q-11-3rG8&file_name=292192_0_6603fef4e5abd7616bfef24eb516aaeh.png"
}
],
},
{
"id": "q-14-HF17", // 题目ID
"type": "chained_selects", // 题目类型-多级联动题
"id_list": [
"l-abc1",
"l-ab11"
],
"text_list": [
"选项1",
"子选项1"
]
},
{
"id": "q-15-pZ0A", // 题目ID
"type": "datetime", // 题目类型-时间日期题
"text": "2025-10-17T00:00:00.000+08:00"
},
{
"id": "q-16-9H9z", // 题目ID
"type": "signature", // 题目类型-签名题
"text": "",
"signature_id": "Ark9b4QVjP" // 签名ID
},
{
"id": "q-17-hI2O", // 题目ID
"type": "address", // 题目类型-地理位置题
"text": "广东省深圳市南山区深南大道10000号", // 地理位置
"address_detail": "",
"address_label": "腾讯大厦", // 地址名称
"lat": 22.540366, // 纬度
"lng": 113.934559 // 经度
},
{
"id": "q-18-0xXv", // 题目ID
"type": "max_diff", // 题目类型-MaxDiff
"max_diff": [
[
{
"id": "o-0-rlE5",
"value": -1
},
{
"id": "o-2-baFG",
"value": 0
},
{
"id": "o-1-4WcV",
"value": 1
}
],
[
{
"id": "o-3-7QND",
"value": 0
},
{
"id": "o-1-4WcV",
"value": 1
},
{
"id": "o-0-rlE5",
"value": -1
}
]
]
},
{
"id": "q-19-9l16", // 题目ID
"type": "matrix_radio", // 题目类型-矩阵单选题
"groups": [
{
"id": "g-1-ABCD",
"options": [
{
"id": "o-1-WAbC",
"checked": 1,
"text": "选项2",
"sort_no": 0
}
]
},
{
"id": "g-2-EFGH",
"options": [
{
"id": "o-0-0WPX",
"checked": 1,
"text": "选项1",
"sort_no": 0
}
]
}
]
},
{
"id": "q-20-h7qr",
"type": "matrix_checkbox", // 题目类型-矩阵多选题
"groups": [
{
"id": "g-1-ABCD",
"options": [
{
"id": "o-0-oFyk",
"checked": 1,
"text": "选项1",
"sort_no": 0
},
{
"id": "o-1-6NNV",
"checked": 1,
"text": "选项2",
"sort_no": 0
}
]
},
{
"id": "g-2-EFGH",
"options": [
{
"id": "o-1-6NNV",
"checked": 1,
"text": "选项2",
"sort_no": 0
}
]
}
]
},
{
"id": "q-21-U6cV",
"type": "matrix_star", // 题目类型-矩阵量表题
"groups": [
{
"id": "g-1-ABCD",
"text": "8",
"answer_tags": []
},
{
"id": "g-2-EFGH",
"text": "3",
"answer_tags": []
}
]
},
{
"id": "q-22-pP4d",
"type": "matrix_star", // 题目类型-矩阵打分题
"groups": [
{
"id": "g-1-ABCD",
"text": "3",
"answer_tags": []
},
{
"id": "g-2-EFGH",
"text": "4",
"answer_tags": []
}
]
},
{
"id": "q-23-mUma",
"type": "matrix_blank", // 题目类型-矩阵填空
"groups": [
{
"id": "g-1-ABCD",
"blanks": [
{
"id": "o-1-abcd",
"text": "填空",
"value": "test1"
},
{
"id": "o-2-efgh",
"text": "带联想填空",
"value": "apple"
},
{
"id": "o-3-SznN",
"text": "下拉",
"value": "cat"
}
]
},
{
"id": "g-2-EFGH",
"blanks": [
{
"id": "o-1-abcd",
"text": "填空",
"value": "test2"
},
{
"id": "o-2-efgh",
"text": "带联想填空",
"value": "cat"
},
{
"id": "o-3-SznN",
"text": "下拉",
"value": "boy"
}
]
}
]
},
{
"id": "q-24-cdWL",
"type": "sheet", // 题目类型-自增表格题
"groups": [
{
"id": "g-0",
"blanks": [
{
"id": "o-1-abcd",
"text": "填空",
"value": "表格填空"
},
{
"id": "o-2-efgh",
"text": "带联想填空",
"value": "联想填空"
},
{
"id": "o-3-SznN",
"text": "下拉",
"value": "boy"
}
]
},
{
"id": "g-1",
"blanks": [
{
"id": "o-1-abcd",
"text": "填空",
"value": "1"
},
{
"id": "o-2-efgh",
"text": "带联想填空",
"value": "2"
},
{
"id": "o-3-SznN",
"text": "下拉",
"value": "apple"
}
]
}
]
},
{
"id": "q-25-KALh",
"type": "phone", // 题目类型-手机号码
"text": "86-135xxxxxxxxx",
"is_verified": true, // 是否已经认证
"title": "请填写手机号"
}
]
},
{
"id": "p-2-bKoP",
"questions": [
{
"id": "q-50-XC8E",
"type": "chained_selects",
"id_list": [
"2-wA",
"3-v9",
"4-1L"
],
"text_list": [
"一级答案",
"二级答案",
"三级答案"
]
},
{
"id": "q-55-3rG8",
"type": "upload",
"file_name_src": "logo.png",
"file_name_dst": "292192_0_6603fef4e5abd7616bfef24eb516aaef.png",
"files": [
{
"name": "logo.png",
"url": "https://wj.qq.com/api/files/show?file_id=123&survey_id=292192&question_id=q-11-3rG8&file_name=292192_0_6603fef4e5abd7616bfef24eb516aaef.png"
},
{
"name": "logo2.png",
"url": "https://wj.qq.com/api/files/show?file_id=124&survey_id=292192&question_id=q-11-3rG8&file_name=292192_0_6603fef4e5abd7616bfef24eb516aaeh.png"
}
],
"expired": "7d"
}
]
}
{
"id": "custom_args", // 自定义参数
"questions": [
{
"id": "custom-arg-01", // 自定义参数ID
"type": "text", // 类型
"text": "123", // 内容
"title": "userid", // 自定义参数 key 值
"description": "用户ID,传递用户身份信息" // 自定义参数描述
}
]
}
]
},
"request_id": "e4b27037-d876-427d-95c7-d5a737dd1677"
}
  • 请求失败
{
"code": "InvalidArgument",
"error": {
"type": "invalid_argument",
},
"data": {},
"request_id": "ddec96d2-165e-4f3e-8a64-2057db116983"
}

错误码

error.type 错误代码错误描述
not_found找不到数据
invalid_argument参数校验不通过