取得會員獎項

Get client gifts

post

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 · enumOptional

Platform type (required if platformClientId provided)

Possible values:
Body

Client identification rules:

  • Either provide 'clientId' OR both 'platform' and 'platformClientId'
secretstringRequired

Secret key for API authentication

Example: your_secret_key_here
clientIdstringOptional

The client ID (required if platform + platformClientId not provided)

Example: client456
platformstring · enumOptional

Platform type (required if platformClientId provided)

Example: linePossible values:
platformClientIdstringOptional

Platform-specific client ID (required if clientId not provided)

Example: U1234567890abcdef
Responses
200
Client gifts retrieved successfully
application/json
Responseall of
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