Game service APIs

Player history

GET https://{api-domain}/v1/player/{player_id}/history

ใช้สำหรับดึงข้อมูลการเล่นของผู้เล่น ย้อนหลังได้ 14 วัน

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Path parameter

Name
Value

player_id

user id ของระบบโอเปอเรเตอร์

Query string parameter

Name
Type
Description
Required

game_key

string

รหัสประเภทเกม ตามระบบของ Casino Game Game list

Yes

period

string

ช่วงเวลาที่ต้องการดึงข้อมูล รองรับค่า: today, last7Days, last14Days

Yes

page

Integer

หน้าที่ต้องการดึงข้อมูล default: 1

No

per_page

Integer

จำนวนที่แสดงข้อมูลต่อหน้า default: 20

No

Response

HTTP Status: 200 OK
Content-Type: application/json
{
  "status": "success",
  "data": {
    "pagination": {
      "total": 3,
      "page": 1,
      "per_page": 20,
      "last_page": 1
    },
    "records": [
      {
        "id": "14987646",
        "ref_id": "2349",
        "player_id": "player001",
        "game_key": "baccarat",
        "round_id": "bc:1697512897867:19g6plntrcmrv",
        "status": "completed",
        "total_bet": 200.00,
        "total_payout": 1400.00,
        "currency": "THB",
        "created_at": "2023-09-16T21:24:39.703Z",
        "game_result": {
          "data": {
            "BANKER": { "card": ["KC", "QH"], "score": ["0", "0"], "total": 0 },
            "PLAYER": { "card": ["4C", "4D"], "score": ["4", "4"], "total": 8 }
          },
          "image_url": {
            "camera1": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/1.png",
            "camera2": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/2.png"
          },
          "winner": ["PLAYER","PPAIR"]
        },
        "player_bet": {
          "PLAYER": 100.00,
          "PPAIR": 100.00
        },
        "player_win": {
          "PLAYER": {
            "amount": 100.00,
            "odds": 1,
            "profit": 100.00
          },
          "PPAIR": {
            "amount": 100.00,
            "odds": 11,
            "profit": 1100.00
          }
        }
      },
      {
        "id": "14987643",
        "ref_id": "2346",
        "player_id": "player001",
        "game_key": "baccarat",
        "round_id": "bc:1697512885258:19g6plntrcd1m",
        "status": "completed",
        "total_bet": 200.00,
        "total_payout":0.00,
        "currency": "THB",
        "created_at": "2023-09-16T20:34:59.703Z",
        "game_result": {
          "data": {
            "BANKER": { "card": ["AC", "8H"], "score": ["1", "8"], "total": 9 },
            "PLAYER": { "card": ["5C", "3D"], "score": ["5", "3"], "total": 8 }
          },
          "image_url":{
            "camera1": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/1.png",
            "camera2": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/2.png"
          },
          "winner": ["BANKER"]
        },
        "player_bet": {
          "PLAYER": 100.00,
          "PPAIR": 100.00
        }
      },
      {
        "id": "14987641",
        "ref_id": "2341",
        "player_id": "player001",
        "game_key": "baccarat",
        "round_id": "bc:1697512798517:19g6wlntrai45",
        "status": "completed",
        "total_bet": 200.00,
        "total_payout": 1800.00,
        "currency": "THB",
        "created_at": "2023-09-16T19:24:39.703Z",
        "game_result": {
          "data": {
            "BANKER": { "card": ["4C", "1H"], "score": ["4", "1"], "total": 5 },
            "PLAYER": { "card": ["4C", "2D"], "score": ["4", "2"], "total": 6 }
          },
          "image_url":{
            "camera1": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/1.png",
            "camera2": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/2.png"
          },
          "winner": ["PLAYER", "PPAIR"]
        },
        "player_bet": {
          "PLAYER": 100.00,
          "PPAIR": 100.00,
          "BONUS": {
            "type": "PLAYER",
            "first":{"card": "4", "symbol": "S"},
            "second":{"card": "5", "symbol": "S"}
          }
        },
        "player_win": {
          "PLAYER": {
            "amount": 100.00,
            "odds": 5,
            "profit": 500.00,
            "remark": {
              "six_score_rate": 0.5,
              "bonus_rate": 10
            }
          },
          "PPAIR": {
            "amount": 100.00,
            "odds": 11,
            "profit": 1100.00
          } 
        }
      },
      {
        "id": "14987640",
        "ref_id": "2331",
        "player_id": "player001",
        "game_key": "baccarat_insurance",
        "round_id": "bc:8097592798517:19g6wlntrai89",
        "status": "completed",
        "total_bet": 1583.00,
        "total_payout": 1582.50,
        "currency": "THB",
        "created_at": "2023-09-15T18:24:38.703Z",
        "game_result": {
          "data": {
            "BANKER": { "card": ["JC", "4H", "6H"], "score": ["0", "4", "6"], "total": 0 }, "PLAYER": { "card": ["KC", "QD", "3H"], "score": ["0", "0", "3"], "total": 3 }
          },
          "image_url":{
            "camera1": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/1.png",
            "camera2": "https://s3.ap-southeast-1.amazonaws.com/games-s3.bw-cdn.com/games/2023/11/5/baccarat/4/bc:1699191000260:19g6plolig6v8/2.png"
          },
          "winner": ["PLAYER", "BIG"]
        },
        "player_bet": {
          "BANKER": 1000.00,
          "INSURANCE": [333.00, 250.00]
        },
        "player_win": {
          "INSURANCE": [
            {
              "amount": 333.00,
              "odds": 1.5,
              "profit": 499.50
            },
            {
              "amount": 250.00,
              "odds": 2,
              "profit": 500.00
            }
          ]
        }
      }
    ]
  }
}

