优惠券接口(Coupon)
优惠券列表[couponList]【免登录】
优惠券列表接口
请求URL
http://www.yoursite.com/addons/shop/api.coupon/couponList
请求方法
GET
请求参数
| Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
|---|---|---|---|---|
| result | number | 否 | 结果类型 | 为空则全部,0=折扣券,1=满减券 |
| page | number | 否 | 分页页码 | 1 |
返回值
{
"code": 1,
"msg": "获取成功!",
"time": "1628492502",
"data": {
"total": 2,
"per_page": 15,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": "RbX5",
"name": "折扣测试",
"result": 0,
"result_data": {
"money": "10",
"number": "8"
},
"mode": "dates",
"is_private": "no",
"is_open": 1,
"allow_num": 10,
"receive_times": "2021-07-15 00:00:00 - 2021-08-31 23:59:59",
"use_times": "2021-08-03 00:00:00 - 2021-08-31 23:59:59",
"createtime": 1626312389,
"updatetime": 1627876257,
"is_received": true,
"expired": false,
"online": true,
"has_more": true,
"condition_text": "",
"result_text": "Result 0",
"is_open_text": "Is_open 1",
"url": "http://www.fa.com/shop/coupon/RbX5.html",
"use_times_text": "2021-08-03 - 2021-08-31"
},
{
"id": "RaX8",
"name": "水果",
"result": 0,
"result_data": {
"money": "10",
"number": "8"
},
"mode": "fixation",
"is_private": "no",
"is_open": 1,
"allow_num": 1,
"receive_times": "100",
"use_times": "10",
"createtime": 1624261241,
"updatetime": 1627875909,
"is_received": true,
"expired": false,
"online": true,
"has_more": false,
"condition_text": "",
"result_text": "Result 0",
"is_open_text": "Is_open 1",
"url": "http://www.fa.com/shop/coupon/RaX8.html",
"use_times_text": "10"
}
]
}
}优惠券详情[couponDetail]【免登录】
优惠券详情接口
请求URL
http://www.yoursite.com/addons/shop/api.coupon/couponDetail
请求方法
GET
请求参数
| Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
|---|---|---|---|---|
| id | string | 是 | 优惠券id | RbX5 |
返回值
{
"code": 1,
"msg": "获取成功!",
"time": "1628492647",
"data": {
"id": "RbX5",
"name": "折扣测试",
"condition_ids": "",
"result": 0,
"result_data": {
"money": "10",
"number": "8"
},
"mode": "dates",
"is_private": "no",
"is_open": 1,
"allow_num": 10,
"give_num": 10,
"received_num": 10,
"receive_times": "2021-07-15 00:00:00 - 2021-08-31 23:59:59",
"use_times": "2021-08-03 00:00:00 - 2021-08-31 23:59:59",
"createtime": 1626312389,
"updatetime": 1627876257,
"goods": [
{
"id": 1,
"title": "浅色系简约居家生活场景布局沙发椅子桌子",
"image": "https://images.unsplash.com/photo-1544457070-4cd773b4d71e?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8ZnVybml0dXJlfGVufDB8MnwwfHw=&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60",
"price": "999.00",
"views": 61,
"sales": 0,
"marketprice": "1999.00",
"url": "http://www.fa.com/shop/a/1.html"
},
{
"id": 2,
"title": "原木色居家生活场景单人座沙发原木色茶几",
"image": "https://images.unsplash.com/photo-1596900749995-57cec6ddb861?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MjF8fGZ1cm5pdHVyZXxlbnwwfDJ8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60",
"price": "299.00",
"views": 60,
"sales": 2,
"marketprice": "599.00",
"url": "http://www.fa.com/shop/a/2.html"
}
],
"is_received": true,
"expired": false,
"online": true,
"has_more": true,
"condition_text": "",
"result_text": "Result 0",
"is_open_text": "Is_open 1",
"url": "http://www.fa.com/shop/coupon/RbX5.html",
"use_times_text": "2021-08-03 - 2021-08-31"
}
}领取优惠券[drawCoupon]【需登录】
领取优惠券接口
请求URL
http://www.yoursite.com/addons/shop/api.coupon/drawCoupon
请求方法
POST
请求参数
| Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
|---|---|---|---|---|
| id | string | 是 | 优惠券id | RbX5 |
返回值
{
"code": 1,
"msg": "领取成功",
"time": "1616638965",
"data": null
}我的优惠券[myCouponList]【需登录】
我的优惠券接口
请求URL
http://www.yoursite.com/addons/shop/api.coupon/myCouponList
请求方法
GET
请求参数
| Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. |
|---|---|---|---|---|
| id | string | 是 | 优惠券id | RbX5 |
| begin_time | number | 否 | 未生效,不为空已生效 | 1 |
| expire_time | number | 否 | 已失效,不为空已失效 | 1 |
| page | number | 否 | 分页页码 | 1 |
| is_used | number | 否 | 是否使用 | 1=未使用,2=已使用 |
返回值
{
"code": 1,
"msg": "领取成功",
"time": "1616638965",
"data": null
}
文档最后更新时间:2023-07-31 08:12:08
著作权归应用插件开发者所有,未经许可,禁止转载、复制此文档的任何内容。
未解决你的问题?请到问答社区「简单商城专区」反馈你遇到的问题