取得會員獎項
Retrieve all gifts (virtual, physical, and tickets) for a specific client.
Gift types:
Virtual Gifts: Virtual type gifts
Physical Gifts: Physical type gifts
Tickets: Coupons (default gift) that are unused
Conditional validation rules:
Either provide 'clientId' OR both 'platform' and 'platformClientId'
Authorizations
Query parameters
botIdstringRequired
The bot ID for the API request
platformClientIdstringOptional
Platform-specific client ID (required if clientId not provided in body)
platformstring · enumOptionalPossible values:
Platform type (required if platformClientId provided)
Body
Client identification rules:
- Either provide 'clientId' OR both 'platform' and 'platformClientId'
secretstringRequiredExample:
Secret key for API authentication
your_secret_key_here
clientIdstringOptionalExample:
The client ID (required if platform + platformClientId not provided)
client456
platformstring · enumOptionalExample:
Platform type (required if platformClientId provided)
line
Possible values: platformClientIdstringOptionalExample:
Platform-specific client ID (required if clientId not provided)
U1234567890abcdef
Responses
200
Client gifts retrieved successfully
application/json
Responseall of
401
JWT token is invalid or expired
application/json
403
Permission denied - insufficient access rights
application/json
404
Resource not found
application/json
429
Rate limit exceeded
application/json
500
Internal server error
application/json
post
POST /api/openapi/client/gift HTTP/1.1
Host: mantago.cc
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"secret": "your_secret_key_here",
"clientId": "client456",
"platform": "line",
"platformClientId": "U1234567890abcdef"
}
{
"success": true,
"message": "Get client gifts successfully",
"tickets": [
{
"createdAt": "2024-07-15T10:30:28.700Z"
}
],
"physicalGifts": [
{
"name": "Premium Gift Box",
"resource": "lotteryGame",
"createdAt": "2024-07-15T11:45:12.500Z"
}
],
"virtualGifts": [
{
"name": "50% Discount Coupon",
"resource": "rewardsCard",
"createdAt": "2024-07-15T14:20:33.800Z",
"isExpired": false
},
{
"name": "Free Shipping Voucher",
"resource": "unknown",
"createdAt": "2024-07-15T16:10:45.200Z",
"isExpired": true,
"startTime": "2024-07-01T00:00:00.000Z",
"endTime": "2024-07-14T23:59:59.000Z"
}
]
}
Last updated