Virtual game table

GET https://{api-domain}/v1/operator/tables/virtual

ใช้สำหรับดึงข้อมูลโต๊ะเกมที่โอเปอเรเตอร์สร้างไว้

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Query string parameter

Name
Type
Description
Required

game_key

string

รหัสประเภทเกม ตามระบบของ Casino Game Game list

No

page

integer

หน้าที่ต้องการดึงข้อมูล default: 1

No

per_page

integer

จำนวนที่แสดงข้อมูลต่อหน้า default: 20

No

status

string

สถานะโต๊ะเกม รองรับค่า:

active = เปิดใช้งาน

inactive = ปิดใช้งาน

No

id

string

เลขที่โต๊ะเกม

No

Response

HTTP Status: 200 OK
Content-Type: application/json
{
    "status":"success",
    "data":{
        "pagination":{
            "total":2,
            "page":1,
            "per_page":20,
            "last_page":1
        },
        "records":[
            {
                "id":"22",
                "title": {
                    "en": "Baccarat 01",
                    "th": "บาคาร่า 01"
                },
                "status":"active",
                "game_key":"baccarat",
                "dealer": {
                    "id":"72",
                    "code":"BWCA7100011",
                    "name":"ROS CHANTHY",
                    "cover": {
                        "h":"https://bw-manage.bw-cdn.com/employee/dealer/BWCA7100011/baccarat/cover.jpg",
                        "v":"https://bw-manage.bw-cdn.com/employee/dealer/BWCA7100011/baccarat/cover2.jpg"
                    }
                },
                "user_limit":{
                    "THB": {
                        "bet_max": "100000",
                        "bet_min": "10"
                    },
                    "USD": {
                        "bet_max": "10000",
                        "bet_min": "1"
                    }
                }
            },
            {
                "id":"26",
                "title": {
                    "en": "Baccarat 02",
                    "th": "บาคาร่า 02"
                },
                "status":"active",
                "game_key":"baccarat",
                "dealer":{
                    "id":"73",
                    "code":"BWCA7100016",
                    "name":"ANN SOPHANA",
                    "cover":{
                        "h":"https://bw-manage.bw-cdn.com/employee/dealer/BWCA7100016/baccarat_insurance/cover.jpg",
                        "v":"https://bw-manage.bw-cdn.com/employee/dealer/BWCA7100016/baccarat_insurance/cover2.jpg"
                    }
                },
                "user_limit":{
                    "THB": {
                        "bet_max": "100000",
                        "bet_min": "10"
                    },
                    "USD": {
                        "bet_max": "10000",
                        "bet_min": "1"
                    }
                }
            }
        ]
    }
}

Bet detail

POST https://{api-domain}/v1/operator/bet-url

