Get a list of coupons - GetCouponPage
Function Overview
Retrieves a list of coupons that a reseller issues.
Request parameters
Name | Type | Required | Description | Example value |
Uids | List<Long> | No | A list of end user UIDs. | [123453242,3948483727] |
SellerId | Long | Yes | The partner UID. | 3944837183 |
TemplateId | Long | No | The coupon template ID. | 295873 |
PageNo | integer | Yes | The current page number. | 1 |
PageSize | integer | Yes | The number of records on each page. | 10 |
RequestId | string | Yes | The request ID. | dsnjvui9svvsd-14indw |
FromApp | string | Yes | The source of the request. | test-app |
Request example
http(s)://resellertrade.aliyuncs.com?Action=GetCouponPage
&SellerId=153******4157
&TemplateId=202*******766
&<Common request parameters>[
{
"fromApp":"test-app",
"pageNo":1,
"pageSize":10,
"requestId":"D95C636C-1C4D-17F0-9C4F-F3FFD17A0E07",
"sellerId":186*******259,
"uids":[
12********603,
194******38
]
}
]Response parameters
Name | Type | Description | Example |
CouponId | Long | ID | 23456 |
UserId | Long | The UID of the end user. | 124523 |
Description | string | The coupon description. | Test coupon |
CertainMoney | number | The conditional amount for the spend-and-save promotion, in CNY. For example, 20000. | 200 |
PromotionId | Long | The promotion ID. | 39*****482 |
TemplateId | Long | The template ID. | 394******982 |
StartTime | string | The start time of the validity period. | 2022-03-03 12:12:00 |
EndTime | string | The end time of the validity period. | 2022-04-03 12:12:00 |
Status | string | The status. | AVAILABLE: The coupon can be used. EXHAUSTED: The resource is fully consumed. ABANDONED: The coupon has been voided. EXPIRED: expired |
Amount | number | The total face value, in CNY. This parameter is empty for discount coupons. | 100 |
UsedAmount | number | The used amount, in CNY. | 10 |
FrozenAmount | number | The frozen amount, in CNY. | 10 |
UsageCount | integer | The total number of times the coupon can be used. A value of 0 means unlimited use. | 12 |
UsedCount | integer | Usage Count (Frozen) | 1 |
FrozenCount | integer | Freeze Count | 1 |
SellerId | Long | The partner UID. | 393*******722 |
DiscountRate | number | The discount rate. For example: 0.75. | 0.75 |
Currency | object | Currency | USD |
UpperLimit | number | The maximum discount amount. A null value means no limit. | null |
Count | integer | The total number of returned entries. | 10 |
TotalCount | integer | The total number of entries that meet the criteria. Used for paging. | 100 |
RequestId | string | Routes the call back through the original ingest endpoint for end-to-end tracking. | 394847372djewhv |
Success | boolean | The success flag. | true |
Code | string | The error code. | success |
Message | string | The error message. | success |
Response example
[
{
"RequestId":"E40EC2C2-8AD5-4D01-B54C-F6F8EC176ED3",
"Data":{
"amount":20,
"bid":26888,
"certainMoney":null,
"couponId":508******69,
"couponTileHint":"Credit - $20 credit left (valid until 05/27/2017)",
"couponTitle":"Credit - $20 credit left",
"currency":"USD",
"description":"ECS Free Trial Coupon",
"discountRate":null,
"endTime":"2022-03-03 12:12:00",
"frozenAmount":0,
"frozenCount":0,
"promotionId":101******5155,
"sellerId":193******273,
"startTime":"2022-02-03 12:12:00",
"status":"AVAILABLE",
"templateId":6290,
"upperLimit":null,
"usageCount":0,
"usedAmount":0,
"usedCount":0,
"userId":5504*******6395
},
"TotalCount":106,
"Count":1,
"Success":true
}
]