主题
获取答卷内容
注意
表单相关接口目前处于 alpha 阶段,接口可能会随时调整,请慎重使用。
获取答卷内容
基本信息
请求方法:GET
请求路径:/api/v1/openapi/personal/forms/:form_id/answers/:answer_id
请求主机:developer.kdocs.cn
限流频次
应用类型 | 限额 |
---|---|
测试应用 | 10,000 次/天 |
正式应用 | 1,000,000 次/天 |
权限范围
权限值 | 显示名称 | 权限说明 |
---|---|---|
access_form_answers | 获取表单答卷 | 获取表单参与情况,包括答卷内容 |
Path 参数
参数 | 必须 | 类型 | 说明 |
---|---|---|---|
form_id | 是 | string | 表单 id |
answer_id | 是 | string | 答卷 id |
Query 参数
参数 | 必须 | 类型 | 说明 |
---|---|---|---|
access_token | 是 | string |
返回参数
参数 | 必须 | 类型 | 说明 |
---|---|---|---|
code | 是 | integer | 错误码 |
data | 是 | data {} | 响应数据 |
示例
请求示例
curl --request GET \
--url 'https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc' \
--header 'Content-Type: application/json'
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc")
.get()
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import http.client
conn = http.client.HTTPSConnection("developer.kdocs.cn")
headers = { 'Content-Type': "application/json" }
conn.request("GET", "/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
const http = require("https");
const options = {
"method": "GET",
"hostname": "developer.kdocs.cn",
"port": null,
"path": "/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc",
"headers": {
"Content-Type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://developer.kdocs.cn/api/v1/openapi/personal/forms/JxdxSDJpnZKRRr0dEKZRuJ_FoonpnyvgzPfYd2nVJQLGW_Di8Xw5GnY7rcAOCe/answers/ZpWWEbCZYH0Dlgx4bYsSRayQ?access_token=kvqxrspxjctdojjqdildjhonzwusaquc");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
返回示例
{
"code": 0,
"data": {
"id": {
"open_id": "JxdxSDJpnZKRRr0dEKZRuCEkXJO9vh1IPbIHxOJshNN9oqv7PIgEqXpRJCT9Vh6sD9946CjX09pRUrrgYvuABw",
"union_id": "-9Yu8Qo2oJirjqhvNofycCEkXJO9vh1IPbIHxOJshNN9oqv7PIgEqXpRJCT9Vh6sD9946CjX09pRUrrgYvuABw"
},
"answer_edit_version": 0,
"phone_number": "",
"user": {
"id": {
"open_id": "JxdxSDJpnZKRRr0dEKZRuJAtVuXPHAsIyaIuWE5aaIw",
"union_id": "-9Yu8Qo2oJirjqhvNofycJAtVuXPHAsIyaIuWE5aaIw"
},
"nickname": "bug/ty",
"pic": "https://imagebucket.test.wpscdn.cn/241716408_b54c4a4c64246d6823f973dd21c79771?imageMogr2/thumbnail/180x180!"
},
"created_ts": 1667276574,
"updated_ts": 1667276574,
"delete_ts": 0,
"anonymous": false,
"invitation": {
"inviterIdent": "",
"inviteId": ""
},
"edit_version": 0,
"is_verified": false,
"verified_ts": 0,
"answer_json": {
"channel_share": "",
"consumeTime": 1077,
"ext": {
"preset_key_id": "",
"preset_key_value": "",
"is_verified": false
},
"answers": {
"2agiq4": {
"type": "doubleSelect",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"selectValue": [
{
"itemId": "k17j6v",
"jumpTo": null,
"value": "11"
},
{
"itemId": "i4ijyw",
"jumpTo": null,
"value": "22"
}
]
},
"39eta1": {
"type": "pullSelect",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"selectValue": [
{
"itemId": "4vdnur",
"jumpTo": null,
"value": "22"
}
]
},
"3t56gf": {
"type": "multiInput",
"noRepeatId": "",
"inputValue": "单行",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"3zd1yr": {
"type": "multiSelect",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"selectValue": [
{
"itemId": "5p1zfb",
"jumpTo": null,
"value": "2"
}
]
},
"4pznxt": {
"type": "multiFile",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"fileValue": [
{
"ext": "txt",
"fileId": 0,
"name": "1.txt",
"size": 1928377,
"srcSid": "",
"tarFileId": 100055693594,
"tarSid": "crbpqzqs420E"
}
]
},
"4w7168": {
"type": "multiStepInput",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"multiStepInputValue": [
"1",
"2"
],
"clockInValue": {
"information": "",
"itemId": ""
}
},
"60k60q": {
"type": "order",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"orderValue": [
{
"count": 1,
"itemId": "8go674",
"price": 1233
},
{
"count": 1,
"itemId": "8qjouk",
"price": 3466
},
{
"count": 1,
"itemId": "7pvwga",
"price": 4577
}
]
},
"7b58t2": {
"type": "multiInput",
"noRepeatId": "",
"inputValue": "a\nb\nc",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"7nfwow": {
"type": "newMultiImage",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"imageValue": [
{
"ext": "jpeg",
"fileId": 0,
"height": 300,
"name": "4.jpeg",
"size": 14548,
"srcSid": "",
"tarFileId": 100055693596,
"tarSid": "cqAlLlGkxKeR",
"width": 168
}
]
},
"7pklv6": {
"type": "signatures",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"signatureValue": {
"height": 560,
"imageUrl": "/s/885ad4d0-0802-4f36-8f92-73f236ecb38a",
"name": "bug/ty签名",
"width": 1580
}
},
"7y6sgh": {
"type": "multiFile",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"fileValue": [
{
"ext": "jpeg",
"fileId": 0,
"name": "2.jpeg",
"size": 10576,
"srcSid": "",
"tarFileId": 100055693592,
"tarSid": "cazriXAM5H5j"
}
]
},
"83ocax": {
"type": "telphone",
"noRepeatId": "",
"inputValue": "13800000000",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"8ux4r3": {
"type": "address",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"addressValue": {
"address": "123",
"city": "市辖区",
"district": "西城区",
"manually": false,
"province": "北京市"
}
},
"aeiztr": {
"type": "time",
"noRepeatId": "",
"inputValue": "12:07",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"bdm2z1": {
"type": "reentryId",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"drvzud": {
"type": "newMultiImage",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"imageValue": [
{
"ext": "png",
"fileId": 0,
"height": 333,
"name": "Screenshot from 2022-09-30 18-45-48.png",
"size": 42155,
"srcSid": "",
"tarFileId": 100055693595,
"tarSid": "cbuqgRVO7DSG",
"width": 853
},
{
"ext": "png",
"fileId": 0,
"height": 424,
"name": "Screenshot from 2022-10-11 16-53-04.png",
"size": 58645,
"srcSid": "",
"tarFileId": 100055693593,
"tarSid": "cuEXRNgU2sI6",
"width": 775
}
]
},
"eqjtut": {
"type": "email",
"noRepeatId": "",
"inputValue": "12@ffdc.om",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"f63v3p": {
"type": "multiInput",
"noRepeatId": "",
"inputValue": "1\n2\n3\n4",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"hq4y7v": {
"type": "reentryId",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"mo4uwq": {
"type": "scanCode",
"noRepeatId": "",
"inputValue": "12123",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"moxn56": {
"type": "floatInput",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 1,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"pto9ia": {
"type": "pullSelect",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"selectValue": [
{
"itemId": "jrdcrw",
"jumpTo": null,
"value": "32"
}
]
},
"qa7dgw": {
"type": "select",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"selectValue": [
{
"itemId": "xso22d",
"jumpTo": null,
"value": "11"
}
]
},
"qruyrc": {
"type": "star",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 4,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"scmnfw": {
"type": "multiInput",
"noRepeatId": "",
"inputValue": "2222",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"v45ovc": {
"type": "matrixScale",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"scaleValue": {
"fapyqz": [
"z7978q"
],
"i7vcug": [
"svak5x"
]
}
},
"x0obq9": {
"type": "scale",
"noRepeatId": "",
"inputValue": "",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
},
"scaleValue": {
"2xach1": [
"beq5g2"
]
}
},
"x40qi9": {
"type": "telphone",
"noRepeatId": "",
"inputValue": "13000000000",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
},
"x6mceb": {
"type": "idcard",
"noRepeatId": "",
"inputValue": "xxxxxxxxxxxxxxxx",
"modifyValue": "",
"intValue": 0,
"floatInputValue": 0,
"clockInValue": {
"information": "",
"itemId": ""
}
}
}
}
}
}
错误码
请参考错误码说明