该API用于按照优惠券状态查看创建的优惠券。
路径
GET
/v2/providers/fms/apis/api/v2/vendors/{vendorId}/coupons
示例
https://api-gateway.coupang.com/v2/providers/fms/apis/api/v2/vendors/A00012345/coupons?status=APPLIED&page=1&size=10&sort=desc
请求参数
Name |
Required |
Type |
Description |
vendorId |
O |
String |
卖家ID 酷澎分配给卖家的固有代码 ex) A00012345 |
链接请求参数
Name |
Required |
Type |
Description |
status |
O |
String |
优惠券状态 (STANDBY, APPLIED, PAUSED, EXPIRED, DETACHED) |
page |
|
Number |
页面: 默认值1 调用下一页的关键值。调用第一页时,不要输入或输入'1' |
size |
|
Number |
每页件数 |
sort |
|
String |
排序值 (asc, desc) 默认升序(ascending) |
请求体
无
返回消息
Name |
Type |
Description |
|
code |
Number |
服务器响应代码 |
|
message |
String |
服务器响应信息 |
|
httpStatus |
Number |
HTTP状态代码 (与服务器响应代码的值相同) |
|
httpStatusMessage |
String |
HTTP 状态信息 (与服务器响应信息的值相同) |
|
errorMessage |
String |
除HTTP Status 200以外,剩下Status 中包含服务器详细失败原因信息。 |
|
data |
Object |
优惠券列表数据 |
|
|
success |
Boolean |
成功与否 true or false |
|
content |
Array |
优惠券列表 |
|||||||||||||
|
|
contractId |
Number |
合同ID |
||||||||||||
|
|
vendorContractId |
Number |
卖家合同代码 (酷澎管理代码) ex) -1, 1, 2 |
||||||||||||
|
|
couponId |
Number |
优惠券ID |
||||||||||||
|
|
discount |
Number |
折扣率 |
||||||||||||
|
|
endAt |
String |
有效期结束时间 ex) 2017-09-01 00:00:00 |
||||||||||||
|
|
maxDiscountPrice |
Number |
最大折扣金额 ex) 1000, 10000 |
||||||||||||
|
|
promotionName |
String |
促销展名 ex) 1月第 2 周的连衣裙优惠券 |
||||||||||||
|
|
startAt |
String |
有效期开始时间 ex) 2017-08-04 01:00:00 |
||||||||||||
|
|
status |
String |
优惠券状态
|
||||||||||||
|
|
type |
String |
折扣类型 ex) RATE (固定折扣率), FIXED_WITH_QUANTITY(按数量定额折扣), PRICE(定额折扣) |
||||||||||||
|
|
wowExclusive |
Boolean |
发放对象 false (全部:默认值) true (火箭Wow 会员) |
||||||||||||
|
Pagination |
Array |
分页 |
|||||||||||||
|
|
countPerPage |
Number |
每页数据量 ex) 10, 20, 30 |
||||||||||||
|
|
currentPage |
Number |
当前页面 ex) 1 |
||||||||||||
|
|
totalPages |
Number |
总页面数 ex) 1000 |
||||||||||||
|
|
totalElements |
Number |
总数据量 ex) 1000 |
返回消息示例
{
"code": 200,
"message": "OK",
"httpStatus": 200,
"httpStatusMessage": "OK",
"errorMessage": "",
"data": {
"success": true,
"content": [
{
"contractId": 63,
"vendorContractId": null,
"promotionName": null,
"couponId": 2246326,
"status": "APPLIED",
"type": "RATE",
"maxDiscountPrice": 40000,
"discount": 30,
"startAt": "2018-04-03 15:00:00",
"endAt": "2018-04-05 23:59:00",
"wowExclusive": "false"
},
{
"contractId": 63,
"vendorContractId": null,
"promotionName": null,
"couponId": 2245939,
"status": "APPLIED",
"type": "RATE",
"maxDiscountPrice": 30000,
"discount": 20,
"startAt": "2018-04-02 18:37:00",
"endAt": "2018-04-05 23:59:00",
"wowExclusive": "false"
},
{
"contractId": 63,
"vendorContractId": null,
"promotionName": null,
"couponId": 2121942,
"status": "APPLIED",
"type": "RATE",
"maxDiscountPrice": 10000,
"discount": 5,
"startAt": "2018-03-30 00:01:00",
"endAt": "2018-04-06 23:59:00",
"wowExclusive": "false"
}
],
"pagination": {
"currentPage": 1,
"countPerPage": 10,
"totalPages": 1,
"totalElements": 3
}
}
}
错误信息
HTTP status code (error type) |
Error message |
How to resolve |
400 (check request parameter) |
请确认卖家权限 |
查看卖家ID(vendorid)值是否输入正确 |
400 (check request parameter) |
页面索引不得小于0! |
查看是否输入了正确的页面(page)值。 |