|
|
|
# 写在前面
|
|
|
|
|
|
|
|
### 一定要看
|
|
|
|
- 文中将${seq}定义为参数名为seq的参数,相关的表中有参数描述
|
|
|
|
- 文中将${timeout*}定义为可选的参数timeout
|
|
|
|
- 本文当中所有涉及到时间的参数都使用精确到毫秒的时间戳,例1535595007983表示Thu Aug 30 2018 10:10:07 GMT+0800 (中国标准时间)
|
|
|
|
- 本文中涉及到分页的接口使用skip、limit参数,表示跳过skip行取至多limit行,返回头X-Total-Count参数表示查询总行数
|
|
|
|
- 所有接口使用HTTP状态码200表示成功,其他状态码表示失败,如有特例将在具体接口中说明
|
|
|
|
|
|
|
|
# R1.查询可用券列表
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
GET http://${domain}/sovellpay/v2/props
|
|
|
|
?skip=${skip}
|
|
|
|
&limit=${limit}
|
|
|
|
Authorization: Bearer ${token}
|
|
|
|
```
|
|
|
|
|参数名|类型|说明|
|
|
|
|
|:---|:---|:---|
|
|
|
|
|||见`公共参数说明`|
|
|
|
|
|
|
|
|
- 返回
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
[
|
|
|
|
${券结构}
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
- 券结构
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"_id": ${_id},
|
|
|
|
"_rev": ${_rev}
|
|
|
|
"_exp": ${_exp},
|
|
|
|
"realname": ${realname},
|
|
|
|
"amount": ${amount},
|
|
|
|
"name": ${name},
|
|
|
|
"effect_day": ${effect_day},
|
|
|
|
"remark": ${remark},
|
|
|
|
"where": {
|
|
|
|
"amount": {
|
|
|
|
"$ge": ${amount_min}
|
|
|
|
},
|
|
|
|
"date": {
|
|
|
|
"$gt": ${expired_min},
|
|
|
|
"$lt": ${expired_max}
|
|
|
|
},
|
|
|
|
"group_id": {
|
|
|
|
"$in": [${group_id}...]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
````
|
|
|
|
|
|
|
|
|参数名|类型|说明|
|
|
|
|
|:---|:---|:---|
|
|
|
|
|realname|string|姓名|
|
|
|
|
|amount|int|券金额|
|
|
|
|
|group_id|string|组织id|
|
|
|
|
|amount_min|int|最小生效金额|
|
|
|
|
|expired_max|timestamp|最大有效期|
|
|
|
|
|expired_min|timestamp|最小有效期|
|
|
|
|
|name|string|券名称|
|
|
|
|
|effect_day|int|有效期天数|
|
|
|
|
|remark|string|说明|
|
|
|
|
|_exp|timestamp|删除时间|
|
|
|
|
|_id|string|券id|
|
|
|
|
|_rev|string|券副本号|
|
|
|
|
|
|
|
|
# R2.查询单个券信息
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
GET http://${domain}/sovellpay/v2/props/${_id}
|
|
|
|
Authorization: Bearer ${token}
|
|
|
|
```
|
|
|
|
|
|
|
|
- 返回`券结构`,同`R1.查询可用券列表`
|
|
|
|
|
|
|
|
# 公共参数说明
|
|
|
|
|参数名|类型|说明|
|
|
|
|
|:---|:---|:---|
|
|
|
|
|token|string|访问令牌|
|
|
|
|
|skip|int|分页跳过,默认0|
|
|
|
|
|limit|int|分页条数,默认1| |
|
|
\ No newline at end of file |