ใช้สำหรับขอ URL เพื่อเปิดดูการเดิมพันของผู้เล่น โดย URL จะเปิดดูได้ภายใน 1 ชั่วโมงเท่านั้น

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Required

game_key

string

รหัสประเภทเกม ตามระบบของ Casino Game Game list

Yes

round_id

string

เลขที่ของเกมที่วางเดิมพัน

Yes

player_id

string

user id ของระบบโอเปอเรเตอร์

Yes

language

string

ภาษา 2 หลัก ตามมาตราฐาน ISO 3166-1 alpha-2 (Ex. TH, EN) default: TH

No

Response

HTTP Status: 200 OK
Content-Type: application/json
{
    "status": "success",
    "data": {
        "url": "https://xstg-api.casinogame.com/v1/operator/viewbetdetial?operator_id=10&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjo5NjIsIm9wZXJhdG9yX2lkIjoxMCwicmVmMSI6ImJjOjk6MTczODEzNjg2NTg4MToxOWc2b202aGx0OTN0Iiwibm93IjoxNzM4MTY1Nzk5LCJpYXQiOjE3MzgxNjU3OTksImV4cCI6MTczODE2OTM5OX0.m7mr5OnkdluA0HEtvnjsmbrqaFYSxk8g9xCTgK1njaY&language=TH"
    }
}

Lotto result inquiry

GET https://{api-domain}/api/operator/lotto/result-inquiry

ใช้สำหรับดึงข้อมูลผลการออกรางวัลหวย Yeekee และ Lucky 1 dollar

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Required

round_id

string

เลขที่ของเกมส์ที่วางเดิมพัน

Yes

page

string

หน้าที่ต้องการข้อมูล (default: 1)

Yes

per_page

integer

จำนวนข้อมูลต่อ 1 หน้า (default: 20, max: 100)

Yes

Response

HTTP Status: 200 OK
Content-Type: application/json
{
     "status": "success",
     "round_id": "xxxx:1659974366095:4b3afhl6kxvma7",
     "round": {"no":"1", "result_date":"2023-10-09T17:15:00.000Z"},
     "game_result": {
          "data": {
               "WINNING_NUMBER": ["1002558"],
               "SHOOT_NUMBER": ["1041053"],
               "SYSTEM_NUMBER": ["38495"],
               "THREE_TOP": ["558"],
               "THREE_MIX": ["558","585","855"],
               "TWO_TOP": ["58"],
               "TWO_UNDER": ["02"],
               "ONE_TOP": ["5","8"],
               "ONE_UNDER": ["0","2"],
               "SHOOT_FIVE": ["38495"],
               "SHOOT_FOUR": ["8495"],
               "SHOOT_THREE": ["495"]
          }
      },
     "player": [
          {
               "player_id": "1111111",
               "payout_amount": 21032,
               "currency": "THB",
               "transaction_code": "GBW01", // GBW01=win, GBL01=loss
               "transaction_id": "1231231312313", // เลขอ้างอิงในการทำรายการจ่าย เช่น record ที่บันทึกการจ่าย
               "round_id": "xxxx:1659974366095:4b3afhl6kxvma7",
               "created_at": "2024-09-17T13:28:21.200Z",
               "remark": "Yeekee #1 2023-10-09 00:15",
               "game_key": "yeekee",
               "player_bet": {
                    "data": [
                        {"bet":"THREE_TOP", "number":"558", "qty":"1", "bet_amount":"10"},
                        {"bet":"THREE_MIX", "number":"123", "qty":"1", "bet_amount":"10"},
                        {"bet":"TWO_TOP", "number":"58", "qty":"1", "bet_amount":"10"},
                        {"bet":"TWO_UNDER", "number":"23", "qty":"1", "bet_amount":"10"},
                        {"bet":"ONE_TOP", "number":"5", "qty":"1", "bet_amount":"10"},
                        {"bet":"ONE_UNDER", "number":"8", "qty":"1", "bet_amount":"10"}
                    ]
               },
               "player_bet_result": {
                    "win": [
                        {"bet":"THREE_TOP", "number":"558", "qty":"1", "bet_amount":"10", "payout_amount":"9000"},
                        {"bet":"TWO_TOP", "number":"58", "qty":"1", "bet_amount":"10", "payout_amount":"900"},
                        {"bet":"ONE_TOP", "number":"5", "qty":"1", "bet_amount":"10", "payout_amount":"32"},
                        {"bet":"SHOOT_FIVE", "number":"38495", "qty":"1", "bet_amount":"0", "payout_amount":"10000"}
                        {"bet":"SHOOT_FOUR", "number":"48495", "qty":"1", "bet_amount":"0", "payout_amount":"1000"}
                        {"bet":"SHOOT_THREE", "number":"01495", "qty":"1", "bet_amount":"0", "payout_amount":"100"}
                    ]    
               }
          },
          {
               "player_id": "1111111",
               "payout_amount": 0,
               "currency": "THB",
               "transaction_code": "GBL01", // GBW01=win, GBL01=loss
               "transaction_id": "0", // เลขอ้างอิงในการทำรายการจ่าย เช่น record ที่บันทึกการจ่าย
               "round_id": "xxxx:1659974366095:4b3afhl6kxvma7",
               "created_at": "2024-09-17T13:28:21.200Z",
               "remark": "Yeekee #1 2023-10-09 00:15",
               "game_key": "yeekee",
               "player_bet": {
                    "data": [
                            {"bet":"THREE_TOP", "number":"123", "qty":"1", "bet_amount":"10"},
                             
                  ]
               },
               "player_bet_result": {},    
          }
     ],
     "pagination": {
        "total": 2,
        "per_page": 20,
        "page": 1
    }
}

