### GET https://open.wj.qq.com/api/oauth2/user Source: https://wj.qq.com/docs/openapi/oauth2/web_authorize 获取授权用户信息。 ```APIDOC ## GET https://open.wj.qq.com/api/oauth2/user ### Description 根据 access_token 和 openid 获取用户的基本信息。 ### Method GET ### Endpoint https://open.wj.qq.com/api/oauth2/user ### Parameters #### Query Parameters - **appid** (string) - Required - 开放平台颁发的应用ID - **access_token** (string) - Required - 授权码 - **openid** (string) - Required - 用户唯一标识 ### Response #### Success Response (200) - **openid** (string) - 用户唯一标识 - **nickname** (string) - 用户昵称 - **avatar** (string) - 用户头像 ``` -------------------------------- ### GET https://open.wj.qq.com/connect/oauth2/authorize Source: https://wj.qq.com/docs/openapi/oauth2/web_authorize 构造网页授权链接,引导用户同意授权并获取 code。 ```APIDOC ## GET https://open.wj.qq.com/connect/oauth2/authorize ### Description 构造网页授权链接,用户点击后跳转至授权页面。 ### Method GET ### Endpoint https://open.wj.qq.com/connect/oauth2/authorize ### Parameters #### Query Parameters - **appid** (string) - Required - 开放平台颁发的应用ID - **redirect_uri** (string) - Required - 授权后重定向的回调链接地址,请使用urlencode处理 - **response_type** (string) - Required - 返回类型,固定为:code - **scope** (string) - Required - 应用授权作用域,填写:snsapi_user - **state** (string) - Optional - 重定向后会带上该参数,长度不可超过128个字节 ``` -------------------------------- ### GET /api/sso/users/{openid} Source: https://wj.qq.com/docs/openapi/sso/get_user 获取第三方用户在问卷中对应的用户ID和回答者身份ID。 ```APIDOC ## GET /api/sso/users/{openid} ### Description 获取第三方用户在问卷中对应的用户ID和回答者身份ID。 ### Method GET ### Endpoint /api/sso/users/{openid}?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **openid** (string) - Required - 第三方创建用户时传入的用户标识,用于辨别来自该第三方应用/平台的用户 #### Query Parameters - **appid** (string) - Required - 第三方应用ID - **access_token** (string) - Required - 访问令牌 ### Response #### Success Response (200) - **user_id** (integer) - 问卷系统用户ID - **respondent_id** (integer) - 问卷系统用户对应的回答者身份ID #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "user_id": 60000208205, "respondent_id": 60000683396 }, "request_id": "d84e884b-3bc5-419d-9cc0-d6d6d14e68b6" } ``` -------------------------------- ### GET https://open.wj.qq.com/api/oauth2/access_token Source: https://wj.qq.com/docs/openapi/oauth2/client_authorize 获取团队授权 access_token,用于后续访问团队资源。该 token 具有高安全等级,必须保存在服务器端。 ```APIDOC ## GET https://open.wj.qq.com/api/oauth2/access_token ### Description 获取团队授权 access_token,用于后续访问团队资源。该 token 具有高安全等级,必须保存在服务器端。 ### Method GET ### Endpoint https://open.wj.qq.com/api/oauth2/access_token ### Parameters #### Query Parameters - **appid** (string) - Required - 颁发给团队的应用ID - **secret** (string) - Required - 颁发给团队的应用秘钥 - **grant_type** (string) - Required - 固定为 client_credential ### Response #### Success Response (200) - **access_token** (string) - 授权码 - **expires_in** (integer) - 有效时间,默认为2小时 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "access_token": "ACCESS_TOKEN", "expires_in": 7200 }, "request_id": "6cda53f4-d0fa-41a9-95a0-77ea32c97f1e" } ``` -------------------------------- ### 获取团队授权 access_token Source: https://wj.qq.com/docs/openapi/oauth2/client_authorize 通过 GET 请求获取用于团队资源访问的 access_token,必须在服务器端执行。 ```http GET https://open.wj.qq.com/api/oauth2/access_token?appid={appid}&secret={secret}&grant_type=client_credential ``` -------------------------------- ### GET https://open.wj.qq.com/api/oauth2/access_token Source: https://wj.qq.com/docs/openapi/oauth2/web_authorize 通过授权码 code 换取网页授权 access_token。 ```APIDOC ## GET https://open.wj.qq.com/api/oauth2/access_token ### Description 使用第一步获取的 code 换取 access_token,该接口必须在服务器端调用。 ### Method GET ### Endpoint https://open.wj.qq.com/api/oauth2/access_token ### Parameters #### Query Parameters - **appid** (string) - Required - 开放平台颁发的应用ID - **secret** (string) - Required - 开放平台颁发的应用秘钥 - **code** (string) - Required - 第一步返回的 code - **grant_type** (string) - Required - 固定为 authorization_code ### Response #### Success Response (200) - **access_token** (string) - 授权码 - **refresh_token** (string) - 用于刷新授权码,有效期30天 - **expires_in** (integer) - 有效时间,默认为3天 - **openid** (string) - 用户唯一标识 ### Response Example { "code": "OK", "data": { "access_token": "ACCESS_TOKEN", "refresh_token": "REFRESH_TOKEN", "expires_in": 259200, "openid": "OPENID" } } ``` -------------------------------- ### GET /api/orgs/{org_id}/resources Source: https://wj.qq.com/docs/openapi/org/get_org_resources 获取团队资源信息接口,用于查询团队的各项资源配额与使用情况。 ```APIDOC ## GET /api/orgs/{org_id}/resources ### Description 获取团队资源信息。此接口限频,每分钟最多调用1次。 ### Method GET ### Endpoint /api/orgs/{org_id}/resources?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **org_id** (integer) - Required - 团队ID ### Response #### Success Response (200) - **admin_tier** (integer) - 管理员总数量 - **admin_used** (integer) - 已使用管理员数量 - **member_tier** (integer) - 成员总数量 - **member_used** (integer) - 已使用成员数量 - **advertisement_balance** (integer) - 广告余额 - **ai_credit_balance** (integer) - AI 余额 - **sms_balance** (integer) - 短信余额 - **storage_capacity_in_mb** (integer) - 存储容量 (单位MB) - **storage_used_in_mb** (integer) - 已使用存储容量 (单位MB) - **project_total** (integer) - 项目总数 - **project_balance** (integer) - 项目余额 (如果是无限,则返回-1) #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "admin_tier": 100, "admin_used": 1, "member_tier": 10000, "member_used": 2, "advertisement_balance": 5081685, "ai_credit_balance": 70686, "sms_balance": 77200, "storage_capacity_in_mb": 1538048, "storage_used_in_mb": 0, "project_total": 0, "project_balance": -1 }, "request_id": "JALm8D1Tn43jj9rq20241121145954" } ``` -------------------------------- ### GET /api/v2/redirect Source: https://wj.qq.com/docs/openapi/redirect 引导用户点击或直接进行 HTTP 302 跳转至腾讯问卷相关页面。该接口不需要传入 access_token。 ```APIDOC ## GET /api/v2/redirect ### Description 引导用户点击或直接进行 HTTP 302 跳转至腾讯问卷相关页面。该接口用于实现带第三方登录态的跳转,后续跳转可省略 code 参数。 ### Method GET ### Endpoint https://wj.qq.com/api/v2/redirect ### Parameters #### Query Parameters - **appid** (string) - Optional - 应用ID - **code** (string) - Optional - 一次性登录码 - **action** (string) - Required - 跳转操作类型,如 my_surveys, org_surveys, survey_create, survey_edit, survey_collect 等 - **org_id** (string) - Optional - 团队ID,部分 action 需要 - **project_id** (string) - Optional - 项目ID,部分 action 需要 - **survey_id** (string) - Optional - 问卷ID,部分 action 需要 - **survey_hash** (string) - Optional - 问卷哈希,部分 action 需要 - **answer_id** (string) - Optional - 答卷ID,部分 action 需要 ``` -------------------------------- ### Matrix Question Answer Structures Source: https://wj.qq.com/docs/webhook Examples of JSON structures for different matrix question types including radio, checkbox, star, and blank inputs. ```json }, { "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": "apple" } ``` -------------------------------- ### GET /api/surveys Source: https://wj.qq.com/docs/openapi/survey/list_org_survey 获取团队共享项目下的问卷列表。 ```APIDOC ## GET /api/surveys ### Description 获取团队共享项目下的问卷列表。此功能为尊享版付费功能。 ### Method GET ### Endpoint /api/surveys ### Parameters #### Query Parameters - **org_id** (integer) - Required - 团队ID,团队授权可以使用该参数。 - **project_id** (integer) - Optional - 项目ID。 - **page** (integer) - Optional - 当前页码。 - **per_page** (integer) - Optional - 每页显示条数。 ### Response #### Success Response (200) - **total** (integer) - 总条数 - **list** (array[object]) - 问卷列表 - **list[_].id** (integer) - 问卷ID - **list[_].hash** (string) - hash - **list[_].title** (string) - 问卷标题 - **list[_].state** (integer) - 状态,0:草稿, 2:回收中, 3:暂停回收 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "total": 3, "list": [ { "id": 292189, "hash": "65c6", "title": "问卷标题", "state": 2 } ] }, "request_id": "e4b27037-d876-427d-95c7-d5a737dd1677" } ``` -------------------------------- ### wx.navigateToMiniProgram Source: https://wj.qq.com/docs/mini-program 调用微信小程序接口以普通模式跳转至腾讯问卷。 ```APIDOC ## wx.navigateToMiniProgram ### Description 若无需半屏小程序效果,可使用此接口进行普通跳转,参数配置与半屏模式一致。 ``` -------------------------------- ### wx.openEmbeddedMiniProgram Source: https://wj.qq.com/docs/mini-program 调用微信小程序接口以半屏方式打开腾讯问卷。 ```APIDOC ## wx.openEmbeddedMiniProgram ### Description 调用此接口以半屏模式打开腾讯问卷小程序,支持在用户提交问卷后自动返回原小程序。 ### Parameters - **appId** (string) - Required - 腾讯问卷AppID: wxebadf544ddae62cb - **path** (string) - Required - 路径格式: pages/webview/index?sid={sid}&hash={hash}&navigateBackMiniProgram=true ### Request Example wx.openEmbeddedMiniProgram({ appId: 'wxebadf544ddae62cb', path: 'pages/webview/index?sid=123456789&hash=abcd&navigateBackMiniProgram=true', }); ``` -------------------------------- ### GET /api/surveys Source: https://wj.qq.com/docs/openapi/survey/list_survey 获取个人或者团队下的问卷列表。 ```APIDOC ## GET /api/surveys ### Description 获取个人或者团队下的问卷列表。 ### Method GET ### Endpoint /api/surveys ### Parameters #### Query Parameters - **appid** (string) - Required - 应用ID - **access_token** (string) - Required - 访问令牌 - **user_id** (integer) - Optional - 用户ID或者团队ID - **openid** (string) - Optional - 用户唯一标识 - **project_id** (int) - Optional - 项目 ID - **status** (int) - Optional - 问卷状态,0:草稿, 2:回收中, 3:暂停回收 - **page** (integer) - Optional - 当前页码 - **per_page** (integer) - Optional - 每页显示条数 ### Response #### Success Response (200) - **total** (integer) - 总条数 - **list** (array[object]) - 问卷列表 - **list[_].id** (integer) - 问卷ID - **list[_].hash** (string) - hash - **list[_].title** (string) - 问卷标题 - **list[_].state** (integer) - 问卷状态 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "total": 3, "list": [ { "id": 292189, "hash": "65c6", "title": "问卷标题", "state": 2 } ] }, "request_id": "e4b27037-d876-427d-95c7-d5a737dd1677" } ``` -------------------------------- ### 配置半屏小程序跳转 Source: https://wj.qq.com/docs/mini-program 使用wx.openEmbeddedMiniProgram在半屏模式下打开腾讯问卷,需确保已在微信后台添加AppID权限。 ```javascript wx.openEmbeddedMiniProgram({ appId: 'wxebadf544ddae62cb', path: 'pages/webview/index?sid=123456789&hash=abcd&navigateBackMiniProgram=true', }); ``` -------------------------------- ### 矩阵填空题自动填充 Source: https://wj.qq.com/docs/dsl/set 针对矩阵填空题单元格进行自动计算或跨题目赋值。 ```DSL # 自动计算商品A的总价 = 数量 × 单价 set Q1S1A3 = Q1S1A1 * Q1S1A2 # 自动计算商品B的总价 = 数量 × 单价 set Q1S2A3 = Q1S2A1 * Q1S2A2 ``` ```DSL # 当数量大于10时,给予折扣(总价 = 数量 × 单价 × 0.9) if Q1S1A1 > 10 then set Q1S1A3 = Q1S1A1 * Q1S1A2 * 0.9 if Q1S1A1 <= 10 then set Q1S1A3 = Q1S1A1 * Q1S1A2 ``` ```DSL # 将Q1的值设置到矩阵填空题的指定单元格 set Q2S1A1 = Q1 # 使用Q1进行计算并设置 set Q2S1A2 = Q1 * 2 set Q2S1A3 = Q1 + 100 ``` -------------------------------- ### GET /api/orgs/{id} Source: https://wj.qq.com/docs/openapi/org/get_org 获取指定团队的详细信息。 ```APIDOC ## GET /api/orgs/{id} ### Description 按团队ID获取详细信息。该功能仅支持旗舰版及服务商合作使用。 ### Method GET ### Endpoint /api/orgs/{id}?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **id** (integer) - Required - 团队ID,可在团队管理页面获取。 ### Response #### Success Response (200) - **code** (string) - 状态码 - **data** (object) - 团队详细数据 - **data.id** (integer) - 团队ID - **data.name** (string) - 团队名称 - **data.team_id** (integer) - 团队绑定的通讯录ID - **request_id** (string) - 请求唯一标识 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "id": 60000208195, "name": "张三的团队", "phone": "", "current_user_role": 0, "creator_id": 60000000285, "creator_name": "张三", "creator_avatar_url": "https://wj.gtimg.com/default/default_headimg.png", "team_id": 34 }, "request_id": "b8dbf3b4-5e1d-4f2e-8c61-e5ee94d05a70" } ``` -------------------------------- ### 算术运算符使用 Source: https://wj.qq.com/docs/dsl/changelog 在条件判断中支持使用加减乘除运算符进行逻辑计算。 ```DSL if (Q1 + Q2) / Q3 * Q4 > 10 then show Q5 ``` -------------------------------- ### 文本题自动填充 Source: https://wj.qq.com/docs/dsl/set 通过set直接赋值或条件判断,自动填充文本题内容。 ```DSL # 根据年龄计算出生年份(假设当前年份为2026) set Q3 = 2026 - Q1 # 也可以使用条件设置 if Q1 > 0 then set Q3 = 2026 - Q1 ``` ```DSL # 将Q1的答案复制到Q2 set Q2 = Q1 ``` -------------------------------- ### GET /api/surveys/{survey_id}/legacy Source: https://wj.qq.com/docs/openapi/survey/get_survey 获取指定问卷的详细信息,包括问卷标题、欢迎语、结束语、题目列表及问卷状态等。 ```APIDOC ## GET /api/surveys/{survey_id}/legacy ### Description 获取问卷的详细配置信息,包括问卷结构、题目列表、问卷状态及所属项目信息。 ### Method GET ### Endpoint /api/surveys/{survey_id}/legacy?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **survey_id** (integer) - Required - 问卷ID #### Query Parameters - **appid** (string) - Required - 应用ID - **access_token** (string) - Required - 访问令牌 ### Response #### Success Response (200) - **id** (integer) - 编号 - **hash** (string) - 哈希 - **scene** (string) - 场景 - **title** (string) - 标题 - **prefix** (string) - 欢迎语 - **suffix** (string) - 结束语 - **pages** (array) - 问卷内容页列表 - **page_count** (integer) - 页数 - **topic_count** (integer) - 问题数 - **started_at** (string) - 回收开始时间 - **end_at** (string) - 回收结束时间 - **createTime** (integer) - 创建时间 - **updateTime** (integer) - 更新时间 - **state** (integer) - 状态 (0:草稿, 2:回收中, 3:暂停回收) - **template_id** (integer) - 使用的模板ID - **creator_user_id** (integer) - 问卷创建者的用户ID - **project** (object) - 问卷所属项目 ``` -------------------------------- ### GET /api/surveys/{survey_id}/exam/questions Source: https://wj.qq.com/docs/openapi/survey/get_exam_score_settings 获取指定考试问卷的题目分数设置详情。 ```APIDOC ## GET /api/surveys/{survey_id}/exam/questions ### Description 获取考试题目分数设置(仅支持考试问卷)。 ### Method GET ### Endpoint /api/surveys/{survey_id}/exam/questions?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **survey_id** (integer) - Required - 问卷ID ### Response #### Success Response (200) - **question_id** (string) - 题目ID - **question_type** (string) - 题目类型 (blanks:填空题, radio:单选题, checkbox:多选题, textarea:文本题) - **question_sub_type** (int) - 考试题详细类型 (1:单选题, 2:多选题, 3:不定项选择题, 4:判断题, 5:多项填空题, 6:问答题) - **score_able** (bool) - 是否开启考试分数设置 - **score_rule** (int) - 1:全部答对得分, 2:部分答对得分, 3:人工评分 - **total_scores** (int) - 题目总分数 - **scores** (object) - 选项分数设置 - **values** (object) - 填空类型标准答案 #### Response Example { "code": "OK", "data": [{ "question_id": "q-4-ZnIq", "question_type": "radio", "question_sub_type": 1, "score_able": true, "score_rule": 1, "total_scores": 1, "scores": { "o-100-ABCD": 0 }, "values": {} }] } ``` -------------------------------- ### Multi-parameter show/hide logic Source: https://wj.qq.com/docs/dsl/changelog Demonstrates the transition from individual conditional statements to a consolidated syntax for controlling multiple questions. ```text if Q1 and Q2A1 then show Q3 if Q1 and Q2A1 then show Q4 if Q1 and Q2A1 then show Q5 if Q1 and Q2A1 then show Q6 ``` ```text if Q1 and Q2A1 then show Q3, Q4, Q5, Q6 ``` -------------------------------- ### GET /api/surveys/{survey_id}/registrations Source: https://wj.qq.com/docs/openapi/survey/list_registration 获取报名与签到审核数据列表。 ```APIDOC ## GET /api/surveys/{survey_id}/registrations ### Description 获取报名与签到审核数据列表。 ### Method GET ### Endpoint /api/surveys/{survey_id}/registrations ### Parameters #### Path Parameters - **survey_id** (integer) - Required - 问卷ID #### Query Parameters - **appid** (string) - Required - 应用ID - **access_token** (string) - Required - 访问令牌 - **page** (integer) - Optional - 当前页码 - **per_page** (integer) - Optional - 每页显示条数 ### Response #### Success Response (200) - **total** (integer) - 总条数 - **list** (array[object]) - 审核列表 - **list[_].survey_id** (integer) - 问卷ID - **list[_].answer_id** (integer) - 回答ID - **list[_].openid** (string) - 用户OpenId - **list[_].status** (integer) - 状态 - **list[_].status_str** (string) - 状态描述 0:未报名 1:已报名 2:审核通过 3:审核未通过 4:已签到 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "total": 1, "list": [ { "survey_id": 292200, "answer_id": 0, "openid": "ors3e0yXwgmAqcYIAlEvnhBGK0x8", "status": 2, "status_str": "审核通过" } ] }, "request_id": "3037ea61-8e4b-4926-ace4-28ffbc1c12f0" } ``` -------------------------------- ### Semantic and ID-less syntax comparison Source: https://wj.qq.com/docs/dsl/changelog Compares the legacy symbolic syntax with the recommended semantic, ID-less syntax for defining questionnaire logic. ```text ${q-1-abcd} && ${q-2-abcd} => show(q-3-abcd) ``` ```text if Q1 and Q2 then show Q3 ``` -------------------------------- ### 文本描述题引用上题答案 Source: https://wj.qq.com/docs/dsl/question_text_refer 文本描述题使用 Q01、Q02 等序号进行引用,因为它们不参与正常题目序号计算。 ```text replace "XXX" in Q01 title with Q1 ``` -------------------------------- ### GET /api/surveys/{survey_id}/report_overview Source: https://wj.qq.com/docs/openapi/survey/get_report_overview 获取问卷的统计概况,包括浏览量、回收量和回收率。 ```APIDOC ## GET /api/surveys/{survey_id}/report_overview ### Description 获取问卷的统计概况,包括浏览量、回收量和回收率。该功能为尊享版付费功能。 ### Method GET ### Endpoint /api/surveys/{survey_id}/report_overview?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **survey_id** (integer) - Required - 问卷ID ### Response #### Success Response (200) - **viewed_count** (integer) - 浏览量 - **collected_count** (integer) - 回收量 - **collected_rate** (float) - 回收率 #### Response Example { "error": { "type": "" }, "data": { "viewed_count": 6, "collected_count": 6, "collected_rate": 1 }, "code": "OK", "request_id": "lVX5tIxeZlZ6Wov020241029164207" } ``` -------------------------------- ### 矩阵填空题行列逻辑 Source: https://wj.qq.com/docs/dsl/option_display 控制矩阵填空题的行列显示,并支持基于填空内容进行条件判断。 ```DSL # 矩阵填空题列显示逻辑 if Q1A1 then show Q2A1 # 矩阵填空题行显示逻辑 if Q1A2 then show Q2S1 # 矩阵填空题填空已填逻辑 if Q2S1A1 then show Q3 ``` -------------------------------- ### GET /api/surveys/{survey_id}/custom_args Source: https://wj.qq.com/docs/openapi/survey/custom_arg 获取指定问卷的自定义参数列表。 ```APIDOC ## GET /api/surveys/{survey_id}/custom_args ### Description 获取指定问卷的自定义参数列表。 ### Method GET ### Endpoint /api/surveys/{survey_id}/custom_args?appid={appid}&access_token={access_token} ### Parameters #### Path Parameters - **survey_id** (integer) - Required - 问卷ID ### Response #### Success Response (200) - **total** (integer) - 总条数 - **list** (array[object]) - 自定义参数列表 - **list[_].id** (string) - 题目ID - **list[_].type** (string) - 类型 - **list[_].title** (string) - 名称 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "list": [ { "id": "custom-arg-01", "type": "text", "title": "userid" } ], "total": 1 }, "request_id": "95wDdTkltedIpenc20240521153738" } ``` -------------------------------- ### GET /api/surveys/{survey_id}/respondent/access_list Source: https://wj.qq.com/docs/openapi/sso/get_access_list 获取允许回答问卷的人员名单(获取白名单中的第三方用户的ID)。 ```APIDOC ## GET /api/surveys/{survey_id}/respondent/access_list ### Description 获取允许回答问卷的人员名单(获取白名单中的第三方用户的ID)。 ### Method GET ### Endpoint /api/surveys/{survey_id}/respondent/access_list ### Parameters #### Path Parameters - **survey_id** (integer) - Required - 问卷ID #### Query Parameters - **last_id** (integer) - Optional - 填上一次返回的最后一个id作为游标,默认可填0,每次最多返回100条数据 ### Request Example GET https://open.wj.qq.com/api/surveys/9560808/respondent/access_list?last_id=0 ### Response #### Success Response (200) - **code** (string) - 状态码 - **data** (object) - 返回数据 - **list** (array) - 白名单列表 - **id** (integer) - 记录ID - **respondent_id** (integer) - 第三方用户ID - **request_id** (string) - 请求ID #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "list": [ { "id": 11176, "respondent_id": 60000207891 }, { "id": 11091, "respondent_id": 60000207892 } ] }, "request_id": "730380dc-4c73-48af-92bb-b6ecc5df9137" } ``` -------------------------------- ### 简单条件显示选项 Source: https://wj.qq.com/docs/dsl/option_display 使用 if-then 逻辑根据前置题目的选项选择情况控制目标选项的显示。 ```DSL if Q1A1 then show Q4A1 # Q1选A,显示Q4选项A if Q2A1 then show Q4A2 # Q2选A时,显示Q4选项B if Q3A1 then show Q4A3 # Q3选A时,显示Q4选项C ``` -------------------------------- ### GET /api/contacts/teams/{team_id}/users Source: https://wj.qq.com/docs/openapi/org/user/list_team_user 获取指定团队的成员列表,支持分页和角色过滤。 ```APIDOC ## GET /api/contacts/teams/{team_id}/users ### Description 获取指定团队下的成员列表。此功能为尊享版付费功能。 ### Method GET ### Endpoint /api/contacts/teams/{team_id}/users ### Parameters #### Path Parameters - **team_id** (integer) - Required - 团队ID #### Query Parameters - **appid** (string) - Required - 应用ID - **access_token** (string) - Required - 访问令牌 - **page** (integer) - Optional - 当前页码 - **per_page** (integer) - Optional - 每页显示条数 - **roles** (array) - Optional - 角色筛选 ### Response #### Success Response (200) - **total** (integer) - 用户总数 - **list** (array[object]) - 用户列表 - **list[_].avatar** (string) - 用户头像 - **list[_].group_full_name** (string) - 所属分组路径 - **list[_].is_org_available** (integer) - 是否可用 - **list[_].is_org_creator** (integer) - 是否为组织创建者 - **list[_].name** (string) - 用户姓名 - **list[_].respon_id** (integer) - 响应ID - **list[_].role** (integer) - 用户权限角色 - **list[_].user_id** (integer) - 用户ID - **list[_].group_id** (integer) - 所属分组ID ### Response Example { "code": "OK", "error": { "type": "" }, "data": { "total": 1, "list": [ { "avatar": "https://wj.gtimg.com/default/default_headimg.png", "group_full_name": "测试组/测试子组", "is_org_available": true, "is_org_creator": false, "name": "jeterli3", "respon_id": 0, "role": 3, "user_id": 60000000285, "group_id": 6031 } ] }, "request_id": "d7c407f1-95c3-4fce-b7fc-90ba22602b99" } ``` -------------------------------- ### 小程序跳转参数配置 Source: https://wj.qq.com/docs/custom_args 在小程序跳转路径的path字段中添加自定义参数。 ```text path="pages/webview/index?sid=xxxx&hash=xxxx&userid=my_user_1" ``` -------------------------------- ### 基础自动圈选逻辑 Source: https://wj.qq.com/docs/dsl/set 根据前一题的选择结果,自动圈选下一题的对应选项。 ```DSL if Q1A1 then set Q2A1 # 收入<1000,自动圈选低收入 if Q1A2 or Q1A3 then set Q2A2 # 收入1000-10000,自动圈选中等收入 if Q1A4 then set Q2A3 # 收入>10000,自动圈选高收入 ``` -------------------------------- ### Configure Matrix Question Display Logic Source: https://wj.qq.com/docs/dsl/changelog Use specific identifiers like Q1A1 (column) or Q1S1 (row) to control the visibility of matrix question elements. ```DSL # 矩阵填空题列显示逻辑 if Q1A1 then show Q2A1 # 矩阵填空题行显示逻辑 if Q1A2 then show Q2S1 # 矩阵填空题填空已填逻辑 if Q2S1A1 then show Q3 ``` -------------------------------- ### GET /api/contacts/teams/{team_id}/groups Source: https://wj.qq.com/docs/openapi/org/group/list_group 获取指定团队下的分组列表。 ```APIDOC ## GET /api/contacts/teams/{team_id}/groups ### Description 获取指定团队下的分组列表信息,支持分页和筛选。 ### Method GET ### Endpoint /api/contacts/teams/{team_id}/groups ### Parameters #### Path Parameters - **team_id** (integer) - Required - 团队ID #### Query Parameters - **appid** (string) - Required - 应用ID - **access_token** (string) - Required - 访问令牌 - **page** (integer) - Optional - 当前页码 - **per_page** (integer) - Optional - 每页显示条数 - **remote_ids** (array) - Optional - 远程ID列表 - **parent_id** (integer) - Optional - 上级ID ### Response #### Success Response (200) - **list** (array[object]) - 分组列表 - **total** (integer) - 总条数 #### Response Example { "code": "OK", "error": { "type": "" }, "data": { "list": [ { "id": 6033, "team_id": 53, "parent_id": 6031, "source": 2, "remote_id": "1202", "name": "测试批量2", "full_name": "", "order": 1002, "is_valid": true, "created_at": "2021-06-24T18:24:45+08:00", "upd_at": "2021-06-24T18:24:45+08:00" } ], "total": 2 }, "request_id": "cb4e532d-1be0-42fd-983e-f8c69eba943f" } ``` -------------------------------- ### Automatic Selection Logic with set Source: https://wj.qq.com/docs/dsl/changelog Use set behavior to automatically select options for subsequent questions based on previous answers. ```DSL if Q1A1 then set Q2A1 # Q1选择A1选项时,自动圈选Q2的A1选项 if Q1A2 or Q1A3 then set Q2A2 # Q1选择A2或A3选项时,自动圈选Q2的A2选项 ``` ```DSL # 使用set保存复杂条件的结果 if Q1A1 and Q2A1 then set Q3A1 if Q1A2 and Q2A2 then set Q3A2 hide Q3 # 隐藏中间变量题目 # 在后续逻辑中使用中间变量 replace "【品牌名】" in Q4 title with Q3 if Q3A1 then show Q4S1 ```