跳转到主要内容
GET
/
coupon
List Coupons
curl --request GET \
  --url https://uat-api.clinkbill.com/api/coupon \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-Timestamp: <api-key>'
{
  "total": 123,
  "rows": [
    {
      "couponId": "<string>",
      "couponName": "<string>",
      "percentage": 123,
      "fixedAmounts": {},
      "durationMonths": 123,
      "maxRedemptionCount": 123,
      "redeemedCount": 123,
      "validPeriodEnd": 1754819711382,
      "mirroring": true,
      "terms": "<string>"
    }
  ],
  "code": 200,
  "msg": "success"
}

授权

X-API-KEY
string
header
必填

Your secret API key obtained from the Clink dashboard (Developers section)

X-Timestamp
string
header
必填

Current timestamp in milliseconds since Unix epoch (required for request signing)

查询参数

discountType
enum<string>

Discount type used to filter coupons

可用选项:
percentage,
fixed_amount
durationType
enum<string>

Discount duration type used to filter coupons

可用选项:
once,
repeating,
forever
pageNum
integer<int32>
默认值:1

Current page number. Defaults to 1.

pageSize
integer<int32>
默认值:20

Number of records per page. Defaults to 20. The maximum is 50; larger values are capped at 50.

必填范围: x <= 50

响应

Coupons retrieved successfully

Table Paging Data Object

total
integer<int64>

Total number of records

rows
object[]

List of data

code
integer<int32>

Response status code, 200 when success

示例:

200

msg
string

Brief description of what happened, 'success' when happy case

示例:

"success"