Lotto result inquiry by user

GET https://{api-domain}/api/operator/lotto/result-inquiry-by-user

ใช้สำหรับดึงข้อมูลผลการออกรางวัลหวย Yeekee และ Lucky 1 dollar ของแต่ละผู้เล่น

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Required

round_id

string

เลขที่ของเกมส์ที่วางเดิมพัน

Yes

player_id

string

user id ของระบบโอเปอเรเตอร์

Yes

Response

HTTP Status: 200 OK
Content-Type: application/json
{
     "status": "success",
     "round_id": "xxxx:1659974366095:4b3afhl6kxvma7",
     "round": {"no":"1", "result_date":"2023-10-09T17:15:00.000Z"},
     "game_result": {
          "data": {
               "WINNING_NUMBER": ["1002558"],
               "SHOOT_NUMBER": ["1041053"],
               "SYSTEM_NUMBER": ["38495"],
               "THREE_TOP": ["558"],
               "THREE_MIX": ["558","585","855"],
               "TWO_TOP": ["58"],
               "TWO_UNDER": ["02"],
               "ONE_TOP": ["5","8"],
               "ONE_UNDER": ["0","2"]
          }
      },
     "player": {
        "player_id": "1111111",
        "payout_amount": 9932,
        "currency": "THB",
        "transaction_code": "GBW01", // GBW01=win, GBL01=loss
        "transaction_id": "1231231312313", // เลขอ้างอิงในการทำรายการจ่าย เช่น record ที่บันทึกการจ่าย
        "round_id": "xxxx:1659974366095:4b3afhl6kxvma7",
        "created_at": "2024-09-17T13:28:21.200Z",
        "remark": "Yeekee #1 2023-10-09 00:15",
        "game_key": "yeekee",
        "player_bet": {
            "data": [
                {"bet":"THREE_TOP", "number":"558", "qty":"1", "bet_amount":"10"},
                {"bet":"THREE_MIX", "number":"123", "qty":"1", "bet_amount":"10"},
                {"bet":"TWO_TOP", "number":"58", "qty":"1", "bet_amount":"10"},
                {"bet":"TWO_UNDER", "number":"23", "qty":"1", "bet_amount":"10"},
                {"bet":"ONE_TOP", "number":"5", "qty":"1", "bet_amount":"10"},
                {"bet":"ONE_UNDER", "number":"8", "qty":"1", "bet_amount":"10"}
            ]
        },
        "player_bet_result": {
            "win": [
                {"bet":"THREE_TOP", "number":"558", "qty":"1", "bet_amount":"10", "payout_amount":"9000"},
                {"bet":"TWO_TOP", "number":"58", "qty":"1", "bet_amount":"10", "payout_amount":"900"},
                {"bet":"ONE_TOP", "number":"5", "qty":"1", "bet_amount":"10", "payout_amount":"32"}
            ]    
        }
    }
}

Last updated