# 查询红包模板列表
请求方式:POST
请求地址:https://$basehost/gateway/eaopen/GetRedPacketTemplateList
body参数:
{
"receiver_type": "2:私聊红包, 3:群发红包",
"offset": 0,
"limit": 10
}
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| receiver_type | int | 是 | 2:私聊红包, 3:群发红包 |
| offset | int | 是 | 每次获取的的开始位置,最小值为0 |
| limit | int | 是 | 每次获取的条数,取值范围(1~100) |
返回值:
{
"data": {
"has_more": true,
"list": [
{
"id": "2222",
"title": "标题",
"amount": "红包金额,单位:分 int",
"receiver_type": "2:私聊红包, 3:群发红包",
"creator_name": "创建者名称",
"detail": {
"logo_url" : "logo",
"cover_url" : "封面",
"red_packet_subject": "红包标题,发送者名称",
"red_packet_note": "红包留言,祝福语"
}
}
]
},
"errcode": 0,
"errmsg": "",
"hint": ""
}
返回说明
| 字段 | 类型 | 说明 |
|---|---|---|
| errcode | int | 状态码,0为正常,非0代表错误 |
| errmsg | string | 错误信息 |
| data | json | json返回值 |
| has_more | bool | 是否还有更多 |
| list | array | 红包模板列表 |
| id | string | 红包id |
| title | string | 标题 |
| amount | int | 红包金额,单位:分 int |
| receiver_type | int | 2:私聊红包, 3:群发红包 |
| creator_name | string | 创建者名称 |
| detail | json | 红包信息 |
| logo_url | string | logo |
| cover_url | string | 封面 |
| red_packet_subject | string | 红包标题,发送者名称 |
| red_packet_note | string | 红包留言,祝福语 |
| hint | string | 请求日志ID |
完整请求示例:
curl -X POST https://$basehost/gateway/qopen/UpdatePointsAccount \
-H 'Content-Type: application/json; charset=UTF-8' \
-H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
-d '{
"receiver_type": "2",
"offset": 0,
"limit": 10
}
}'