接口简介
- 主要用户添加app红包的奖项
接口请求说明
请求方式
添加 POST https://站点接口域名/openapi/envelopes/create-item
编辑 POST https://站点接口域名/openapi/envelopes/{envelope_id}/create-item
请求参数
| 参数名 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
| parent_id | int | ✅ | 归属红包的id |
| is_default | int | 是否默认奖项 | |
| total | int | ✅ | 总库存 |
| hour_interval | int | 单位时间获取频率 (小时) | |
| interval_max | int | 单位时间内最多允许被获取次数 | |
| chance | int | ✅ | 中奖率百分比: 20 |
| sponsor | string | 赞助商 | |
| start_at | string | 开始时间 2019-10-01 01:00:00 | |
| end_at | string | 结束时间 2019-10-01 01:00:00 | |
| cash | int | 现金 | |
| coin | int | 虚拟币 | |
| experience | int | 经验 | |
| real | string | 实物名 | |
| real_expire_at | string | 实物有效期止 2019-10-10 01:00:00 | |
| real_linkman | string | 领奖联系人 | |
| real_tel | string | 领奖电话 | |
| real_address | string | 领奖地址 | |
| real_code | string | 领奖暗号 | |
| notice | string | 领奖须知 |
请求示例
# 添加
curl -X POST \
https://站点接口域名/openapi/envelope/create-item \
-H 'authorization: Bearer 5d54b53a9f9bd' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'type=4&name=123¬ice_on_empty=xxx'
# 编辑
curl -X POST \
https://站点接口域名/openapi/envelopes/1/create-item \
-H 'authorization: Bearer 5d54b53a9f9bd' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'
-d 'type=4&name=123¬ice_on_empty=xxx'
接口响应说明
响应示例
// data为红包id
{
"code": 0,
"text": "",
"data": 286,
"time": 1570518092
}文档更新时间: 2019-11-11 10:15 作者:李奕飞