获取报名表列表
查询报名表列表,支持按名称模糊搜索、按营种 pid 查询关联报名表,默认只返回已上架的报名表。
POST/api/getFormList
请求参数
| 名称 | 类型 | 描述 | 是否必填 | 默认值 | 备注 |
|---|---|---|---|---|---|
| token | String | 身份校验令牌 | 必填 | - | 由 获取访问令牌 获得 |
| name | String | 报名表名称 | 非必填 | - | 模糊查询 |
| pid | Number | 营种 ID | 非必填 | - | 传入则返回该营种关联的报名表 |
| status | Number | 上下架状态 | 非必填 | 1 | 1 上架,2 下架 |
CURL
V1
curl --location --request POST 'https://open.xinduobang.cn/api/getFormList' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=YOUR_TOKEN' \
--data-urlencode 'name=' \
--data-urlencode 'status=1'
V2(appid 为 V2 版本)
curl --location --request POST 'https://open.xinduobang.cn/api/getFormList' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'X-Timestamp: 1770000000' \
--header 'X-Nonce: 3f9c1a7b2e6d4058' \
--header 'X-Signature: <computed_hmac_sha256>' \
--data-urlencode 'token=YOUR_TOKEN' \
--data-urlencode 'name=' \
--data-urlencode 'status=1'
信息
V2 签名算法及 X-Signature 计算方式见 V2 接入示例。下方接口 V2 示例均遵循相同规则,不再重复注释。
成功响应
{
"code": 0,
"msg": "success",
"data": [
{
"form_id": "12",
"name": "夏令营报名表",
"status": "1"
},
{
"form_id": "15",
"name": "冬令营报名表",
"status": "1"
}
]
}
| 字段 | 类型 | 说明 |
|---|---|---|
| form_id | String | 报名表 ID |
| name | String | 报名表名称 |
| status | String | 1 上架,2 下架 |
失败响应
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 200 | 非 0 | 业务错误 | 请检查 token 与筛选参数 |