Member User Promotion API Documentation

Complete API reference for Member User Promotion endpoints

GET /v2/user/promotion Requires: JwtAccessGuardMemberV2
Get a paginated list of enabled promotions available for the authenticated member's partner. Results are filtered based on member group restrictions, promotion visibility settings, and exclude step promotions and manual promotions. Promotions are cached for performance. Results are ordered by sequence, creation date, and ID.
Request

Query Parameters:

Parameter Type Required Description
page number Optional Page number (default: 1)
limit number Optional Number of items per page (default: 50, max 100, can also use "row" parameter)
row number Optional Alternative to "limit" parameter (default: 50, max 100)

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "list": [
      {
        "id": 123,
        "code": "PROMO001",
        "nameEN": "Welcome Bonus",
        "nameTH": "โบนัสต้อนรับ",
        "description": "Promotion description",
        "isRedeemable": true,
        "isUsing": false,
        "isManual": false,
        "promotionTurnType": "DEPOSIT",
        "startDate": "2024-01-01T00:00:00.000Z",
        "endDate": "2024-12-31T23:59:59.999Z",
        "promotionImageId": null,
        "promotionImageMobileId": null,
        "promotionImageLandingId": null,
        "promotionImageUrl": "https://cdn.example.com/image.jpg",
        "promotionMobileImageUrl": "https://cdn.example.com/image.jpg",
        "promotionLandingImageUrl": "https://cdn.example.com/image.jpg",
        "isAutoExit": false
      }
    ],
    "meta": {
      "page": 1,
      "limit": 50,
      "total": 10,
      "totalPages": 1
    }
  }
}
Example Request:
GET /v2/user/promotion?page=1&limit=20
GET /v2/user/promotion?page=1&row=20

400 Bad Request Member not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "MEMBER_NOT_FOUND",
    "errorMessage": "Member not found"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
GET /v2/user/promotion/status Requires: JwtAccessGuardMemberV2
Get the current active promotion status for the authenticated member, including current turnover and needed turnover.
Request

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "activePromotion": {
      "id": 123,
      "nameEN": "Welcome Bonus",
      "nameTH": "โบนัสต้อนรับ",
      "promotionTurnType": "DEPOSIT",
      "canAddFund": true,
      "isSetCreditAfterOut": false,
      "setCreditAfterOutAmount": 0
    },
    "currentTurnover": 5000.00,
    "neededTurn": 10000.00,
    "canAddFund": true
  }
}

Response when no active promotion:

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "activePromotion": null,
    "currentTurnover": 0,
    "neededTurn": 0,
    "canAddFund": true
  }
}

400 Bad Request Member not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "MEMBER_NOT_FOUND",
    "errorMessage": "Member not found"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
GET /v2/user/promotion/preferred Requires: JwtAccessGuardMemberV2
Get the member's preferred promotion. Returns null if no preferred promotion is set or if the preferred promotion is no longer available.
Request

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "id": 123,
    "code": "PROMO001",
    "nameEN": "Welcome Bonus",
    "nameTH": "โบนัสต้อนรับ",
    "description": "Promotion description",
    "isRedeemable": true,
    "isUsing": false,
    "promotionTurnType": "DEPOSIT",
    "startDate": "2024-01-01T00:00:00.000Z",
    "endDate": "2024-12-31T23:59:59.999Z",
    "promotionImageId": 1,
    "promotionImageMobileId": 2,
    "promotionImageLandingId": 3,
    "promotionImageUrl": "https://cdn.example.com/image.jpg",
    "promotionMobileImageUrl": "https://cdn.example.com/mobile.jpg",
    "promotionLandingImageUrl": "https://cdn.example.com/landing.jpg",
    "isManual": false,
    "isAutoExit": false
  }
}

Response when no preferred promotion:

{
  "isSuccess": true,
  "statusCode": 200,
  "data": null
}

400 Bad Request Member not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "MEMBER_NOT_FOUND",
    "errorMessage": "Member not found"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
POST /v2/user/promotion/select/:promotionId Requires: JwtAccessGuardMemberV2
Redeem/select a promotion. Sets the promotion as the member's preferred promotion. Validates that the member doesn't have an active promotion and that promotion conditions are met.
Request

Path Parameters:

Parameter Type Required Description
promotionId number Yes Promotion ID to redeem

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "message": "รับโปรโมชั่น โบนัสต้อนรับ สำเร็จ"
  }
}

400 Bad Request Promotion already active

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_ALREADY_ACTIVE",
    "errorMessage": "Cannot join promotion while an active promotion exists"
  }
}

400 Bad Request Promotion not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_NOT_FOUND",
    "errorMessage": "Promotion not found"
  }
}

400 Bad Request Manual promotion only

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_MANUAL_ONLY",
    "errorMessage": "Cannot claim manual promotion. Please contact admin to receive promotion"
  }
}

400 Bad Request Promotion conditions not met

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_CONDITION_NOT_MET",
    "errorMessage": "Promotion conditions not met"
  }
}

400 Bad Request Promotion application failed

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_APPLICATION_FAILED",
    "errorMessage": "Cannot join promotion. Please contact agent [line : @partner_line_id]"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
POST /v2/user/promotion/toggle/auto Requires: JwtAccessGuardMemberV2
Toggle the auto-receive promotion setting for the authenticated member. When enabled, the member will automatically receive promotions. When disabled, clears the preferred promotion.
Request

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "message": "สำเร็จ"
  }
}

400 Bad Request Member not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "MEMBER_NOT_FOUND",
    "errorMessage": "Member not found"
  }
}

400 Bad Request Cannot update

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "SOMETHING_WENT_WRONG",
    "errorMessage": "Cannot update"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
POST /v2/user/promotion/out Requires: JwtAccessGuardMemberV2
Exit from the current active promotion. Validates that there are no unsettled bets and checks promotion exit conditions. May adjust credit based on promotion settings.
Request

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "messsage": "ออกจากโปรโมชั้นสำเร็จ"
  }
}

400 Bad Request Member not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "MEMBER_NOT_FOUND",
    "errorMessage": "Member not found"
  }
}

400 Bad Request Promotion not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_NOT_FOUND",
    "errorMessage": "Promotion not found"
  }
}

400 Bad Request Has unsettled bets

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_HAS_UNSETTLED_BETS",
    "errorMessage": "Cannot exit promotion due to unsettled bets"
  }
}

400 Bad Request Disallowed game type

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_DISALLOWED_GAME_TYPE",
    "errorMessage": "Cannot exit promotion due to playing disallowed game type. Please contact admin"
  }
}

400 Bad Request Exit failed

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "PROMOTION_EXIT_FAILED",
    "errorMessage": "Cannot exit promotion"
  }
}

400 Bad Request Credit discrepancy

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "SOMETHING_WENT_WRONG",
    "errorMessage": "Credit discrepancy detected. Please try again"
  }
}

400 Bad Request System processing

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "System is processing. Please wait a moment"
  }
}

400 Bad Request Too frequent exit

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "You are exiting promotion too frequently. Please wait a moment before exiting again"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
GET /v2/user/promotion/message Requires: JwtAccessGuardMemberV2
Get the promotion completion message for the authenticated member. Returns promotion name and finished message if available.
Request

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "nameTH": "โบนัสต้อนรับ",
    "nameEN": "Welcome Bonus",
    "finishedPromotionMessage": "Congratulations! You have completed the promotion."
  }
}

Response when no message:

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "nameTH": "",
    "nameEN": "",
    "finishedPromotionMessage": ""
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}
GET /v2/user/promotion/history Requires: JwtAccessGuardMemberV2
Get promotion history for the authenticated member. Returns paginated list of promotion step usage history, optionally filtered by date range or period.
Request

Query Parameters:

Parameter Type Required Description
page number Optional Page number (default: 1)
limit number Optional Number of items per page (default: 10, can also use "row" parameter)
row number Optional Alternative to "limit" parameter
period string Optional Date period filter: "today", "7d", "30d", "90d"
startDate string Optional Start date filter (ISO date string)
endDate string Optional End date filter (ISO date string)

Headers:

Header Type Required Description
Authorization string Yes Bearer {accessToken}

Body: Empty

Response

200 OK Success

{
  "isSuccess": true,
  "statusCode": 200,
  "data": {
    "list": [
      {
        "id": 1,
        "uid": "promotion-usage-uid",
        "isActive": false,
        "stepStatus": "COMPLETED",
        "overAllStatus": "COMPLETED",
        "currentStep": 3,
        "currentStepReceivedAt": "2024-01-15T10:00:00.000Z",
        "currentStepCompletedAt": "2024-01-15T12:00:00.000Z",
        "stepHistory": [],
        "promotionUsage": [],
        "remark": "Completed promotion",
        "createdAt": "2024-01-01T00:00:00.000Z",
        "updatedAt": "2024-01-15T12:00:00.000Z",
        "completedAt": "2024-01-15T12:00:00.000Z",
        "receivedAt": "2024-01-01T00:00:00.000Z",
        "promotionStep": {
          "id": 1,
          "name": "Step Promotion",
          "remark": "Step promotion description"
        }
      }
    ],
    "meta": {
      "page": 1,
      "limit": 10,
      "total": 5,
      "totalPages": 1
    }
  }
}

400 Bad Request Member not found

{
  "isSuccess": false,
  "statusCode": 400,
  "message": {
    "errorCode": "MEMBER_NOT_FOUND",
    "errorMessage": "Member not found"
  }
}

429 Too Many Requests Duplicate request detected

{
  "isSuccess": false,
  "statusCode": 429,
  "message": {
    "errorCode": "DUPLICATE_REQUEST",
    "errorMessage": "Duplicate request. Please try again after a short wait."
  }
}

Member User Promotion API Documentation © 2024