Skip to main content

2. API Methods

2.1 API Formats

2.1.1 Request

The external API uses HTTP form methods and a RESTful endpoint structure. You format requests in the following content type:
Content-Type: application/x-www-form-urlencoded

2.1.2 Response

API returns JSON-formatted responses. For successful and failed API request, operator is required to return an API response with HTTP status code 200.

API uses global JSON response format for all API methods, with the following content type:
Content-Type: application/json

Parameters:

Parameter nameData typeDescription
data1JSON ObjectResponse information for API methods
error2JSON ObjectError information when an error or exception occurs

Example: Successful Response

{
"data": {
_[API method response. JSON object format may vary depending on API methods]_
},
"error": null,
}

Failed/Error Response

{
"data": null,
"error": {
"code": " _[Error code]_ ",
"message": " _[Error message]_ "
}
}

2.1.3 Hash Authentication (Optional)

We highly recommend that the operator integrate hash authentication to secure every request. If the operator chooses to integrate with hash authentication, PG system will validate the hash information provided in the header fields for every request.

2.1.3.1 Header Fields

The following table describes the various request headers in the preceding example:

ComponentDescription
HostAPI domain
Example: apiexample.pgsoft.com
x-dateCurrent date (UTC) in YYYYMMDD format
Example: 20190902
x-content-sha256SHA256 hash of the request string body
Example: 1700116101f424b9f6fc695b4dbaf2b7b0ee763ba1b3b53298e3069143ed46f1
AuthorizationCombination of various components for request authentication
Example:
PWS-HMAC-SHA256 Credential=20190902/OPERATORTOKENEXAMPLE/pws/v1, SignedHeaders=host;x-content-sha256;x-date,Signature=d78220cf06ae85f9d1db11dad9c3fd926799619eab3d28574aadb8cf328cd7aa

Example

Host:
apiexample.pgsoft.com
x-date: 20190902
x-content-sha256: 1700116101f424b9f6fc695b4dbaf2b7b0ee763ba1b3b53298e3069143ed46f1
Authorization: PWS-HMAC-SHA
Credential=20190902/OPERATORTOKENEXAMPLE/pws/v1,SignedHeaders=host;x-content-sha256;x-date,Signature=d78220cf06ae85f9d1db11dad9c3fd926799619eab3d28574aadb8cf328cd7aa

Header: x-content-sha256
Calculate a SHA256 hash of the request string body:
Example
POST body:

operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&bet_type=1&row_version=1346592723000 

x-content-sha256:

1700116101f424b9f6fc695b4dbaf2b7b0ee763ba1b3b53298e3069143ed46f1

Header: Authentication The following table describes the various components of the Authorization header value in the preceding example:

ComponentDescription
CredentialYour access key ID and the scope information which includes the date, operator token and service that were used to calculate the signature.
This string has the following form:
{x-date}/{operator_token}/pws/v1
Example:
20190902/OPERATORTOKENEXAMPLE/pws/v1
SignedHeadersA semicolon-separated list of request headers that you will use to compute the Signature. The list includes header names only, and the header names must be in lowercase.
Fixed Value:
host;x-content-sha256;x-date
SignatureThe 256-bit signature expressed as 64 lowercase hexadecimal characters.
Example:
d78220cf06ae85f9d1db11dad9c3fd926799619eab3d28574aadb8cf328cd7aa

To calculate a signature, you first need a string that includes {host}{x-content-sha256}{x- date} to sign. You will then calculate a HMAC-SHA256 hash of the string to sign by using a signing key:

hmac-sha256({salt}, {host}{x-content-sha256}{x-date})

Calculate a HMAC-SHA256 hash of the string body:

Example

Salt : SALTEXAMPLE
Host : apiexample.pgsoft.com
x-date : 20190902
x-content-sha256 :
1700116101f424b9f6fc695b4dbaf2b7b0ee763ba1b3b53298e3069143ed46f

Signature:

d78220cf06ae85f9d1db11dad9c3fd926799619eab3d28574aadb8cf328cd7aa

2.2 Free Game [Latest version: v1]

2.2.1 Get Free Games List

To get the list of created free games.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetFreeGames
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
from_timeLongYesTime range of free games' start times (Unix time stamp in milliseconds)
to_timeLongYesTime range of free games' end times (Unix time stamp in milliseconds)
free_game_idIntegerNoUnique identity of free game
Default: All free games
currencyStringNoCurrency of free game
Default: All currencies of free games
free_game_nameStringNoGiven name of free game
Default: All given names of free games
free_game_transfer_typeIntegerNoTransfer type for free game
0: Standard
3: Flexible
Default: All transfer types
conversion_typeCharNoType of conversion after free game is completed:
C: Cash
B: Bonus
Default: : All conversion types
statusIntergerNoStatus of free game:
0: Inactive
1: Active
2: Expired
Default: : All status

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetFreeGames?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&from_time=1346592723000&to_time=1546592723000&free_game_id=12345&currency=CNY&free_game_name=freegame2019&free_game_transfer_type=1&conversion_type=C&status=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of free games

JSON Array

Parameter nameData typeDescription
operatorTokenStringUnique identity of operator
freeGameIdIntegerUnique identity of free game
freeGameNameStringGiven name of free game
transaction_idStringUnique identity of transaction
isEventBooleanType of free game:
   True: Flexible
   False: Standard
gameIdsInteger ArrayUnique identity of games
totalGameIntegerTotal number of free games that will be given to a single player
currencyCodeStringCurrency of free game
coinSizeDecimalCoin size of free game
multiplierIntegerBet multiplier of free game
minimumConversionAmountDecimalThe minimum cash conversion amount of free game
maximumConversionAmountDecimalThe maximum cash conversion amount of free game
Parameter nameData typeDescription
conversionTypeCharType of conversion after free game is completed:
   C: Cash
   B: Bonus
bonusRatioDecimalWagering requirement for bonus game.
Refers to the multiple of the turnover in the free game that needs to be completed after the amount won in the free game has been transferred to the bonus wallet
bonusRatioAmountDecimalWagering requirement for bonus game.
Refers to the total amount that needs to be completed after the amount won in the free game has been transferred to the bonus wallet
bonusMinimumConversionAmountDecimalThe minimum cash conversion amount of bonus game
bonusMaximumConversionAmountDecimalThe maximum cash conversion amount of bonus game
bonusTypeIntegerBonus game conversion type:
   0: Bonus
   1: Cash
   2: Bonus & Cash
statusIntegerStatus of free game:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
freeGameCountGivenIntegerTotal number of given free games
numberOfPlayersIntegerTotal number of players in free game
expiredDateLongExpiry date of free game (Unix time stamp in milliseconds)
createdDateLongCreated date of free game (Unix time stamp in milliseconds)
createdByStringAPI or BackOffice user who created the free game
updatedByStringAPI or BackOffice user who updated the free game
isSupressDiscardBooleanPermission to allow players to cancel offer
   True: Do not allow player to cancel offer
   False: Allows player to cancel offer

Example:

{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"operatorToken": "abcd",
"freeGameId": 1,
"freeGameName": "free game1",
"transactionId": "12345Test",
"isEvent": false,
"gameIds": [
1
],
"totalGame": 20,
"currencyCode": "USD",
"coinSize": 0.05,
"multiplier": 2,
"minimumConversionAmount": 1000,
"maximumConversionAmount": 1000,
"conversionType": "B",
"bonusRatio": 2,
"bonusRatioAmount": 0,
"bonusMinimumConversionAmount": 1000,
"bonusMaximumConversionAmount": 1500,
"bonusType": 0,
"status": 2,
"freeGameCountGiven": 0,
"numberOfPlayers": 0,
"expiredDate": 1499764521000,
"createdDate": 1498036782000,
"createdBy": "player1",
"updatedBy": "player1",
"isSupressDiscard": true
},
{
"operatorToken": "abcd",
"freeGameId": 2,
"freeGameName": "free game2",
"transactionId": "12345Test2",
"isEvent": false,
"gameIds": [
1
],
"totalGame": 20,
"currencyCode": "USD",
"coinSize": 0.05,
"multiplier": 2,
"conversionType": "C",
"bonusRatio": 0,
"bonusRatioAmount": 0,
"status": 1,
"freeGameCountGiven": 0,
"numberOfPlayers": 0,
"expiredDate": 1499732101000,
"createdDate": 1498114200000,
"createdBy": "player1",
"updatedBy": "player1",
"isSupressDiscard": true
}
]
},
"error": null
}

2.2.2 Get List of Free Game Converted to Bonus Game/Cash

To get list of free games that has been converted to bonus game or cash.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetFreeGameConvertedWallet
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
free_game_idIntegerYesUnique identity of free game
from_transaction_timeLongYesTime range of free game player's transactions (Unix time stamp in milliseconds)
to_transaction_timeLongYesTime range of free game player's transactions (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of player
Note: Fuzzy matching is implemented
Default: All players

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetFreeGameConvertedWallet?trace_id=b3f37e57- 2873 - 40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&free_game_id=12345&player_name=player1&from_transaction_time=1346592723000&to_transaction_time=1346592723000

Response
Body Parameters:
JSON Object

Parameter nameData TypeDescription
totalConvertedAmountDecimalTotal amount that has been converted to cash in free game
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of free games

JSON Array

Parameter nameData TypeDescription
balanceIdIntegerUnique identity of player's free game wallet
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
gameIdIntegerUnique identity of game
transactionAmountDecimalAmount converted of player
transactionDateTimeLongTime of convert
(Unix time stamp in milliseconds)
{
"data": {
"totalConvertedAmount": 10,
"totalCount": 1,
"totalPage": 1,
"result": [
{
"balanceId": 13787,
"playerName": "qa18",
"currencyCode": "CNY",
"gameId": 8,
"transactionAmount": 10,
"transactionDateTime": 1547449915000
},
{
"balanceId": 13788,
"playerName": "qa18",
"currencyCode": "CNY",
"gameId": 8,
"transactionAmount": 10,
"transactionDateTime": 1547449915100
}
]
},
"error": null
}

2.2.3 Get List of Free Games that have Converted to Bonus Game then Cash

To get the list of games that were converted from a free game to a bonus game, and then from bonus game to cash.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetFreeGameBonusConvertedWallet
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
free_game_idIntegerYesUnique identity of free game
from_transaction_timeLongYesTime range of free game player's transactions (Unix time stamp in milliseconds)
to_transaction_timeLongYesTime range of free game player's transactions (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of player
Note: Fuzzy matching is implemented
Default: All players

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetFreeGameConvertedWallet?trace_id=b3f37e57- 2873 - 40b1-aa95-f126c25ed311

Body:

operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&free_game_id=12345&player_name=player1&from_transaction_time=1346592723000&to_transaction_time=1346592723000

Response
Body Parameters:
JSON Object

Parameter nameData TypeDescription
totalConvertedAmountDecimalTotal amount that has been converted to cash in free game
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of free game players’ details

JSON Array

Parameter nameData TypeDescription
balanceIdIntegerUnique identity of player's free game wallet
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
gameIdIntegerUnique identity of game
transactionAmountDecimalAmount converted of player
transactionDateTimeLongTime of convert
(Unix time stamp in milliseconds)
{
"data": {
"totalConvertedAmount": 20,
"totalCount": 2,
"totalPage": 1,
"result": [
{
"balanceId": 13787,
"playerName": "qa18",
"currencyCode": "CNY",
"gameId": 8,
"transactionAmount": 10,
"transactionDateTime": 1547449915000
},
{
"balanceId": 13788,
"playerName": "qa18",
"currencyCode": "CNY",
"gameId": 8,
"transactionAmount": 10,
"transactionDateTime": 1547449915100
}
]
},
"error": null
}

2.2.4 Get Free Game Players List

To get list of registered players of a free game.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetFreeGamePlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
free_game_idIntegerYesUnique identity of free game
from_timeLongYesTime range of free games' start times (Unix time stamp in milliseconds)
to_timeLongYesTime range of free games' end times (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of free game player
Note: Fuzzy matching is implemented
Default: All players
statusIntegerNoStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
Default: All status

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetFreeGamePlayers?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&p
layer_name=player1&from_time=1346592723000&to_time=1546592723000&free_game_id=1234
5&status=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of free games

JSON Array

Parameter nameData typeDescription
balanceIdIntegerUnique identity of player's free game wallet
playerIdIntegerUnique identity of player in free game
playerNameStringUnique identity of player in free game
walletTypeStringType of player wallet in free game:
   G: Free Game
   B: Bonus
balanceAmountDecimalPlayer balance of free game
bonusRatioAmountDecimalWagering requirement for bonus game.
Refers to the total amount that needs to be completed after the amount won in the free game has been transferred to the bonus wallet
bonusMaximumConversionAmountDecimalMaximum conversion amount for free game's bonus
freeGameMaximumConversionAmountDecimalMaximum conversion amount for free game
freeGameCountIntegerThe player's number of free games
statusIntegerStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
expiredDateLongExpiry date of free game
(Unix time stamp in milliseconds)
createdByStringAPI or BackOffice user who created the free game
updatedByStringAPI or BackOffice user who updated the free game
updatedDateLongDate of when a player is registered or re-registered into the free game
(Unix time stamp in milliseconds)
createdDateLongDate of when a player is registered into the free game
(Unix time stamp in milliseconds)

Example:

{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"balanceId": 111261,
"playerId": 7443,
"playerName": "player1",
"walletType": "B",
"balanceAmount": 874.4,
"bonusRatioAmount": 874.4,
"bonusMaximumConversionAmount": 0,
"freeGameMaximumConversionAmount": 0,
"expiredDate": 1546991999000,
"status": 2,
"createdBy": "operator",
"updatedBy": "operator",
"createdDate": 1546923615000,
"updatedDate": 1546991999000
},
{
"balanceId": 111252,
"playerId": 7443,
"playerName": "player2",
"walletType": "G",
"balanceAmount": 8.8,
"bonusMaximumConversionAmount": 0,
"freeGameMaximumConversionAmount": 0,
"freeGameCount": 6,
"expiredDate": 1546991999000,
"status": 6,
"createdBy": "operator",
"updatedBy": "operator",
"createdDate": 1546918715000,
"updatedDate": 1547028195000
}
]
},
"error": null
}

2.2.5 Get List of Unregistered Players in Free Game

To get list of unregistered players in free game.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetFreeGamePendingPlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
free_game_idIntegerYesUnique identity of free game's unregistered player
player_nameStringNoUnique identity of free game player
Note: Fuzzy matching is implemented
Default: All players
statusIntegerNoStatus of wallet of unregistered player:
   0: Inactive (Cancelled)
   1: Pending
   2: Transferred
Default: All status

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetFreeGamePendingPlayers?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&free_game_id=12345&status=1

Response
Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of unregistered players in a free game

JSON Array

Parameter nameData typeDescription
pendingWalletIdIntegerUnique identity of free game's player's pending wallet
playerNameStringUnique identity of free game's un-registered player
statusIntegerStatus of unregistered player's wallet:
   0: Inactive (Cancelled)
   1: Pending
   2: Transferred
updatedDateLongDate of when a player is registered or re-registered into the free game (Unix time stamp in milliseconds)
createdDateLongDate of when a player is registered into the free game (Unix time stamp in milliseconds)
createdByStringAPI or BackOffice user who registered the player
updatedByStringAPI or BackOffice user who register or re-registered player

Example:

{
"data": {
"totalCount": 2,
"totalPage": 1,
"result": [
{
"pendingWalletId": 140392,
"playerName": "eddywang9999",
"status": 1,
"createdDate": 1554351552000,
"updatedDate": 1554351552000,
"createdBy": "External API",
"updatedBy": "External API"
},
{
"pendingWalletId": 140393,
"playerName": "eddywang99999",
"status": 1,
"createdDate": 1554351682000,
"updatedDate": 1554351682000,
"createdBy": "External API",
"updatedBy": "External API"
}
]
},
"error": null
}

2.2.6 Get All Player Details for Free Game

To get details of all players in a free game.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetFreeGameAllPlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesTotal amount that has been converted to cash in free game
secret_keyStringYesTotal amount that has been wagered in free game
page_numberIntegerYesTotal amount that has been won in free game
row_countIntegerYesTotal amount that has been refunded to players in free game
free_game_idIntegerYesTotal amount of bonus that has been converted to cash in free game
from_timeLongYesTotal amount of bonus that has been wagered in free game
to_timeLongYesTotal amount of bonus that has been won in free game
player_nameStringNoTotal amount of bonus that has been refunded to players in free game
statusIntegerNoTotal amount that has been converted to cash from the original wallet in free game

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetFreeGameAllPlayers?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&from_time=1346592723000&to_time=1546592723000&free_game_id=12345&status=1

Response
Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of all players in a free game

JSON Array

Parameter nameData TypeDescription
balanceIdIntegerUnique identity of player's free game wallet
playerIdIntegerUnique identity of free game's player
playerNameStringUnique identity of free game's player
walletTypeStringType of player wallet in free game:
   G: Free Game
   B: Bonus
balanceAmountDecimalPlayer balance of unconverted free game, or
converted amount of converted free game
bonusRatioAmountDecimalWagering requirement for bonus game.
Refers to the total amount that needs to be completed after the amount won in free game has been transferred to the bonus wallet
bonusMinimumConversionAmountDecimalMinimum conversion amount for free game's bonus
bonusMaximumConversionAmountDecimalMaximum conversion amount for free game's bonus
freeGameMaximumConversionAmountDecimalMaximum conversion amount for free game
statusIntegerStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
expiredDateLongExpiry date of free game (Unix time stamp in milliseconds)
updatedDateLongDate of when a player is registered or re-registered into the free game (Unix time stamp in milliseconds)
createdDateLongDate of when a player is registered into the free game (Unix time stamp in milliseconds)

Example:

{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"balanceId": 111261,
"playerId": 7443,
"playerName": "player1",
"walletType": "B",
"balanceAmount": 874.4,
"bonusRatioAmount": 874.4,
"bonusMinimumConversionAmount": 0,
"bonusMaximumConversionAmount": 0,
"freeGameMaximumConversionAmount": 0,
"expiredDate": 1546991999000,
"status": 2,
"createdDate": 1546923615000,
"updatedDate": 1546991999000
},
{
"balanceId": 111252,
"playerId": 7443,
"playerName": "player2",
"walletType": "G",
"balanceAmount": 8.8,
"bonusMinimumConversionAmount": 0,
"bonusMaximumConversionAmount": 0,
"freeGameMaximumConversionAmount": 0,
"freeGameCount": 6,
"expiredDate": 1546991999000,
"status": 6,
"createdDate": 1546918715000,
"updatedDate": 1547028195000
}
]
},
"error": null
}

2.2.7 Get Single Player Details in Free Game

To get the details of a single player in a free game.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/GetPlayerFreeGames
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
player_nameStringYesUnique identity of free game's unregistered player
statusIntegerNoStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
Default: All status

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/GetPlayerFreeGames?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&status=1&status=2

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of free games of a single player

JSON Array

Parameter nameData TypeDescription
freeGameIdIntegerUnique identity of free game
freeGameNameStringGiven name of free game
transactionIdStringUnique identity of transaction
gameIdsInteger ArrayUnique identity of games
gameCountIntegerTotal number of given free games
totalGameIntegerTotal number of free games that will be given to a single player
balanceAmountDecimalPlayer balance of unconverted free game, or converted amount of converted free game
minimumConversionAmountDecimalMinimum conversion amount for free game
maximumConversionAmountDecimalMaximum conversion amount for free game
multiplierIntegerBet multiplier of free game
coinSizeDecimalCoin size of free game
expiredDateLongExpiry date of free game (Unix time stamp in milliseconds)
createdDateLongCreated date of free game (Unix time stamp in milliseconds)
createdByStringAPI or BackOffice user who created the free game
updatedByStringAPI or BackOffice user who updated the free game
isSupressDiscardBooleanPermission to allow players to cancel offer:
   True: Do not allow player to cancel offer
   False: Allows player to cancel offer
statusIntegerStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
conversionTypeCharType of conversion after free game is completed
   C: Cash
   B: Bonus

Example:

{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"freeGameId": 909,
"freeGameName": "Free Game 1",
"gameIds": [
25
],
"gameCount": 10,
"totalGame": 5,
"balanceAmount": 0,
"transactionId": "12345Test",
"minimumConversionAmount": 1,
"maximumConversionAmount": 500,
"multiplier": 10,
"coinSize": 10,
"expiredDate": 1552089599000,
"status": 2,
"conversionType": "B",
"createdDate": 1498036782000,
"createdBy": "player1",
"updatedBy": "player1",
"isSupressDiscard": true
},
{
"freeGameId": 864,
"freeGameName": "Free Game 2",
"gameIds": [
6
],
"gameCount": 55,
"totalGame": 50,
"balanceAmount": 0,
"transactionId": "12345Test",
"minimumConversionAmount": 1,
"maximumConversionAmount": 500,
"multiplier": 1,
"coinSize": 1,
"expiredDate": 1556672461000,
"status": 5,
"conversionType": "C",
"createdDate": 1498036782000,
"createdBy": "player1",
"updatedBy": "player1",
"isSupressDiscard": true
}
]
},
"error": null
}

2.2.8 Create Free Game

To create a new free game.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/CreateFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
currencyStringYesCurrency of free game
free_game_nameStringYesGiven name of free game
expired_dateLongYesExpiry date of free game (Unix time stamp in milliseconds)
bonus_minimum_conversion_amountDecimalNo*Minimum conversion amount for bonus
NULL: No limit for conversion amount
bonus_maximum_conversion_amountDecimalNo*Maximum conversion amount for bonus
NULL: No limit for conversion amount
minimum_conversion_amountDecimalNoMinimum conversion amount for free game
NULL: No limit for conversion amount
maximum_conversion_amountDecimalNoMaximum conversion amount for free game
NULL: No limit for conversion amount
bonus_typeIntegerNo*Bonus wagering condition
0: Bonus
1: Cash
2: Bonus & Cash
bonus_ratioDecimalNo*Wagering requirement for bonus game.
Refers to the multiple of the turnover in the free game that needs to be completed after the amount won in free game has been transferred to the bonus wallet
Turnover = bonus ratio x converted bonus amount
conversion_typeCharYesType of conversion after free game is completed:
   C: Cash
   B: Bonus
multiplierIntegerYesBet multiplier of free game
coin_sizeDecimalYesCoin size of free game
game_countIntegerYesTotal number of free games that will be given to each player
game_idsInteger ArrayYesUnique identity of games
(Note: Only games with same base bet are accepted)
is_eventBooleanYesType of free game:
   True: Flexible
   False: Standard
player_nameStringNoUnique identity of player. System will create free game and assign to this player directly.
Note: Free game type will be standard mode if player_name is provided
transaction_idStringYesUnique identity of transaction.
Note: System will return a corresponding free game id for a duplicated transaction
non_discardableBooleanNoTo prevent player to discard the offer:
   True: Not Allow player to discard the offer
   False: Allow player to discard the offer (Default)

*Only applicable for bonus conversion type

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/CreateFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&currency=CNY&free_game_name=FreeGame2019&expired_date=1745289243000&status=1&bonus_maximum_conversion_amount=10&maximum_conversion_amount=1&bonus_type=1&conversion_type=B&multiplier=5&coin_size=20&game_count=20&game_ids=1&game_ids=2&is_event=true&player_name=player1&transaction_id=12345&non_discardable=False

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
freeGameIdIntegerUnique identity of free game

Example:

{
"data": {
"freeGameId ": 10915
},
"error": null
}

2.2.9 Create Free Game by Bet Amount

To create a new free game using the desired bet amount.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/CreateFreeGameByBetAmount
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
currencyStringYesCurrency of free game
free_game_nameStringYesGiven name of free game
expired_dateLongYesExpiry date of free game (Unix time stamp in milliseconds)
bonus_minimum_conversion_amountDecimalNo*Minimum conversion amount for bonus
NULL: No limit for conversion amount
bonus_maximum_conversion_amountDecimalNo*Maximum conversion amount for bonus
NULL: No limit for conversion amount
minimum_conversion_amountDecimalNoMinimum conversion amount for free game
NULL: No limit for conversion amount
maximum_conversion_amountDecimalNoMaximum conversion amount for free game
NULL: No limit for conversion amount
bonus_typeIntegerNo*Bonus wagering condition
0: Bonus
1: Cash
2: Bonus & Cash
bonus_ratioDecimalNo*Wagering requirement for bonus game.
Refers to the multiple of the turnover in the free game that needs to be completed after the amount won in the free game has been transferred to the bonus wallet
Turnover = bonus ratio x converted bonus amount
Note: This is not applicable to Cash conversions.
conversion_typeCharYesType of conversion after the free game is completed:
   C: Cash
   B: Bonus
bet_amountDecimalYesDesired bet amount for each game.
Note: System will round down to the closest multiplier and coin size automatically.
game_countIntegerYesTotal number of free games that will be given to each player
game_idsInteger ArrayYesUnique identity of games
Note: Only games with the same base bet are accepted.
is_eventBooleanYesType of free game:
   True: Flexible
   False: Standard
player_nameStringNoUnique identity of player. The system will create a free game and assign it to this player directly.
Note: Free game type will be standard mode if player_name is provided.
transaction_idStringYesUnique identity of transaction.
Note: The system will return a corresponding free game ID for a duplicate transaction.
non_discardableBooleanNoTo prevent players from discarding the offer:
   True: Do not allow the player to discard the offer
   False: Allow the player to discard the offer (Default)

*Only applicable for bonus conversion type

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/CreateFreeGameByBetAmount?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&currency=CNY&free_game_name=FreeGame2019&expired_date=1745289243000&status=1&bonus_maximum_conversion_amount=10&maximum_conversion_amount=1&bonus_type=1&conversion_type=B&bet_amount=0.6&game_count=20&game_ids=1&game_ids=2&is_event=true&player_name=player1&transaction_id=12345&non_discardable=False

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
freeGameIdIntegerUnique identity of free game

Example:

{
"data": {
"freeGameId ": 10915
},
"error": null
}

2.2.10 Transfer Player to Standard Free Game

To add players into a standard free game.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/TransferInFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
free_game_idIntegerYesUnique identity of free game
player_namesString ArrayYesUnique identity of players
transfer_referenceStringYesUnique identity of transfer

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/TransferInFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&free_game_id=12&player_names=player1&player_names=player2&transfer_reference=freegame_20181128

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
transactionIdStringUnique identity of transaction
operatorTokenStringUnique identity of operator
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
statusIntegerStatus of transfer request:
     0: Failed
     1: Successful
     2: Pending (For non-existent player, free game will be assigned to the player automatically after player is created.)

Example:

{
"data": [
{
"transactionId": 10,
"operatorToken": "abc123",
"playerName": "player1",
"currencyCode": "CNY",
"status": 1
},
{
"transactionId": 1,
"operatorToken": "1234",
"playerName": "player2",
"currencyCode": "CNY",
"status": 1
}
],
"error": null
}

2.2.11 Transfer Player to Flexible Free Game

To add players into a standard free game.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/TransferInFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_free_gamesJSON String ArrayYesThe free game details that have been overridden for a single player
free_game_idIntegerYesUnique identity of free game
transfer_referenceStringYesUnique identity of transfer
allow_multipleBooleanYesAllows player to re-register.
True: No. of times a player can re-register in a free game.
False: Player is only allowed to register once in a free game.

player_free_games JSON String:

Parameter nameData typeMandatoryDescription
player_nameStringYesUnique identity of operator
free_game_countIntegerYesFree game count that can be overridden
for player
Value range: Value ≥ 1
is_unlimited_bonus_maximum_conversion_amountBoolYesSets bonus maximum conversion amount to unlimited
is_unlimited_free_game_maximum_conversion_amountBoolYesSets free game maximum conversion amount to unlimited
bonus_minimum_conversion_amountDecimalNo*Bonus minimum conversion amount that can be overridden for a player
Value range: Value ≥ 1
Default value: 0
Note: System will use default conversion amount if value = 0
bonus_maximum_conversion_amountDecimalNo*Bonus maximum conversion amount that can be overridden for a player
Value range: Value ≥ 1
Default value: 0
Note: System will use default conversion amount if value = 0
free_game_minimum_conversion_amountDecimalNo**Free game minimum conversion amount that can be overridden for a player
Value range: Value ≥ 1
Default value: 0
Note: System will use default conversion amount if value = 0
free_game_maximum_conversion_amountDecimalNo**Free game maximum conversion amount that can be overridden for a player
Value range: Value ≥ 1
Default value: 0
Note: System will use default conversion amount if value = 0
descriptionStringNoReference note for transfer

*Only applicable if is_unlimited_bonus_maximum_conversion_amount parameter value is false
**Only applicable if is_unlimited_free_game_maximum_conversion_amount parameter value is false

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/TransferInFlexibleFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_free_games={"player_name":"player1","free_game_count":10,"is_unlimited_bonus_maximum_conversion_amount":false,"is_unlimited_free_game_maximum_conversion_amount":false,"bonus_maximum_conversion_amount":100.50,"free_game_maximum_conversion_amount":100.50,"description":"VIP"}&free_game_id=3&transfer_reference=freegame_20181128&allow_multiple=false

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
transactionIdStringUnique identity of transaction
operatorTokenStringUnique identity of operator
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
freeGameCountIntegerNumber of player free games
statusIntegerStatus of transfer request:
     0: Failed
     1: Successful
     2: Pending (For non-existent player, free game will be assigned to the player automatically after player is created.)

Example:

{
"data": [
{
"transactionId": 10,
"operatorToken": "abc123",
"playerName": "player1",
"currencyCode": "CNY",
"freeGameCount": 10,
"status": 1
},
{
"transactionId": 1,
"operatorToken": "1234",
"playerName": "player2",
"currencyCode": "CNY",
"freeGameCount": 10,
"status": 1
}
],
"error": null
}

2.2.12 Cancel Free Game

To cancel a created free game.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/CancelFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
free_game_idStringYesUnique identity of free game
transaction_idString(Either one)Unique identity of transaction

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/CancelFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&free_game_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.2.13 Cancel Free Game of a Player

To cancel a free game of a specific player.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/CancelPlayerFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of player
balance_idIntegerYesUnique identity of player’s free game wallet

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/CancelPlayerFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player1&balance_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.2.14 Cancel Free Game of an Unregistered Player

To cancel a free game of a specific player.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/CancelPendingPlayerFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
pending_wallet_idIntegerYesUnique identity of player’s free game wallet

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/CancelPendingPlayerFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&pending_wallet_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.2.15 Cancel All Free Games of a Player

To cancel all free games of a player.

Request

API URL : {PgSoftAPIDomain}/FreeGame/v1/CancelPlayerAllFreeGame
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of player
free_game_idIntegerYesUnique identity of free game

Example:
URL:

https://api.pg-bo.me/external/FreeGame/v1/CancelPlayerAllFreeGame?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player1&free_game_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.2.16 Get Free Game Player Summary

To get free game player summary.

Request

API URL : {DataGrabAPIDomain}/FreeGame/v1/GetFreeGamePlayerSummary
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
row_versionLongNoUpdated time of data (Unix time stamp in milliseconds)
Default value: 1
player_nameStringNoUnique identity of player
Default: All players
row_countIntegerNoNumber of records for each batch
Note:
Default value: 1
Value range: 1-5000
currencyStringNoCurrency of player
Default: All currencies of player
free_game_idIntegerNoUnique identity of free game
Default: All free games

Example:
URL:

https://api.pg-bo.me/external-datagrabber/FreeGame/v1/GetFreeGamePlayerSummary?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&row_version=1346592723000&player_name=testplayer1&row_count=10&currency=CNY&free_game_id=12345

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
lastRowVersionLongUpdated time of data (Unix time stamp in milliseconds)
resultJSON ArrayList of the result

JSON Array

Parameter nameData typeDescription
freeGameIdUlongUnique identity of free game Id
freeGameParentIdUlongUnique identity of free game parent Id
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
totalFreeGameIntegerTotal number of given free games
coinSizeDecimalBet size of game
multiplierIntegerBet multiplier of free game
payoutDecimalConvert to cash amount of free game
remainCountIntegerTotal number of remain free games
conversionTypeCharType of conversion after free game is completed:
     C: Cash
     B: Bonus
statusIntegerStatus of free game:
     0: Inactive
     1: Active
     2: Expired
     3: Converted
     4: Completed
     5: New
     6: User Cancelled
     8: Pending
createdTimeLongFree game created time
updatedTimeLongFree game updated time

Example:

{
"data": {
"lastRowVersion": 1526371744000,
"result": [
{
"freeGameId": 2,
"freeGameParentId": 2,
"playerName": "qa1",
"currencyCode": "CNY",
"totalFreeGame": 1,
"coinSize": 0.01,
"multiplier": 10,
"payout": 0,
"remainCount": 1,
"conversionType": "Bonus",
"status": 0,
"createdTime": 1526371189000,
"updatedTime": 1526371744000
}
]
},
"error": null
}

2.3 Bonus [Latest version: v1]

2.3.1 Get Bonus Game List

To get the created bonus games list.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/GetBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
from_timeLongYesTime range of bonus games' start times (Unix time stamp in milliseconds)
to_timeLongYesTime range of bonus games' end times (Unix time stamp in milliseconds)
bonus_idIntegerNoUnique identity of bonus game
Default: All bonus games
currencyStringNoCurrency of bonus game
Default: All currencies of bonus games
bonus_nameStringNoGiven name of bonus game
Default: All given name of bonus games
bonus_transfer_typeIntegerNoTransfer type for bonus game:
0: Standard
3: Flexible
Default: All transfer types
statusIntegerNoStatus of bonus game:
0: Inactive
1: Active
2: Expired
Default: All status

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/GetBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&from_time=1346592723000&to_time=1546592723000&bonus_id=12345&currency=CNY&bonus_name=BonusGame2019&bonus_transfer_type=1&status=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of details of multiple bonus games

JSON Array

Parameter nameData typeDescription
operatorTokenStringUnique identity of operator
bonusIdIntegerUnique identity of bonus game
bonusNameStringGiven name of bonus game
isEventBooleanType of bonus game:
     True: Flexible
     False: Standard
gameIdsInteger ArrayUnique identity of games
currencyCodeStringCurrency of bonus game
bonusRatioDecimalWagering requirement for bonus game.
     Refers to the multiple of the turnover that needs to be completed
bonusRatioAmountDecimalWagering requirement for bonus game.
     Refers to the total amount that needs to be completed
bonusMinimumConversionAmountDecimalThe minimum cash conversion amount of free game
bonusMaximumConversionAmountDecimalThe maximum cash conversion amount of free game
bonusTypeIntegerBonus game wagering condition:
     0: Bonus
     1: Cash
     2: Bonus & Cash
statusIntegerStatus of bonus game:
     0: Inactive (Cancelled)
     1: Active
     2: Expired
bonusAmountGivenDecimalTotal amount of bonus given
numberOfPlayersIntegerTotal number of players in bonus game
expiredDateLongExpiry date of bonus game (Unix time stamp in milliseconds)
createdDateLongCreated date of bonus game (Unix time stamp in milliseconds)
isSuppressDiscardBooleanPermission to allow players to cancel offer:
   True: Do not allow player to cancel offer
   False: Allows player to cancel offer

Example:

{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"operatorToken": "abcd",
"bonusId": 118,
"bonusName": "bonus118",
"bonusType": 0,
"isEvent": false,
"gameIds": [
1
],
"amount": 57000,
"currencyCode": "MYR",
"bonusRatio": 3,
"bonusRatioAmount": 171000,
"bonusMinimumConversionAmount": 1000,
"bonusMaximumConversionAmount": 1500,
"status": 1,
"numberOfPlayers": 0,
"bonusAmountGiven": 0,
"createdDate": 1497001371000,
"isSuppressDiscard": false
},
{
"operatorToken": "abcd",
"bonusId": 119,
"bonusName": "bonus119",
"bonusType": 0,
"isEvent": false,
"gameIds": [
1
],
"amount": 500,
"currencyCode": "USD",
"bonusRatio": 2,
"bonusRatioAmount": 1000,
"status": 1,
"numberOfPlayers": 1,
"bonusAmountGiven": 0,
"createdDate": 1497239059000
}
]
},
"error": null
}

2.3.2 Get List of Bonus Games Converted to Cash

To get list of bonus games that has been converted to cash.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/GetBonusConvertedWallet
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
bonus_idIntegerYesUnique identity of bonus
from_transaction_timeLongYesTime range of free game player's transactions (Unix time stamp in milliseconds)
to_transaction_timeLongYesTime range of free game player's transactions (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of player
Note: Fuzzy matching is implemented
Default: All players

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/GetBonusConvertedWallet?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&bonus_id=12345&player_name=player1&from_transaction_time=1346592723000&to_transaction_time=1346592723000

Response
Body Parameters:
JSON Object

Parameter nameData TypeDescription
totalConvertedAmountDecimalTotal amount that has been converted to cash in free game
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of players details whose bonus game has been converted to cash

JSON Array

Parameter nameData TypeDescription
balanceIdIntegerUnique identity of player's free game wallet
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
gameIdIntegerUnique identity of game
transactionAmountDecimalAmount converted of player
transactionDateTimeLongTime of convert
(Unix time stamp in milliseconds)
{
"data": {
"totalConvertedAmount": 10,
"totalCount": 1,
"totalPage": 1,
"result": [
{
"balanceId": 13787,
"playerName": "qa18",
"currencyCode": "CNY",
"gameId": 8,
"transactionAmount": 10,
"transactionDateTime": 1547449915000
},
{
"balanceId": 13788,
"playerName": "qa18",
"currencyCode": "CNY",
"gameId": 8,
"transactionAmount": 10,
"transactionDateTime": 1547449915100
}
]
},
"error": null
}

2.3.3 Get Bonus Game Players List

To get the list of registered players of a bonus game.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/GetBonusPlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
bonus_idIntegerYesUnique identity of bonus
from_timeLongYesTime range of bonus games’ start times (Unix time stamp in milliseconds)
to_timeLongYesTime range of bonus games’ start times (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of player
Note: Fuzzy matching is implemented
Default: All players
statusIntegerNoStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
Default: All status

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/GetBonusPlayers?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&from_time=1346592723000&to_time=1546592723000&bonus_id=12345&status=1

Response
Body Parameters:
JSON Object

Parameter nameData TypeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of players in bonus game

JSON Array

Parameter nameData typeDescription
balanceIdIntegerUnique identity of player's bonus wallet
playerIdIntegerUnique identity of bonus game's player
playerNameStringUnique identity of bonus game's player
walletTypeStringType of player wallet in bonus game:
   G: Free Game
   B: Bonus
balanceAmountDecimalPlayer's balance in bonus game
bonusRatioAmountDecimalWagering requirement for bonus game.
Refers to the total amount that needs to be completed
MinimumConversionAmountDecimalMinimum conversion amount for bonus
MaximumConversionAmountDecimalMaximum conversion amount for bonus
statusIntegerStatus of bonus wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
expiredDateLongExpiry date of bonus game (Unix time stamp in milliseconds)
updatedDateLongDate of when a player is registered or re-registered into the bonus game (Unix time stamp in milliseconds)
createdDateLongDate of when a player is registered or re-registered into the bonus game (Unix time stamp in milliseconds)
{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"balanceId": 111261,
"playerId": 7443,
"playerName": "player1",
"walletType": "B",
"balanceAmount": 874.4,
"bonusRatioAmount": 874.4,
"MinimumConversionAmount": 0,
"MaximumConversionAmount": 0,
"expiredDate": 1546991999000,
"status": 2,
"createdDate": 1546923615000,
"updatedDate": 1546991999000
},
{
"balanceId": 111252,
"playerId": 7443,
"playerName": "player2",
"walletType": "G",
"balanceAmount": 8.8,
"MinimumConversionAmount": 0,
"MaximumConversionAmount": 0,
"expiredDate": 1546991999000,
"status": 6,
"createdDate": 1546918715000,
"updatedDate": 1547028195000
}
]
},
"error": null
}

2.3.4 Get List of Unregistered Players of Bonus Game

To get list of unregistered players of a bonus game.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/GetBonusPendingPlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
bonus_idIntegerYesUnique identity of bonus game
player_nameStringNoUnique identity of free game player
Note: Fuzzy matching is implemented
Default: All players
statusIntegerNoStatus of wallet of unregistered player:
   0: Inactive (Cancelled)
   1: Pending
   2: Transferred
Default: All status

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/GetBonusPendingPlayers?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&from_time=1346592723000&to_time=1546592723000&bonus_id=12345&status=1

Response
Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of unregistered players in a bonus game

JSON Array

Parameter nameData typeDescription
pendingWalletIdIntegerUnique identity of unregistered player's bonus wallet
playerNameStringUnique identity of unregistered player in bonus game
statusIntegerStatus of unregistered player's wallet:
     0: Inactive (Cancelled)
     1: Pending
     2: Transferred
updatedDateLongDate of when a player is registered or re-registered into the bonus game (Unix time stamp in milliseconds)
createdDateLongDate of when a player is registered into the bonus game (Unix time stamp in milliseconds)
createdByStringAPI or BackOffice user who registered the player
updatedByStringAPI or BackOffice user who registered the player

Example:

{
"data": {
"totalCount": 2,
"totalPage": 1,
"result": [
{
"pendingWalletId": 140392,
"playerName": "eddywang9999",
"status": 1,
"createdDate": 1554351552000,
"updatedDate": 1554351552000,
"createdBy": "External API",
"updatedBy": "External API"
},
{
"pendingWalletId": 140393,
"playerName": "eddywang99999",
"status": 1,
"createdDate": 1554351682000,
"updatedDate": 1554351682000,
"createdBy": "External API",
"updatedBy": "External API"
}
]
},
"error": null
}

2.3.5 Get All Player Details in Bonus Game

To get the details of all players in a bonus game.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/GetBonusAllPlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
bonus_idIntegerYesUnique identity of bonus
from_timeLongYesTime range of bonus games’ start times (Unix time stamp in milliseconds)
to_timeLongYesTime range of bonus games’ start times (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of player
Note: Fuzzy matching is implemented
Default: All players
statusIntegerNoStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
Default: All status

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/GetBonusAllPlayers?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&from_time=1346592723000&to_time=1546592723000&bonus_id=12345&status=1

Response
Body Parameters:
JSON Object

Parameter nameData TypeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of players in bonus game
Parameter nameData typeDescription
balanceIdIntegerUnique identity of player's bonus wallet
playerIdIntegerUnique identity of bonus game's player
playerNameStringUnique identity of bonus game's player
walletTypeStringType of player wallet:
   G: Free Game
   B: Bonus
balanceAmountDecimalPlayer balance of unconverted bonus game, or
converted amount of converted bonus game
bonusRatioAmountDecimalWagering requirement for bonus game.
Refers to the total amount that needs to be completed
MinimumConversionAmountDecimalMinimum conversion amount for bonus game
MaximumConversionAmountDecimalMaximum conversion amount for bonus game
statusIntegerStatus of bonus wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
expiredDateLongExpiry date of bonus game
updatedDateLongDate of when a player is registered or re-registered into the bonus game (Unix time stamp in milliseconds)
createdDateLongDate of when a player is registered or re-registered into the bonus game (Unix time stamp in milliseconds)
{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"balanceId": 111261,
"playerId": 7443,
"playerName": "player1",
"walletType": "B",
"balanceAmount": 874.4,
"bonusRatioAmount": 874.4,
"MinimumConversionAmount": 0,
"MaximumConversionAmount": 0,
"expiredDate": 1546991999000,
"status": 2,
"createdDate": 1546923615000,
"updatedDate": 1546991999000
},
{
"balanceId": 111252,
"playerId": 7443,
"playerName": "player2",
"walletType": "G",
"balanceAmount": 8.8,
"MinimumConversionAmount": 0,
"MaximumConversionAmount": 0,
"expiredDate": 1546991999000,
"status": 6,
"createdDate": 1546918715000,
"updatedDate": 1547028195000
}
]
},
"error": null
}

2.3.6 Get Single Player Details in Bonus Game

To get the details of a single player in a bonus game.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/GetPlayerBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
player_nameStringYesUnique identity of bonus player
statusIntegerNoStatus of free game wallet:
   0: Inactive (Cancelled)
   1: Active
   2: Expired
   3: Converted
   4: Completed
   5: New
   6: User Cancelled
   8: Pending
Default: All status

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/GetPlayerBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&player_name=player1&status=1&status=1&status=2

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of bonus games of a single player

JSON Array

Parameter nameData typeDescription
bonusIdUlongUnique identity of bonus game
Note: Free game id will be returned for bonus that have been converted from free game
bonusNameStringGiven name of bonus game
gameIdsInteger ArrayUnique identity of games
balanceAmountDecimalPlayer balance of unconverted bonus game, or
converted amount of converted bonus game
maximumConversionAmountDecimalMaximum conversion amount for bonus
bonusRatioAmountDecimalWagering requirement for bonus game.
Refers to the total amount that needs to be completed
bonusParentTypeIntegerType of bonus parent:
    B: Bonus game that was created normally
    G: Bonus game that was converted from free game
statusIntegerStatus of bonus wallet:
    0: Inactive (Cancelled)
    1: Active
    2: Expired
    3: Converted
    4: Completed
    5: New
    6: User Cancelled
    8: Pending
createdDateLongCreated date of bonus game
(Unix time stamp in milliseconds)
expiredDateLongExpiry date of bonus game
(Unix time stamp in milliseconds)
updatedByStringAPI or BackOffice user who created or updated the bonus game

Example:

{
"data": {
"totalCount": 2583,
"totalPage": 259,
"result": [
{
"bonusId": 11385,
"bonusName": "Bonus 1",
"bonusParentType": "B",
"gameIds": [
9
],
"balanceAmount": 1000000,
"bonusRatioAmount": 1000,
"maximumConversionAmount": 5000,
"status": 2,
"createdDate": 1531981770000,
"expiredDate": 1532015999000,
"createdBy": "Operator1",
"updatedBy": "Operator1"
},
{
"bonusId": 12271,
"bonusName": "Bonus 2",
"bonusParentType": "G",
"gameIds": [
27
],
"balanceAmount": 1000000,
"bonusRatioAmount": 10000,
"maximumConversionAmount": 500,
"status": 2,
"createdDate": 1537413312000,
"expiredDate": 1537487999000,
"createdBy": "Operator1",
"updatedBy": "Operator1"
}
]
},
"error": null
}

2.3.7 Create Bonus Game

To create new bonus game.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/CreateBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
currencyStringYesCurrency of bonus game
bonus_nameStringYesGiven name of bonus game
bonus_amountDecimalYesBonus amount to be given for each player
expired_dateLongYesExpiry date of bonus game (Unix time stamp in milliseconds)
minimum_conversion_amountDecimalNoMinimum conversion amount for bonus game
NULL: No limit for conversion amount
maximum_conversion_amountDecimalNoMaximum conversion amount for bonus game
NULL: No limit for conversion amount
bonus_typeIntegerYesBonus game wagering condition:
0: Bonus
1: Cash
2: Bonus & Cash
bonus_ratioDecimalYesWagering requirement for bonus game.
Refers to the multiple of the turnover that needs to be completed
Turnover = bonus ratio x bonus amount
game_idsInteger ArrayYesUnique identity of games
Note: Only games with the same base bet are accepted.
is_eventBooleanYesType of bonus game:
     True: Flexible
     False: Standard
player_nameStringNoUnique identity of player. System will create bonus game and assign to this player directly.
Note: Free game type will be standard mode if player_name is provided
transaction_idStringYesUnique identity of transaction.
Note: System will return a corresponding bonus ID for a duplicated transaction
non_discardableBooleanNoTo prevent player to discard the offer:
     True: Not Allow player to discard the offer
     False: Allow player to discard the offer (Default)

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/CreateBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&currency=CNY&bonus_name=Bonus2019&bonus_amount=100.00&expired_date=1745289243000&maximum_conversion_amount=1&bonus_type=1&game_ids=1&game_ids=2&is_event=true&player_name=player1&transaction_id=12345&non_discardable=False

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
bonusIdIntegerUUnique identity of bonus game

Example:

{
"data": {
"freeGameId ": 10915
},
"error": null
}

2.3.8 Transfer Player to Standard Bonus Game

To add players into a created standard bonus game. Operator can only transfer players into a pre-set bonus game.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/TransferInBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
bonus_idIntegerYesUnique identity of bonus game
player_namesString ArrayYesUnique identity of players
transfer_referenceStringYesUnique identity of transfer

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/TransferInBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&bonus_id=12&player_names=player1&player_names=player2&transfer_reference=bonusgame_20181128

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
transactionIdStringUnique identity of transaction
operatorTokenStringUnique identity of operator
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
statusIntegerStatus of transfer request:
     0: Failed
     1: Successful
     2: Pending (For non-existent player, bonus game will be assigned to the player automatically after player is created.)

Example:

{
"data": [
{
"transactionId": 10,
"operatorToken": "abc123",
"playerName": "player1",
"currencyCode": "CNY",
"status": 1
},
{
"transactionId": 1,
"operatorToken": "1234",
"playerName": "player2",
"currencyCode": "CNY",
"status": 1
}
],
"error": null
}

2.3.9 Transfer Player to Flexible Bonus Game

To add players into a created flexible bonus game. Operator can override bonus game setting for a specific player.

Notes
• We suggest do not exceed 200 players per request.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/TransferInFlexibleBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_bonusesJSON String ArrayYesOverridden default bonus game's information for players
bonus_idIntegerYesUnique identity of bonus game
transfer_referenceStringYesUnique identity of transfer
allow_multipleBooleanYesTrue: No. of times a player can re-register in a bonus game
False: Player is only allowed to register once in a bonus game.

player_bonuses JSON String:

Parameter nameData typeMandatoryDescription
player_nameStringYesUnique identity of operator
bonus_amountIntegerYesCustom bonus amount for player
Value range: Value ≥ 1
is_unlimited_bonus_maximum_conversion_amountBooleanYesSets bonus game's maximum conversion amount to unlimited
bonus_minimum_conversion_amountDecimalNo*Custom bonus game's minimum conversion amount for player.
Value range: Value ≥ 1
Default value: 0
Note: System will use default conversion amount if value = 0
bonus_maximum_conversion_amountDecimalNo*Custom bonus game's maximum conversion amount for player.
Value range: Value ≥ 1
Default value: 0
Note: System will use default conversion amount if value = 0
descriptionStringNoReference note for transfer

*Only applicable if is_unlimited_bonus_maximum_conversion_amount parameter value is false

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/TransferInFlexibleBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_bonuses={"player_name":"player1","bonus_amount":10,"is_unlimited_bonus_maximum_conversion_amount":false,"bonus_maximum_conversion_amount":100.50,"description":"VIP"}&bonus_id=3&transfer_refer

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
transactionIdStringUnique identity of transaction
operatorTokenStringUnique identity of operator
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
statusIntegerStatus of transfer request:
     0: Failed
     1: Successful
     2: Pending (For non-existent player, bonus game will be assigned to the player automatically after player is created.)

Example:

{
"data": [
{
"transactionId": 10,
"operatorToken": "abc123",
"playerName": "player1",
"currencyCode": "CNY",
"status": 1
},
{
"transactionId": 1,
"operatorToken": "1234",
"playerName": "player2",
"currencyCode": "CNY",
"status": 1
}
],
"error": null
}

2.3.10 Cancel Bonus Game

To cancel a created bonus game.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/CancelBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
bonus_idStringYesUnique identity of bonus game

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/CancelBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&bonus_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.3.11 Cancel Bonus Games of Registered Player

To cancel a bonus game of a specific registered player.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/CancelPlayerBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of player
balance_idIntegerYesUnique identity of player’s bonus wallet

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/CancelPlayerBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player1&balance_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.3.12 Cancel Bonus Game of Unregistered Player

To cancel a bonus game of a specific unregistered player.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/CancelPendingPlayerBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
pending_wallet_idIntegerYesUnique identity of player's bonus wallet

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/CancelPendingPlayerBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&pending_wallet_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.3.13 Cancel All Bonus Games of a Player

To cancel all bonus games of a player.

Request

API URL : {PgSoftAPIDomain}/Bonus/v1/CancelPlayerAllBonus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of player
bonus_idIntegerYesUnique identity of bonus game

Example:
URL:

https://api.pg-bo.me/external/Bonus/v1/CancelPlayerAllBonus?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player1&bonus_id=10919

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
"actionResult": true
},
"error": null
}

2.4 Tournament [Latest version: v2]

2.4.1 Get Tournaments List

To get list of tournaments.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/GetTournaments
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
from_created_timeLongYes*Time range of tournament's start time and end time
(Unix time stamp in milliseconds)
to_created_timeLongYes*Time range of tournament's start time and end time
(Unix time stamp in milliseconds)
start_timeLongYes*Time range of tournament's start time and end time
(Unix time stamp in milliseconds)
end_timeLongYes*Time range of tournament's start time and end time
(Unix time stamp in milliseconds)
statusInteger ArrayNoStatus of tournament:
0: Cancel
1: InProgress
2: New
3: End
Default: All status
game_idsInteger ArrayNoUnique identity of games
Default: All games
languageStringNoResponse language for tournament information:
en-US: English (Default)
zh-CN: Chinese
currencystringNoCurrency used in the tournament
Default: All currencies used in the tournament
  • Either from_created_time and to_created_time parameters or start time and end_time parameters

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/GetTournaments?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&status=1&status=2&game_ids=1&game_ids=2&language=zh-cn&start_time=1559145500000&end_time=1559145600000&currency=CNY&from_created_time=1559145500000&to_created_time=1559145600000

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
tournamentKeyStringUnique key of tournament
tournamentIdLongUnique identity of tournament
subTournamentIdLongUnique identity of Sub-Tournament
nameStringName of tournament
descriptionStringDescription of tournament
registrationFeesStringRegistration fee of tournament
prize_typeIntegerType of Tournament prize:
     0: Item prize
     1: Cash prize
prizeString ArrayPrizes of tournament
registrationUrlStringRegistration URL of tournament
hasSubTournamentsBooleanTo indicate if Sub-Tournament exists
subTournamentStatusDecimalStatus of Sub-Tournament
subTournamentStartTimeLongStart time of Sub-Tournament
(Unix time stamp in milliseconds)
subTournamentEndTimeLongEnd time of Sub-Tournament
(Unix time stamp in milliseconds)
numberOfPlayersIntegerNumber of participants in tournament
initialPointDecimalInitial balance of tournament
qualifiedPointDecimalPoints needed for tournament player to enter the leaderboard
gameModeIntegerTournament mode:
     1: Accumulation
     2: Depletion
rankStatusIntegerTournament leaderboard status:
     0: Disabled
     1: Enabled
     2: Cut off (Tournament rank had been finalized)
statusIntegerStatus of Tournament:
     0: Cancel
     1: InProgress
     2: New
     3: End
startTimeLongStart time of tournament (Unix time stamp in milliseconds)
endTimeLongEnd time of tournament (Unix time stamp in milliseconds)
createdTimeLongCreated time or updated time of tournament (Unix time stamp in milliseconds)
updatedTimeLong
isCashModeBooleanTournament Mode:
     Cash Tournament
     Point Tournament
isRequiredRegisterBooleanTo allow players to join the tournament manually or automatically
groupString ArrayList of Currency
gameIdsUint ArrayList of game IDs
turnOverLimitDecimalPoints required for players to join the tournament (total amount the player has bet or spent)
createdByStringAPI or BackOffice user who created tournament
operatorInfosJSON ArrayOperator details

operatorInfos JSON Array

Parameter nameData typeDescription
operatorNameStringName of operator
operatorTokenStringUnique identity of operator
groupString ArrayCurrency list
createdTimeLongCreated time of tournament
updatedTimeLongLast updated time of tournament
createdByStringCreator of tournament
updatedByStringLast update source of tournament

Example:

{
"data": [
{
"tournamentKey": "1857-2270-0_P",
"tournamentId": 1857,
"name": "Point Testing",
"operatorToken": "a**d",
"description": "",
"gameIds": [
94
],
"registrationFees": "",
"prizeType": 0,
"prize": {
"winnerPrizeDetails": [
{
"positionTo": 1,
"item": "3"
},
{
"positionTo": 2,
"item": "2"
},
{
"positionTo": 3,
"item": "1"
}
]
},
"registrationUrl": "",
"hasSubTournaments": false,
"numberOfPlayers": 1,
"initialPoint": 1,
"qualifiedPoint": 2,
"turnoverLimit": 1,
"gameMode": 1,
"rankStatus": 2,
"isCashMode": false,
"status": 3,
"startTime": 1607558400000,
"endTime": 1607644799000,
"subTournamentId": 2270,
"subTournamentStatus": 3,
"subTournamentStartTime": 1607558400000,
"subTournamentEndTime": 1607644799000,
"createdTime": 1607569038000,
"updatedTime": 1607569038000,
"createdBy": "ExternalAPI",
"isRequiredRegister": false
},
{
"tournamentKey": "1859-2272-0_P",
"tournamentId": 1859,
"name": "TournamentName",
"operatorToken": "a**d",
"description": "TournamentDesc",
"group": [
"JPY"
],
"gameIds": [
1,
2
],
"registrationFees": "RegistrationFees",
"prizeType": 0,
"prize": {
"winnerPrizeDetails": [
{
"positionTo": 1,
"item": "1st prize"
},
{
"positionTo": 3,
"item": "2rd prize"
},
{
"positionTo": 10,
"item": "3rd prize"
}
]
},
"registrationUrl": "RegistrationUrl",
"hasSubTournaments": false,
"numberOfPlayers": 0,
"initialPoint": 200,
"qualifiedPoint": 200,
"turnoverLimit": 0,
"gameMode": 1,
"rankStatus": 2,
"isCashMode": false,
"status": 3,
"startTime": 1607644800000,
"endTime": 1607731200000,
"subTournamentId": 2272,
"subTournamentStatus": 3,
"subTournamentStartTime": 1607644800000,
"subTournamentEndTime": 1607731200000,
"createdTime": 1607680643000,
"updatedTime": 1607680643000,
"createdBy": "External API",
"isRequiredRegister": false
}
],
"error": null
}

2.4.2 Get Tournament Players List

To get list of tournament players.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/GetTournamentPlayersAsync
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
sub_tournament_idIntegerYesUnique identity of Sub-Tournament
page_numberIntegerYesBatch number of data return
row_countIntegerYesNumber of records for each batch
Note: Value range 1-5000
player_namesStringNoUnique identity of tournament players
Default: All tournament players
from_created_timeLongNoTime range of when players were added
into a tournament.
to_created_timeLongNo(Unix time stamp in milliseconds)

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/GetTournamentPlayersAsync?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=1000&sub_tournament_id=1460&player_names=qafmcny18&from_created_time=1559145500000&to_created_time=1559145600000

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of players in tournament

JSON Array

Parameter nameData typeDescription
operatorTokenStringUnique identity of operator
tournamentPlayerIdStringUnique identity of tournament player
playerNameStringUnique identity of player
balanceAmountDecimalRemaining balance of a player in tournament
pointDecimalTotal points won by player in tournament
remainingReviveIntegerRemaining times to revive in tournament
remainingRegisterIntegerRemaining times to re-register in tournament
createdTimeLongTime when player was added into tournament
(Unix time stamp in milliseconds)
updatedTimeLongTime of when tournament player's information was updated
(Unix time stamp in milliseconds)
createdByStringAPI or BackOffice user who registered the player into the tournament

Example:

{
"data": {
"totalCount": 1,
"result": [
{
"tournamentPlayerId": 456,
"operatorToken": "1234",
"playerName": "qafmcny18",
"balanceAmount": 96,
"point": 544.05,
"remainingRevive": 0,
"remainingRegister": 9,
"createdTime": 1561640502000,
"updatedTime": 1561640502000,
"createdBy": "mei"
},
{
"tournamentPlayerId": 456,
"operatorToken": "1234",
"playerName": "qafmcny19",
"balanceAmount": 96,
"point": 544.05,
"remainingRevive": 0,
"remainingRegister": 9,
"createdTime": 1561640502000,
"updatedTime": 1561640502000,
"createdBy": "mei"
}
],
"totalPage": 1
},
"error": null
}

2.4.3 Get Tournament Top Rankings

To cancel a free game of a specific player.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/GetTournamentTopRankingsAsync
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
tournament_idIntegerYesUnique identity of Tournament
countIntegerYesNumber of records for each batch
Note: Value range 1-5000
player_nameIntegerNoUnique identity of player
Default: All player

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/GetTournamentTopRankingsAsync?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&tournament_id=41&count=10&player_name=player1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
top_rankingJSON ArrayList of tournament’s top rankings

JSON Array

Parameter nameData typeDescription
operatorTokenIntegerUnique identity of operator
tournamentPlayerIdStringUnique identity of tournament player
playerNameStringUnique identity of player
pointDecimalTotal points won by player in tournament
totalSpendPointDecimalTotal points spent by player
previousRankIntegerPrevious ranking of player
rankIntegerCurrent ranking of player
lastUpdatedOnLongLast updated time of leader board (Unix time stamp in milliseconds)
IsRankingQualifiedPlayerBooleanTo identify if a player is qualified to join the tournament

Example:

{
"data": {
"top_ranking": [
{
"tournamentPlayerId": 456,
"operatorToken": "1234",
"playerName": "player1",
"point": 30360.98,
"totalSpendPoint": 69376.8,
"previousRank": 1,
"rank": 1,
"lastUpdatedOn": 1540380199000,
"IsRankingQualifiedPlayer": true
},
{
"tournamentPlayerId": 457,
"operatorToken": "1234",
"playerName": "player2",
"point": 10000.74,
"totalSpendPoint": 33,
"previousRank": 2,
"rank": 2,
"lastUpdatedOn": 1540380199000,
"IsRankingQualifiedPlayer": true
}
]
},
"error": null
}

2.4.4 Register Tournament Players

To add multiple players into a tournament.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/CreateTournamentPlayersAsync
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
tournament_idLongYesUnique identity of tournament
Note: Please create tournament through PG BackOffice
player_namesString ArrayYesUnique identity of player
allow_re-registerBooleanYesTo allow player to re-register to the same tournament:
     True: Allow
     False: Disallow

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/CreateTournamentPlayersAsync?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&tournament_id=41&player_names=player1 &player_names=player2&allow_re-register=true

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
operatorTokenIntegerUnique identity of operator
tournamentPlayerIdStringUnique identity of tournament player
playerNameStringUnique identity of player
balanceAmountIntegerInitial points in player balance
registerAllowedIntegerNumber of times allowed to re-register in tournament
reviveAllowedIntegerNumber of times allowed to revive in tournament
statusIntegerStatus of Tournament Player:
     0: Duplicated
     1: Successful
     3: Registration limit exceeded
     4: Invalid Player
tournamentKeyStringUnique key of tournament

Example:

{
"data": [
{
"tournamentKey": "1855-2266-833649_P",
"tournamentPlayerId": 456,
"operatorToken": "1234",
"playerName": " player1",
"balanceAmount": 10000,
"registerAllowed": 98,
"reviveAllowed": 3,
"status": 1
},
{
"tournamentKey": "1865-2266-833649_P",
"tournamentPlayerId": 457,
"operatorToken": "1234",
"playerName": " player1",
"balanceAmount": 10000,
"registerAllowed": 98,
"reviveAllowed": 3,
"status": 1
},
{
"tournamentKey": "1866-2266-833649_P",
"tournamentPlayerId": 458,
"operatorToken": "1234",
"playerName": " player2",
"balanceAmount": 10000,
"registerAllowed": 98,
"reviveAllowed": 3,
"status": 1
}
],
"error": null
}

2.4.5 Get Tournament Cash Prize Reward List

To get cash prize reward list of the tournament.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/GetTournamentAutoRewardCashPrize
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
start_timeLongYesTime range of record's start times and end times (Unix time stamp in milliseconds)
Note: Value range 1 day - 14 days
end_timeLongYes
StatusIntegerYesReward status
1: Receive reward successfully
0: Failed to receive reward
tournament_idsLongYesUnique identity of tournament
transaction_idLongNoUnique identity of reward transaction
Default: All reward transaction
StringNoUnique identity of tournament
Default: All reward transaction
player_nameStringNoUnique identity of tournament players
Default: All tournament players
currencyStringNoCurrency used in tournament
Default: All currencies used in tournament
page_numberIntegerNoBatch number of data return
Default value: 1
row_countIntegerNoNumber of records for each batch
Default value: 5000

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/GetTournamentAutoRewardCashPrize?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&start_time=1559145500000&end_time=1559145600000&status=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPageIntegerTotal number of available batches
resultJSON ArrayList of winners in tournament

JSON Array

Parameter nameData typeDescription
tournamentIdIntegerUnique identity of tournament
currencystringCurrency used in the tournament
winnersJSON ArrayList of winners in tournament

winners JSON Array

Parameter nameData typeDescription
transactionIdLongUnique identity of reward transaction
transactionTimeLongTime of reward transaction (Unix time stamp in milliseconds)
tournamentPlayerIdStringUnique identity of tournament player
playerNameStringUnique identity of player
rankIntegerPlayer ranking of tournament
adjustmentAmountDecimalReward amount of player in tournament
messageStringError message will pop up if there is an error

Example:

{
"data": {
"totalCount": 3,
"result": [
{
"tournamentId": 175,
"currency": "CNY",
"winners": [
{
"transactionId": 27021004,
"transactionTime": 1599811942000,
"tournamentPlayerId": 456,
"playerName": "calven77407A5275",
"rank": 2,
"adjustmentAmount": 20000
}
]
},
{
"tournamentId": 184,
"currency": "CNY",
"winners": [
{
"transactionId": 27021007,
"transactionTime": 1599811943000,
"tournamentPlayerId": 457,
"playerName": "JiaXiangHong",
"rank": 1,
"adjustmentAmount": 200
},
{
"transactionId": 27021008,
"transactionTime": 1599811943000,
"tournamentPlayerId": 458,
"playerName": "dong",
"rank": 2,
"adjustmentAmount": 100
}
]
}
],
"totalPage": 1
},
"error": null
}

2.4.6 Create Tournament

To create a tournament.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/CreateTournament
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_infoJSON ArrayYesTournament info
has_sub_tournamentsBooleanYesTo identify if the tournament has Sub-Tournaments
game_modeUintYesPoint Tournament:
1: Accumulation
2: Depletion
3: Hybrid

Cash Tournament:
4: Profit Percentage
5: Win Percentage
6: Profit Amount
7: Win Amount
8: Win count
9: Spin Count
10: Total Bet
qualified_pointDecimalYesRequired points for ranks
initial_pointDecimalYesInitial points for tournament
(only for point tournament)
game_idsUint ArrayYesGame for tournament
currencyString ArrayYesCurrency used in the tournament
start_timeLongYesTournament start time
end_timeLongYesTournament end time
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
maximum_revive_allowedUintNoMaximum number of times to re-play tournament
maximum_register_allowedUintNoMaximum number of times to re-register tournament
sub_tournament_infoJSON ArrayDepends on has_sub_tournamentSub-Tournament information
number_of_player_limitUintNoMaximum number of players to register tournament
minimum_bet_amountDecimalNoMinimum bet amount to register for the tournament
minimum_bet_countUintNoMinimum number of bet count to register tournament
leaderboard_playerUintYesNumber of players to show in the leaderboard
player_multiplierUintNoWin multiplier for all players in the tournament
required_registerBooleanNoAllows players to manually register for current tournament:
     0: Do not required player to manually register for current tournament (Default)
     1: Required player to manually register for current tournament

tournament_info JSON Array

Parameter nameData typeDescription
languageStringTournament Language
infoJSON ArrayTournament Information

Info JSON Array

Parameter nameData typeDescription
nameStringName of the Tournament
descriptionStringAdditional description
rulesStringRules for the Tournament
winning_criteriaStringWinning Requirements
registration_feesStringRegistration fees of Tournament
registration_urlStringTournament registration URL
prize_typeUintType of Tournament prize:
0: Item prize 1: Cash prize
Note: Cash prize will automatically be transferred to player’s wallet after the tournament ends.
prizeJSON ArrayPrize information

Prize JSON Array

Parameter nameData typeDescription
position_toIntegerRange of the number of prize winners:
Example: 3 = the current prize would be for 1st to 3rd winners.
itemStringPrize item
Note: Cash prize will be given based on the currency base

sub_tournament_info JSON Array

Parameter nameData typeDescription
game_idsUint ArraySub-Tournament Game IDs
start_timeLongSub-Tournament Start Time
end_timeLongSub-Tournament End Time

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/CreateTournament?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
tournament_info={"language":"fi- FI","info":{"name":"TournamentName","description":"TournamentDesc","rules":"Tourna mentRules","winning_criteria":"WinningCriteria","registration_fees":"RegistrationF ees","registration_url":"RegistrationUrl","prize_type":0,"prize":{"winner_prize_de tails":[{"position_to":1,"item":"1st prize"},{"position_to":3,"item":"2rd prize"},{"position_to":10,"item":"3rd prize"}]}}}&sub_tournament_info={"game_ids":[1,2,3],"start_time":1613623305000,"en d_time":1613796105000}&has_sub_tournaments=true&start_time=1613623305000&end_time= 1613796105000&currency=JPY&qualified_point=200&initial_point=199&game_mode=1&game_ ids=1&game_ids=2&operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&maximum_revi ve_allowed=10&maximum_register_allowed=10&number_of_player_limit=10&minimum_bet_am ount=3.1&minimum_bet_count=5&leaderboard_player=100&player_multiplier=2&required_r egister=true

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
tournamentIdUintCreate Tournament ID

JSON Array 666

Example:

{
"data": {
"tournamentId": 1859
},
"error": null
}

2.4.7 Update Tournament

To update a tournament.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/UpdateTournament
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_idIntegerYesUnique identity of tournament
start_timeLongYesTournament start time
end_timeLongYesTournament end time
qualified_pointDecimalYesRequired points for ranks
game_idsInteger ArrayYesGames for tournament
currencyString ArrayYesList of Tournament currency
number_of_player_limitIntegerNoMaximum number of players to register tournament
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/UpdateTournament?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
tournament_id=1757&start_time=1604016000000&end_time=1604102400000&qualified_point=9639&game_ids=2&game_ids=1&currency=JPY&currency=CNY&number_of_player_limit=9639&operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
dataBooleanUpdate status

Example:

{
"data": true,
"error": null
}

2.4.8 Update Sub-Tournament Information

To update a Sub-Tournament’s information.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/UpdateSubTournament
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_idUintYesUnique identity of tournament
sub_tournament_infoJSON ArrayYesSub-Tournament information
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
participant_tokensString ArrayYesUnique identity of operator

sub_tournament_info JSON Array

Parameter nameData typeDescription
sub_tournament_idUintUnique identity of sub tournament
interval_start_timeLongSub-Tournament Start / End Time (must be within
interval_end_timeLongstart / end time of the Main Tournament)
game_idsUint ArraySub-Tournament games

Example:
URL:

https://api.pg-
bo.me/external/Tournament/v2/UpdateSubTournament?trace_id=b3f37e57-2873-40b1-
aa95-f126c25ed311
Body:
tournament_id=1859&operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&sub_tourna
ment_info:{"sub_tournament_id":1737,"interval_start_time":1604016000000,"interval_
end_time":1604102400000,"game_ids":[1,2]}&participant_tokens=abc123&participant_to
kens=abc124

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
dataBooleanUpdate status

Example:

{
"data": true,
"error": null
}

2.4.9 Get Tournament Information

To get a tournament’s information.

Request

API URL : 
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_idUintYesUnique identity of tournament
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator

Example:
URL:

https://api.pg-
bo.me/external/Tournament/v2/GetTournamentInfoLanguageByTournamentId?trace_id=b3f3
7e57-2873-40b1-aa95-f126c25ed311
Body:
tournament_id=1845&operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
tournamentInfoidUintUnique identity of tournament info id
languageStringTournament supported language
nameStringName of the Tournament
descriptionStringAdditional description
rulesStringRules for the Tournament
winningCriteriaStringWinning Requirements
registrationFeesStringRegistration fees of Tournament
registrationUrlStringTournament registration Url
prizeTypeUintType of tournament prize:
     0: Item prize
     1: Cash prize
prizeJSON ArrayTournament winner prize details
createdTimeLongTournament created time
updatedTimeLongTournament updated time
createdByStringAPI or BackOffice user who registered
the player into the Tournament
updatedByStringAPI or BackOffice user who updated the
Tournament

Example:

{
"data": [
{
"tournamentInfoId": 1876,
"language": "ja-JA",
"name": "ILName",
"description": "ILDesc",
"rules": "ILRules",
"winningCriteria": "ILWinningCt",
"registrationFees": "ILRegistrationFees",
"registrationUrl": "ILRegistrationUrl",
"prizeType": 1,
"prize": {
"winnerPrizeDetails": {
"1": {
"positionFrom": 1,
"positionTo": 1,
"item": "myItem"
},
"2": {
"positionFrom": 2,
"positionTo": 2,
"item": "myItem2"
},
"3": {
"positionFrom": 3,
"positionTo": 3,
"item": "myItem3"
}
}
},
"createdTime": 1606969557000,
"updatedTime": 1607315386000,
"createdBy": "External API",
"updatedBy": "External API"
}
],
"error": null
}

2.4.10 Create Tournament Information

To create a tournament’s information.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/CreateTournamentInfoLanguage
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
participant_tokensString ArrayYesUnique identity of operator
tournament_idUintYesUnique identity of tournament
nameStringYesName of the Tournament
languageStringYesTournament supported languages
descriptionStringNoAdditional description
rulesStringNoRules for the Tournament
winning_criteriaStringNoWinning Requirements
registration_feesStringNoRegistration fees of Tournament

prize JSON Array

Parameter nameData typeDescription
winner_prize_detailsJSON ArrayTournament winner's prize

prize JSON Array

Parameter nameData typeDescription
position_toIntegerRange of the number of prize winners.
Example: 3 = the current prize would be for 1st to 3rd winners.
itemStringPrize Item

Example:
URL:

https://api.pg-
bo.me/external/Tournament/v2/CreateTournamentInfoLanguage?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&tournament_id=1845name=InfoLa
nguageName&language=ja-
JA&description=XXX&rules=XXX&winning_criteria=XXX&registration_fees=XXX&registrati
on_url=XXX&prize:{"winner_prize_details":[{"position_to":1,"item":"myItem"},{"posi
tion_to":2,"item":"myItem2"},{"position_to":3,"item":"myItem3"}]}&participant_toke
ns=abc123&participant_tokens=abc123

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
tournamentInfoIdUintTUnique identity of tournament info

Example:

{
"data": 1895,
"error": null
}

2.4.11 Update Tournament Information

To update an existing tournament’s information.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/UpdateTournamentInfoLanguage
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_idUintYesUnique identity of tournament
tournament_info_idStringYesUnique identity of tournament info
nameStringYesName of the Tournament
languageStringYesTournament supported language
descriptionStringNoAdditional description
rulesStringNoRules for the Tournament
winning_criteriaStringNoWinning Requirements
registration_feesStringNoRegistration fees of Tournament
registration_urlStringNoTournament registration Url
prizeJSON ArrayNoTournament prize
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
participant_tokensString ArrayYesUnique identity of operator

prize JSON Array

Parameter nameData typeDescription
winner_prize_detailsJSON ArrayTournament winner's prize

prize JSON Array

Parameter nameData typeDescription
position_toIntegerRange of the number of prize winners.
Example: 3 = the current prize would be for 1st to 3rd winners.

Example:
URL:

https://api.pg-
bo.me/external/Tournament/v2/UpdateTournamentInfoLanguage?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&tournament_id=1845&tournament
_info_id=1876&name=ILName&language=ja-
JA&description=ILDesc&rules=ILRules&winning_criteria=ILWinningCt&registration_fees
=ILRegistrationFees&registration_url=ILRegistrationUrl&prize:{"winner_prize_detail
s":[{"position_to":1,"item":"myItem"},{"position_to":2,"item":"myItem2"},{"positio
n_to":3,"item":"myItem3"}]}&participant_tokens=abc123&participant_tokens=abc123

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
dataBooleanUpdate status

Example:

{
"data": true,
"error": null
}

2.4.12 Delete Tournament Information

To delete a specific information from a tournament.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/DeleteTournamentInfoLanguage
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_idUintYesUnique identity of tournament
tournament_info_idStringYesUnique identity of tournament info id
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator

Example:
URL:

bo.me/external/Tournament/v2/DeleteTournamentInfoLanguage?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
tournament_id=1845&tournament_info_id=1875&operator_token=abc123&secret_key=a1b25c
de5f3gh46ijkl

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
dataBooleanUpdate status

Example:

{
"data": true,
"error": null
}

2.4.13 Remove a Tournament Player

To remove a Tournament player and their progress.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/CancelTournamentPlayer
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
tournament_player_idStringYesUnique identity of tournamentplayer id
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator

Example:
URL:

https://api.pg-
bo.me/external/Tournament/v2/CancelTournamentPlayer?trace_id=b3f37e57-2873-40b1-
aa95-f126c25ed311
Body:
tournament_player_id=843662&operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
dataBooleanRemove player status

Example:

{
"data": true,
"error": null
}

2.4.14 Revive Players

To reset the tournament progress for a specific player.

Request

API URL : {PgSoftAPIDomain}/Tournament/v2/RevivePlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
player_nameStringYesUnique identity of player name
sub_tournament_idUintYesUnique identity of tournament
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator

Example:
URL:

https://api.pg-bo.me/external/Tournament/v2/RevivePlayers?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
tournament_player_id=843662&operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl

Response Body Parameters:

Parameter nameData typeDescription
tournamentKeyStringUnique key of tournament
tournamentPlayerIdStringUnique identity of tournament player id
operatorTokenStringUnique identity of operator
playerNameStringUnique identity of player name
balanceAmountDecimalAmount given to player when revived
registerAllowedIntegerNumbers of times a player is allowed to re-register for the tournament
reviveAllowedIntegerNumbers of times a player is allowed to be revived in a tournament

Example:

{
"data": {
"tournamentKey": "1870-2283-843667_P",
"tournamentPlayerId": 456,
"operatorToken": "a**d",
"playerName": "hltestdev",
"balanceAmount": 200,
"registerAllowed": 9,
"reviveAllowed": 9
},
"error": null
}

2.5 Bet History [Latest version: v4]

PG provides APIs to get various types of bet history data. Please take note that API data will be only available within 3-5 minutes after each spin.

Only bets with completed status will be provided. Operator may check through PG Back Office for pending and failed bets.

Note:
External Bet History API is a dedicated API which using standalone URL: {DataGrabAPIDomain}

2.5.1 Get History

To get bet history.

Notes

  • Operator can retrieve the bet history for the last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.
  • PG may re-push data by renewing the data row version. Operator is required to identify and update duplicated data by betId.
  • Data row version cannot be a unique value. Operator is required to grab at least 1500 records for every request. Steps
  • Step 1: In the very first GetHistory API call, set row_version = 1
  • Step 2: Save the maximum rowVersion in each data grabbing request call
  • Step 3: In the subsequence calls, set the row_version value to the saved rowVersion in Step
  • Repeat step 2 and 3 until records returned are lesser than the required count (e.g.: 1500 records per request)
  • If the number of records returned are less than the required count, stop, and wait for a time interval (recommended 5 minutes) for the next API call
  • Identify duplicate records by checking duplicate betId in each call

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetHistory
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000
bet_typeIntegerYesBet types of bet record:
     1: Real game
row_versionLongYesUpdated time of data (Unix time stamp in milliseconds)
Note:
• Set value to 1 for first call
• Operator is required to save maximum row_version for each call, to be used as row_version value for next call request
hands_statusLongNoStatus of hands:
     0: All (Default)
     1: Non-last hand
     2: Last hand
     3: Adjusted

Example:
URL:

https://api.pg-bo.me/external-datagrabber/Bet/v4/GetHistory?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&bet_type=1&row_ver
sion=1346592723000&hands_status=0

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
betIdUlongUnique identity of child bet (Unique key value)
parentBetIdUlongUnique identity of parent bet
playerNameStringUnique identity of player
currencyStringCurrency used by player in the record
gameIdIntegerUnique identity of game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotRtpContributionAmountDecimalJackpot RTP contribution amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
handsStatusIntegerStatus of hand:
     1: Non-last hand
     2: Last hand
     3: Adjusted
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
betTimeIntegerStart time of current bet (Unix time stamp in milliseconds)
betEndTimeIntegerEnd time of current bet (Unix time stamp in milliseconds)
isFeatureBuyBooleanTo indicate the spin type:
     True: Feature spin
     False: Normal spin
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"betId": 1443839146530971100,
"parentBetId": 1443839146530971100,
"playerName": "player1",
"currency": "CNY",
"gameId": 92,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 500,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 78962.39,
"balanceAfter": 78462.39,
"handsStatus": 2,
"rowVersion": 1633073283123,
"betTime": 1633073052123,
"betEndTime": 1633073052123,
"isFeatureBuy": false
},
{
"betId": 1443839117799981300,
"parentBetId": 1443839028721351200,
"playerName": "player1",
"currency": "CNY",
"gameId": 92,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 0,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 79462.39,
"balanceAfter": 79462.39,
"handsStatus": 2,
"rowVersion": 1633073284123,
"betTime": 1633073045123,
"betEndTime": 1633073045123,
"isFeatureBuy": false
}
],
"error": null
}

2.5.2 Get History for Specific Time

To get the bet history for a specific time range.

Notes

  • Operator can retrieve the bet history for the last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.
  • We recommend operators delay grabbing the data after an hour as the data may update within an hour.
  • We also recommend operator always grab the data through the automated job for the data an hour ago.
  • Other than that, we strongly recommend operator to grab the data by Get History API instead of Get History for Specific Time API to prevent the data may update within an hour.

Steps

  • Step 1: In the very first GetHistory API call, set from_time = unix timestamp of your desired time, and set to_time as current time
  • Step 2: Save the maximum betEndTime in each data grabbing request call
  • Step 3: In the subsequence calls, set the from_time parameter value to the saved betEndTime in step 2, to_time parameter value may remain unchanged (current time)
  • Repeat step 2 and 3 until records returned are lesser than the required count (e.g.: 1500 records per request)
  • If number of records returned are less than the required count, stop, and wait for a time interval (recommended 5 minutes) for the next API call
  • Identify duplicate records by checking duplicate betId in each call

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetHistoryForSpecificTimeRange
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000
bet_typeIntegerYesBet types of bet record:
     1: Real game
from_timeLongYesTime range of the start time and end time of the bet records (Unix time stamp in milliseconds)
to_timeLongYesNote: Value range 1 day - 40 days

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetHistoryForSpecificTimeRange?trace_id=b3f37e57-2873-40b1-
aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&bet_type=1&from_ti
me=1346592723000&to_time=1546592723000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
betIdUlongUnique identity of child bet (Unique key value)
parentBetIdUlongUnique identity of parent bet
playerNameStringUnique identity of player
currencyStringCurrency used by player in the record
gameIdIntegerUnique identity of game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotRtpContributionAmountDecimalJackpot RTP contribution amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
handsStatusIntegerStatus of hand:
     1: Non-last hand
     2: Last hand
     3: Adjusted
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
betTimeIntegerStart time of current bet (Unix time stamp in milliseconds)
betEndTimeIntegerEnd time of current bet (Unix time stamp in milliseconds)
isFeatureBuyBooleanTo indicate the spin type:
     True: Feature spin
     False: Normal spin
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"betId": 1443924025750851300,
"parentBetId": 1443924025750851300,
"playerName": "player1",
"currency": "CNY",
"gameId": 89,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 6,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 17762.94,
"balanceAfter": 17756.94,
"handsStatus": 2,
"rowVersion": 1633093531234,
"betTime": 1633093281234,
"betEndTime": 1633093281234,
"isFeatureBuy": false
},
{
"betId": 1443924030033241300,
"parentBetId": 1443924030033241300,
"playerName": "player1",
"currency": "CNY",
"gameId": 89,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 6,
"winAmount": 36,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 17756.94,
"balanceAfter": 17786.94,
"handsStatus": 1,
"rowVersion": 1633093521234,
"betTime": 1633093291234,
"betEndTime": 1633093291234,
"isFeatureBuy": false
}
],
"error": null
}

2.5.3 Get Single Player History

To get bet history of specific player.

Notes

  • Operator can retrieve the bet history for the last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetPlayerHistory
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeDescription
betIdUlongUnique identity of child bet (Unique key value)
parentBetIdUlongUnique identity of parent bet
playerNameStringUnique identity of player
currencyStringCurrency used by player in the record
gameIdIntegerUnique identity of game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotRtpContributionAmountDecimalJackpot RTP contribution amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
handsStatusIntegerStatus of hand:
     1: Non-last hand
     2: Last hand
     3: Adjusted
rowVersionLongUpdated time of data
(Unix time stamp in milliseconds)
betTimeIntegerDate of current record
(Unix time stamp in milliseconds)
betEndTimeIntegerEnd time of current bet
(Unix time stamp in milliseconds)
isFeatureBuyBooleanTo indicate the spin type:
     True: Feature spin
     False: Normal spin

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetPlayerHistory?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player1&start_tim
e=1346592723000&end_time=1546592723000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
betIdUlongUnique identity of child bet (Unique key value)
parentBetIdUlongUnique identity of parent bet
playerNameStringUnique identity of player
currencyStringCurrency used by player in the record
gameIdIntegerUnique identity of game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotRtpContributionAmountDecimalJackpot RTP contribution amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
handsStatusIntegerStatus of hand:
     1: Non-last hand
     2: Last hand
     3: Adjusted
rowVersionLongUpdated time of data
(Unix time stamp in milliseconds)
betTimeIntegerDate of current record
(Unix time stamp in milliseconds)
betEndTimeIntegerEnd time of current bet
(Unix time stamp in milliseconds)
isFeatureBuyBooleanTo indicate the spin type:
     True: Feature spin
     False: Normal spin
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"betId": 1443458363362386000,
"parentBetId": 1443458363362386000,
"playerName": "fongying",
"currency": "CNY",
"gameId": 94,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 5,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 10001704.78,
"balanceAfter": 10001699.78,
"handsStatus": 2,
"rowVersion": 1632982509049,
"betTime": 1632982266626,
"betEndTime": 1632982266654,
"isFeatureBuy": false
},
{
"betId": 1443458366315176000,
"parentBetId": 1443458366315176000,
"playerName": "fongying",
"currency": "CNY",
"gameId": 94,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 5,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 10001699.78,
"balanceAfter": 10001694.78,
"handsStatus": 2,
"rowVersion": 1632982515184,
"betTime": 1632982267325,
"betEndTime": 1632982267354,
"isFeatureBuy": false
}
],
"error": null
}

2.5.4 Get Player’s Daily Summary

To get player’s daily bet history.

Notes

  • Operator can retrieve the bet history for the last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.
  • PG may re-push data by renewing data row version. Operator is required to identify, and update duplicated data by betId.
  • Data row version cannot

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetPlayerDailySummary
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000
bet_typeIntegerYesCategory of bet record:
     1: Real game
row_versionLongYesUpdated time of data (Unix time stamp in milliseconds)
Note:
• Set value to 1 for first call
• Operator is required to save maximum row_version for each call, to be used as row_version value for next call request
time_zoneIntegerNoTime zone:
• -5: UTC-5
• -4: UTC-4
• 0: UTC (Default)
• 1: UTC+1
• 4: UTC+4
• 7: UTC+7
• 8: UTC+8

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetPlayerDailySummary?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&bet_type=1&row_ver
sion=1346592723000&time_zone=8

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
playerNameStringUnique identity of player
playerTypeIntegerCategory of player:
     1: Real player
     2: Test player
gameIdIntegerUnique identity of game
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
currencyStringCurrency used by player in the record
handsIntegerCounts of main bets
gamesIntegerCounts of child bets
betAmountDecimalTurnover of player
winLossAmountDecimalWin/loss amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
summaryDateIntegerDate of current record (Unix time stamp in milliseconds)
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"playerName": " player1",
"playerType": 1,
"gameId": 39,
"betType": 1,
"transactionType": 1,
"platform": 1,
"currency": "EUR",
"hands": 2,
"games": 2,
"betAmount": 60.05,
"winLossAmount": -60.05,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"rowVersion": 1545971022000,
"summaryDate": 1545955200000
},
{
"playerName": "player2",
"playerType": 1,
"gameId": 24,
"betType": 1,
"transactionType": 1,
"platform": 1,
"currency": "EUR",
"hands": 9,
"games": 9,
"betAmount": 0.09,
"winLossAmount": 1.91,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"rowVersion": 1546238743000,
"summaryDate": 1546214400000
}
],
"error": null
}

2.5.5 Get Player’s Daily Summary for Specific Time

To get player daily bet history for specific time range.

Notes

  • Operator can retrieve the bet history forthe last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.
  • PG may re-push data by renewing data row version. Operator is required to identify, and update duplicated data by playerName, gameIdand summaryDate.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetPlayerDailySummaryForSpecificTimeRange
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000
bet_typeIntegerYesCategory of bet record:
     1: Real game
row_versionLongYesUpdated time of data
(Unix time stamp in milliseconds)
Note:
• Set value to 1 for first call
• Operator is required to save maximum row_version for each call, to be used as row_version value for next call request
from_timeLongYesTime range of start times and end
times of bet records
(Unix time stamp in milliseconds)
to_timeLongYesNote:
• Value range 1 day - 40 days
time_zoneIntegerNoTime zone:
• -5: UTC-5
• -4: UTC-4
• 0: UTC (Default)
• 1: UTC+1
• 4: UTC+4
• 7: UTC+7
• 8: UTC+8

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetPlayerDailySummaryForSpecificTimeRange?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&bet_type=1&from_ti
me=1346592723000&to_time=1546592723000&time_zone=8

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
playerNameStringUnique identity of player
playerTypeIntegerCategory of player:
     1: Real player
     2: Test player
gameIdIntegerUnique identity of game
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
currencyStringCurrency used by player in the record
handsIntegerCounts of main bets
gamesIntegerCounts of child bets
betAmountDecimalTurnover of player
winLossAmountDecimalWin/loss amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
summaryDateIntegerDate of current record (Unix time stamp in milliseconds)
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"playerName": " player1",
"playerType": 1,
"gameId": 39,
"betType": 1,
"transactionType": 1,
"platform": 1,
"currency": "EUR",
"hands": 2,
"games": 2,
"betAmount": 60.05,
"winLossAmount": -60.05,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"rowVersion": 1545971022000,
"summaryDate": 1545955200000
},
{
"playerName": "player2",
"playerType": 1,
"gameId": 24,
"betType": 1,
"transactionType": 1,
"platform": 1,
"currency": "EUR",
"hands": 9,
"games": 9,
"betAmount": 0.09,
"winLossAmount": 1.91,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"rowVersion": 1546238743000,
"summaryDate": 1546214400000
}
],
"error": null
}

2.5.6 Get Hands Summary

To get the game summary records of each hand.

Notes

  • Operator can retrieve the bet history for the last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.
  • PG may re-push data by renewing data row version. Operator is required to identify, and update duplicated data by betId.
  • Data row version cannot be a unique value. Operator is required to grab at least 1500 records for every request.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetHandsSummary
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000
bet_typeIntegerYesBet types of bet record:
     1: Real game
hands_statusLongYesStatus of hands:
     0: All
     1: Incomplete
     2: Completed
row_versionLongYesUpdated time of data (Unix time stamp in milliseconds)

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetHandsSummary?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&bet_type=1&hands_s
tatus=2&row_version=1346592723000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
parentBetIdUlongUnique identity of parent bet
playerNameStringUnique identity of player
gameIdIntegerUnique identity of game
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
currencyStringCurrency used by player in the record
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
handStartTimeIntegerStart time of current hand (Unix time stamp in milliseconds)
handEndTimeIntegerEnd time of current hand (Unix time stamp in milliseconds)
handsStatusIntegerStatus of hand:
     1: Non-last hand
     2: Last hand
     3: Adjusted
collapseSpinCountIntegerNumber of normal spin collapsed
collapseFreeSpinCountIntegerNumber of free spin collapsed
isFeatureBuyBooleanTo indicate the spin type:
     True: Feature spin
     False: Normal spin
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"parentBetId": 1443100640863068200,
"playerName": "fongying",
"gameId": 103,
"betType": 1,
"transactionType": 1,
"platform": 1,
"currency": "CNY",
"betAmount": 6,
"winAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 10001632.88,
"balanceAfter": 10001626.88,
"rowVersion": 1632897431960,
"handStartTime": 1632896978967,
"handEndTime": 1632896978967,
"handStatus": 2,
"collapseSpinCount": 0,
"collapseFreeSpinCount": 0,
"isFeatureBuy": false
},
{
"parentBetId": 1443100653622141000,
"playerName": "fongying",
"gameId": 103,
"betType": 1,
"transactionType": 1,
"platform": 1,
"currency": "CNY",
"betAmount": 6,
"winAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 10001626.88,
"balanceAfter": 10001620.88,
"rowVersion": 1632897431960,
"handStartTime": 1632896982003,
"handEndTime": 1632896982003,
"handStatus": 2,
"collapseSpinCount": 0,
"collapseFreeSpinCount": 0,
"isFeatureBuy": false
}
],
"error": null
}

2.5.7 Get Hourly Hands Summary

To get operator’s hourly hands summary records.

Notes

  • Operator can retrieve the bet history for the 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetHandsSummaryHourly
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
from_timeLongYesTime range of start times and end times of bet records (Unix time stamp in milliseconds)
to_timeLongYesNote: Value range 1 day - 40 days
currencyStringNoCurrency used by player in the record
Default: All currencies used by player in the record
transaction_typesInteger
Array
NoCategory of transaction:
     1: Cash
     2: Bonus
     3: Free game
Default: All category of transaction

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetHandsSummaryHourly?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&from_time=1567296000000&to_ti
me=1569801600000&currency=cny&transaction_types=1&transaction_types=2

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
dateTimeIntegerDate and time of a record per hour
totalHandsIntegerTotal count of game hands
currencyStringCurrency used by player in the record
totalBetAmountDecimalTotal amount of turnover
totalWinAmountDecimalTotal amount of pay-out
totalPlayerWinLossAmountDecimalTotal amount of player's win and loss
totalCompanyWinLossAmountDecimalTotal amount of company's win and loss
transactionTypeIntegerCategory of transaction:
     0: Adjusted bet (reset game state)
     1: Cash
     2: Bonus
     3: Free game
totalCollapseSpinCountIntegerTotal count of normal spin collapsed
totalCollapseFreeSpinCountIntegerTotal count of free spin collapsed
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"dateTime": 1633093200123,
"totalHands": 6,
"currency": "CNY",
"totalBetAmount": 23.8,
"totalWinAmount": 114,
"totalPlayerWinLossAmount": 90.2,
"totalCompanyWinLossAmount": -90.2,
"transactionType": 1,
"totalCollapseSpinCount": 8,
"totalCollapseFreeSpinCount": 0
},
{
"dateTime": 1633093200123,
"totalHands": 13,
"currency": "EUR",
"totalBetAmount": 15,
"totalWinAmount": 3.4,
"totalPlayerWinLossAmount": -11.6,
"totalCompanyWinLossAmount": 11.6,
"transactionType": 1,
"totalCollapseSpinCount": 2,
"totalCollapseFreeSpinCount": 0
},
{
"dateTime": 1633093200213,
"totalHands": 2,
"currency": "THB",
"totalBetAmount": 80,
"totalWinAmount": 0,
"totalPlayerWinLossAmount": -80,
"totalCompanyWinLossAmount": 80,
"transactionType": 1,
"totalCollapseSpinCount": 0,
"totalCollapseFreeSpinCount": 0
}
],
"error": null
}

2.5.8 Get Summary of Total Player Bets

To get the summary of total player bets for specific time range.

Notes

  • Operator can retrieve the bet history for the last 40 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetPlayerBetsSummationTotal
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
bet_typeIntegerYesBet types of bet record:
     1: Real game
from_timeLongYesTime range of start times and end times of bet records (Unix time stamp in milliseconds)
Note:
     Value range 1 day - 40 days.
     The time will be rounded off hourly.
     Example: If the request sent by operator is 1616250600000 (20/3/2021 2:30:00 PM) ~ 1616254200000 (20/3/2021 3:30:00 PM), system will return the data from 1616252400000 (20/3/2021 3:00:00 PM) to 1616256000000 (20/3/2021 4:00:00 PM)
to_timeLongYes
currencyStringNoCurrency used by player in the record
Default: All currencies used by player in the record
game_idsInteger ArrayNoUnique identity of games
Default: All games
player_modesInteger ArrayNoMode of game:
     0: Normal
     1: Cash bonus
Default: All mode of game
player_typeIntegerNoType of player:
     0: All (Default)
     1: Real player
     2: Test player
transaction_typesIntegerNoType of transaction:
     0: All (Default)
     1: Cash
     2: Bonus
     3: Free Game
time_zoneIntegerNoTime zone:
     -5: UTC-5
     -4: UTC-4
     0: UTC (Default)
     1: UTC+1
     4: UTC+4
     8: UTC+8

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetPlayerBetsSummationTotal?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&bet_type=1&from_time=13465927
23000&to_time=1346592723000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
totalCollapseSpinCountIntegerTotal count of normal spin collapsed
totalCollapseFreeSpinCountIntegerTotal count of free spin collapsed
currencyStringCurrency used by player in the record
totalRowCountIntegerTotal count of game rows
totalGamesIntegerTotal count of game rounds
totalHandsIntegerTotal count of game hands
totalBetAmountConvertedDecimal*Total bet amount of the player converted (currency as EUR)
totalWinLossAmountConvertedDecimal*Total win/loss amount of the player converted (currency as EUR)
totalCompanyWinLossAmountConvertedDecimal*Total win/loss amount of the company converted (currency as EUR)
totalJackpotRtpContributionAmountConvertedDecimal*Total jackpot RTP contribution amount of the records converted (currency as EUR)
totalJackpotContributionAmountConvertedDecimal*Total jackpot contribution amount of the records converted (currency as EUR)
totalJackpotWinAmountConvertedDecimal*Total jackpot win amount of the records converted (currency as EUR)
totalBetAmountDecimal*Total bet amount of records
totalWinLossAmountDecimal*Total win/loss amount of records
totalCompanyWinLossAmountDecimal*Total company win/loss amount of records
totalJackpotRtpContributionAmountDecimal*Total jackpot RTP contribution amount of records
totalJackpotContributionAmountDecimal*Total jackpot contribution amount of records
totalJackpotWinAmountDecimal*Total jackpot win amount of records
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"totalCollapseSpinCount": 8,
"totalCollapseFreeSpinCount": 0,
"currency": "CNY",
"totalRowCount": 1,
"totalGames": 14,
"totalHands": 6,
"totalBetAmountConverted": 3.05092,
"totalWinLossAmountConverted": 11.56274,
"totalCompanyWinLossAmountConverted": -11.56274,
"totalJackpotRtpContributionAmountConverted": 0,
"totalJackpotContributionAmountConverted": 0,
"totalJackpotWinAmountConverted": 0,
"totalBetAmount": 23.8,
"totalWinLossAmount": 90.2,
"totalCompanyWinLossAmount": -90.2,
"totalJackpotRtpContributionAmount": 0,
"totalJackpotContributionAmount": 0,
"totalJackpotWinAmount": 0
},
{
"totalCollapseSpinCount": 2,
"totalCollapseFreeSpinCount": 0,
"currency": "EUR",
"totalRowCount": 1,
"totalGames": 16,
"totalHands": 13,
"totalBetAmountConverted": 15,
"totalWinLossAmountConverted": -11.6,
"totalCompanyWinLossAmountConverted": 11.6,
"totalJackpotRtpContributionAmountConverted": 0,
"totalJackpotContributionAmountConverted": 0,
"totalJackpotWinAmountConverted": 0,
"totalBetAmount": 15,
"totalWinLossAmount": -11.6,
"totalCompanyWinLossAmount": 11.6,
"totalJackpotRtpContributionAmount": 0,
"totalJackpotContributionAmount": 0,
"totalJackpotWinAmount": 0
}
],
"error": null
}

2.5.9 Get Player’s Unfinished Games

To get a player unfinished hand.

Notes

  • Operator can retrieve the bet history for the last 60 days.
  • This API is for reporting purposes only. We do not recommend using this API for any other business operations. Please contact PG if you require it to integrate with business operations.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetPlayerUnfinishedGamesBet
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity for player
from_timeLongYesTime range of tournaments' start times and end times (Unix time stamp in milliseconds)
to_timeLongYesNote: Value range 1 day - 7 days
game_idsInteger ArrayNoUnique identity of games
Default: All games
time_zoneIntegerNoTime zone:
     -5: UTC-5
     -4: UTC-4
     0: UTC (Default)
     1: UTC+1
     4: UTC+4
     8: UTC+8

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/GetPlayerUnfinishedGamesBet?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abcd&secret_key=abc123&game_ids=1&player_name=player123&
from_time=1588723200000&to_time=1588982400000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
parentBetIdStringUnique identity of parent bet
gameIdIntegerUnique identity of game
transactionTypeIntegerCategory of transaction:
     0: Adjusted bet (reset game state)
     1: Cash
     2: Bonus
     3: Free game
platformIntegerPlatform of bet record
currencyStringCurrency of record
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotRtpContributionAmountDecimalJackpot RTP contribution amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
handStartTimeLongStart time of the hand
(Unix time stamp in milliseconds)
handEndTimeLongEnd time of the hand
(Unix time stamp in milliseconds)

Example:

{
"data": [
{
"parentBetId": 1444964157178265600,
"gameId": 108,
"transactionType": 1,
"platform": 1,
"currency": "CNY",
"betAmount": 375,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"balanceBefore": 10001446.89,
"balanceAfter": 10001071.89,
"handStartTime": 1633341275871,
"handEndTime": 1633341278912
}
],
"error": null
}

2.5.10 Get Bet Details

To retrieve the bet details of multiple bets

Notes

  • Operator can retrieve the bet history for the last 60 days.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetBetDetails
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
bet_idsUlongYesUnique identity of bets
Note:
• Max 10 bet ids

Example:
URL:

https://api.pg-bo.me/external-datagrabber/Bet/v4/GetBetDetails?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abcd&secret_key=abc123&bet_ids=1315486539764989952&bet_ids=13154865
39764989960

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
betIdUlongUnique identity of child bet (Unique key value)
parentBetIdUlongUnique identity of parent bet
playerNameStringUnique identity of player
currencyStringCurrency used by player in the record
gameIdIntegerUnique identity of game
platformIntegerPlatform of bet record
(Please refer to Platform for more information)
betTypeIntegerCategory of bet record:
     1: Real game

Category of transaction:
     0: Adjusted bet (reset game state)
transactionTypeInteger1: Cash
2: Bonus
3: Free game
betAmountDecimalTurnover of player
winAmountDecimalPay-out of player
jackpotRtpContributionAmountDecimalJackpot RTP contribution amount of player
jackpotContributionAmountDecimalJackpot contribution amount of player
jackpotWinAmountDecimalJackpot win amount of player
balanceBeforeDecimalBalance of player before transaction
balanceAfterDecimalBalance of player after transaction
handsStatusIntegerStatus of hand:
     1: Non-last hand
     2: Last hand
     3: Adjusted
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
betTimeIntegerStart time of current bet (Unix time stamp in milliseconds)
betEndTimeIntegerEnd time of current bet (Unix time stamp in milliseconds)
isFeatureBuyBooleanTo indicate the spin type:
     True: Feature spin
     False: Normal spin
  • System might return results up to 6 decimal places depending on game and balance

Example:

{
"data": [
{
"betId": 1443924025750851600,
"parentBetId": 1443924025750851600,
"playerName": "jj02",
"currency": "CNY",
"gameId": 89,
"platform": 1,
"betType": 1,
"transactionType": 1,
"betAmount": 6,
"winAmount": 0,
"jackpotRtpContributionAmount": 0,
"jackpotContributionAmount": 0,
"jackpotWinAmount": 0,
"balanceBefore": 17762.94,
"balanceAfter": 17756.94,
"handsStatus": 2,
"rowVersion": 1633093533869,
"betTime": 1633093289187,
"betEndTime": 1633093289215,
"isFeatureBuy": false
}
],
"error": null
}

2.5.11 Get Failed Bets

To retrieve failed bets.

Notes

  • Operator can retrieve the bet history for the last 60 days.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetFailedBets
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
from_timeLongYesTime range of the start time and end times of enquiries
to_timeLongYes(Unix time stamp in milliseconds)
Note: Value range 1 day - 40 days
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000

Example:
URL:

https://api.pg-bo.me/external-datagrabber/Bet/v4/GetFailedBets?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&count=5000&from_time=13465927
23000&to_time=1546592723000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
betIdIntegerUnique identity of child bet (Unique key value)
playerNameStringUnique identity of player
messageStringFailed reason
betStartTimeIntegerStart time of current bet
(Unix time stamp in milliseconds)

Example:

{
"data": [
{
"betId": 10832988,
"playerName": "testplayer1",
"message": "Bet not found.",
"betStartTime": 1600165980624
},
{
"betId": 10832989,
"playerName": " testplayer2",
"message": "Bet not found.",
"betStartTime": 1600165980624
}
],
"error": null
}

2.5.12 Pending Bets

Sometimes pending bets may occur due to unforeseen circumstances during gameplay for example, network latency, system failure, system timeout and so on.

Generally, pending bet will be resolved automatically when the player relaunches the game. However, the bet will remain in pending status for some rare scenarios:

  • Player did not relaunch the game after encountering an error
  • PG Soft system did not receive any response from the operator when resolving pending bets
  • PG Soft system receive an error response from the operator when resolving pending bets

Default interval of pending bet resolving time is set to 60 minutes. Pending bets which exceed the interval will be resolved by PG Soft system automatically. This interval is customizable, and every operator can have their own bet resolve interval time.

Manual resolve is required when failure to resolve pending bets after several attempts. In such case, operator is required to resolve the pending bet manually, and PG Soft will mark these bets’ statuses as complete after getting the confirmation from the operator.

666 Flow chart

2.5.13 Get Pending Bets

To retrieve pending bets.

Notes

  • Operator can retrieve the bet history for the last 7 days.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/GetPendingBets
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_namesstringNoUnique identity of player
Default: All players
from_timeLongYesTime range of the start time and end times of enquiries
to_timeLongYes(Unix time stamp in milliseconds)
Note: Value range 1 day - 7 days
countIntegerYesNumber of records for each batch
Note: Value range 1500-5000

Example:
URL:

https://api.pg-bo.me/external-datagrabber/Bet/v4/GetPendingBets?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_names=testplayer1&play
er_names=testplayer2&count=5000&from_time=1346592723000&to_time=1546592723000

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
playerNameStringUnique identity of player
gameIdStringUnique identity of game
betStatusIntegerStatus of bet
     1: Pending
betIdUlongUnique identity of child bet (Unique key value)
betAmountDecimalBet amount of game
betTimeIntegerStart time of current bet
(Unix time stamp in milliseconds)

Example:

{
"data": [
{
"playerName": "player1",
"gameId": 38,
"betStatus": 1,
"betId": 1444876729369241300,
"betAmount": 500,
"betTime": 1633320431123
}
],
"error": null
}

2.5.14 Manual Resolve of Pending Bet

To manually resolve pending bet.

Request

API URL : {DataGrabAPIDomain}/Bet/v4/ManualResolveBet
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_namestringYesUnique identity of player
bet_idIntegerYesUnique identity of child bet (Unique key value)
is_success_betBooleanYesStatus of bet:
     True: Successful bet
     False: Failed bet
game_idIntegerYesUnique identity of game
balance_before_adjustmentDecimalNoPlayer balance before adjustment (For successful bet only)
Default value: 0

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/ManualResolveBet?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=testplayer1&bet_i
d=1325714346441543680&is_success_bet=true&game_id=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
resolveStatusBooleanBet resolve result:
     True: Successful
     False: Failed
betStatusIntegerStatus of bet:
     0: Non-pending
     1: Pending
     2: Failed
     3: Successful
     4: Adjusted

Please refer to the following use cases for further details of API response:

Actual Bet StatusIs Success_Bet Value in 1st RequestIs Success_Bet Value in 2nd RequestAPI Response
Successful BetTrue-resolveStatus: False, betStatus: 0
Successful BetTrueTrueresolveStatus: False, betStatus: 0
Successful BetFalse-resolveStatus: False, betStatus: 0
Successful BetFalseFalseresolveStatus: False, betStatus: 0
Failed BetTrue-resolveStatus: False, betStatus: 0
Failed BetFalse-resolveStatus: False, betStatus: 0
Pending BetTrue-resolveStatus: True, betStatus: 3
Pending BetTrueTrueresolveStatus: True, betStatus: 3
Pending BetFalseTrueresolveStatus: True, betStatus: 2
Pending BetFalseFalseresolveStatus: True, betStatus: 2
Pending BetTrueFalseresolveStatus: False, betStatus: 3
Pending BetFalseTrueresolveStatus: False, betStatus: 2

Example:

{
"data": {
"resolveStatus": true,
"betStatus": 3
},
"error": null
}

Error Response

CodeMessage
1307Invalid player game session

2.5.15 Manual Reset of Pending Game State

To reset pending game state.

Request

API URL : 
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between
PGSoft and operator
player_namestringYesUnique identity of player
game_idIntegerYesUnique identity of game
operator_player_sessionstringYesOperator session for player

Example:
URL:

https://api.pg-bo.me/external-
datagrabber/Bet/v4/ManualResetGameState?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=testplayer1&game_
id=1

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
resetStatusBooleanBet resolve result:
True: Successful
False: Failed

Example:

{
"data": {
"resetStatus": true
},
"error": null
}

2.6 Game [Latest version: v2]

2.6.1 Get Games List

To get list of games.

Request

API URL : {PgSoftAPIDomain}/Game/v2/Get
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
currencyStringYesCurrency of game's legal bet amount
languageStringNoLanguage of data content:
     en-us: English (Default)
     zh-cn: Chinese
statusIntegerNoStatus of games:
     0: Inactive games
     1: Active games
Default: All status of games

Example:
URL:

https://api.pg-bo.me/external/Game/v2/Get?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&currency=CNY&language=en-
us&status=1

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
gameIdIntegerUnique identity of game
gameNameStringGiven name of game
gameCodeStringUnique code of game
gameLegalBetAmountsJSON ArrayLegal bet amount of games
statusIntegerGlobal status of game:
     0: Inactive
     1: Active
     2: Suspended
Note: Game will only be accessible if game status and game release status are active
releaseStatusIntegerStatus of game for operator:
     0: Inactive
     1: Active
     2: Suspended
Note: Game will only be accessible if game status and game release status are active
isSupportFreeGameBooleanTo indicate if free game is supported:
     True: Supported
     False: Not supported
categoryIntegerCategory of game:
     1: Slot game
     2: Card game

gameLegalBetAmounts JSON Array

Parameter nameData typeDescription
gameIdIntegerUnique identity of game
gameTypeIdIntegerType of game (Card game only):      0: None
     1: Baccarat-Supersix
     2: Baccarat-Commission
legalBetAmountsJSON ArrayAvailable legal bet amount of games

legalBetAmounts JSON Array

Parameter nameData typeDescription
coinSizeDecimalBet size of game
betMultiplierIntegerBet level of game
baseBetIntegerBase bet of game
betAmountDecimalBet amount of game

Example:

{
"data”: [
{
"gameId": 1,
"gameName": "Honey Trap of Diao Chan",
"gameCode": "diaochan",
"status": 1,
"releaseStatus": 1,
"isSupportFreeGame": true,
"category": 1,
"gameLegalBetAmounts": [

{

"gameId": 1,
"gameTypeId": 0,
"legalBetAmounts": [

{
"coinSize": 0.03,
"betMultiplier": 1,
"baseBet": 30,
"betAmount": 0.9

},
{

"coinSize": 0.03,
"betMultiplier": 2,
"baseBet": 30,
"betAmount": 1.8

}
]
}]
}

To get the legal bet amounts of the games.

Request

API URL : {PgSoftAPIDomain}/Game/v2/GetGameLegalBetAmounts
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
currencyStringYesCurrency of game's legal bet amount
game_idsInteger ArrayYesUnique identity of games

Example:
URL:

https://api.pg-bo.me/external/Game/v2/GetGameLegalBetAmounts?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&currency=CNY&game_ids=1&game_
ids=2

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
gameIdIntegerUnique identity of game
gameTypeIdIntegerType of game (Card game only):
     0: None
     1: Baccarat - Supersix
     2: Baccarat - Commission
legalBetAmountsJSON ArrayAvailable legal bet amount of games

legalBetAmounts JSON Array

Parameter nameData typeDescription
coinSizeDecimalBet size of game
betMultiplierIntegerBet level of game
baseBetIntegerBase bet of game
betAmountDecimalBet amount of game

Example:

{
"data": [
{
"gameId": 1,
"gameTypeId": 0,
"legalBetAmounts": [
{
"coinSize": 0.03,
"betMultiplier": 1,
"baseBet": 30,
"betAmount": 0.9
},
{
"coinSize": 0.03,
"betMultiplier": 2,
"baseBet": 30,
"betAmount": 1.8
}
]
}
],
"error": null
}

2.6.3 Change Operator’s Game Release Status

To change the game release status on operator’s side.

Request

API URL : {PgSoftAPIDomain}/Game/v2/UpdateGameStatus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters: 666

Example:
URL:

https://api.pg-bo.me/external/Game/v2/UpdateGameStatus?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&release_status=1&game_ids=1&g
ame_ids=2

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
actionResultBooleanRequest results:
     False: Failed
     True: Successful

Example:

{
"data": {
" actionResult": true
},
"error": null
}

2.6.4 Get Game Cert

To get game certificates.

Request

API URL : {PgSoftAPIDomain}/Game/v2/GetGamesCert
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
game_idsIntegerNoUnique id of each game
Default: All games
Array
game_codesString ArrayNoUnique code of each game
Default: All games

Example:
URL:

https://api.pg-bo.me/external/Game/v2/GetGamesCert?trace_id=b3f37e57-2873-40b1-
aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&game_ids=1&game_code=diaochan

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
game_idIntegerUnique id of each game
game_nameStringUnique name of each game
game_codeStringUnique code of each game
certJSON ArrayList of the certificates

JSON Array

Parameter nameData typeDescription
hashStringHash value of the game file
fileStringName of the game file

Example:

{
"data": [
{
"game_id": 1,
"game_name": "Honey Trap of Diao Chan",
"game_code": "diaochan",
"cert": [
{
"hash": "e2cac0a05c7407c32fd50c4e6fb6779161dfeecc",
"file": "PG.Common.GameCore.RNG.dll"
},
{
"hash": "c4280d2afa00fd17e6b037bd7f4a1fa53b620775",
"file": "PG.Common.GameCore.Slot.Engine.dll"
},
{
"hash": "144c068a7011bb22e57e967e3561200ae2b8f41e",
"file": "PG.Game.DiaoChan.Engine.dll"
},
{
"hash": "bb95b970f2b57c62c96c111e8ddb6ac3961b0881",
"file": "PG.SlotGames.Source.DiaoChan.dll"
}
]
}
],
"error": null
}

2.7 Cash [Latest version: v2]

2.7.1 Get Wallet Transaction

To get the wallet transaction.

Note

  • Operator can only retrieve record for the last 40 days.

Request

API URL : {DataGrabAPIDomain}/cash/v2/GetWalletTransactions
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
row_versionLongYesUpdated time of data (Unix time stamp in milliseconds)
player_nameStringNoUnique identity of player
Default: All players
row_countIntegerNoNumber of records for each batch
Note:
• Default value: 1
• Value range: 1-5000
currencyStringNoCurrency of player
Default: All currencies of player

Example:
URL:

666https://api.pg-bo.me/external-
datagrabber/cash/v1/GetWalletTransactions?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&row_version=1346592723000&pla
yer_name=testplayer1&row_count=10&currency=CNY

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
lastRowVersionLongUpdated time of data (Unix time stamp in milliseconds)
resultJSON ArrayList of the result

JSON Array

Parameter nameData typeDescription
transactionIdStringUnique identity of transaction
playerNameStringUnique identity of player
currencyCodeStringCurrency of player
transactionTypeIntegerTransaction type:
     101: Payout
     201: Bet
transactionAmountDecimalTransaction amount
transactionFromDecimalBalance before transaction
transactionToDecimalBalance after transaction
transactionDateTimeLongTransaction date and time

Example:

{
"data": {
"lastRowVersion": 1598617560000,
"result": [
{
"transactionId": 13777918,
"playerName": "Player1",
"currencyCode": "CNY",
"transactionType": 100,
"transactionAmount": 2,
"transactionFrom": 20001873.53,
"transactionTo": 20001875.53,
"transactionDateTime": 1598617560000
}
]
},
"error": null
}

2.7.2 Get Manual Adjustment Details

To get the manual adjustment details.

Note

  • Operator can only retrieve record for the last 60 days.

Request

API URL : 
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
currencyStringNoCurrency of player
Default: All currencies of player
row_versionLongYesUpdated time of data (Unix time stamp in milliseconds)
Note:
• Number of records for each batch
row_countIntegerNoDefault value: 1
Value range: 1-5000
transaction_typeStringNoTransaction type:
     900: External Adjustment
     901: Tournament Adjustment
Default: All transaction type
transaction_reference_idStringNoReference Id for adjustment
Default: All reference id for adjustment
statusIntegerNoStatus of manual adjustment
     1: Success
     0: Pending
Default: Status of manual adjustment

Example:
URL:

https://api.pg-bo.me/external-datagrabber
/Cash/v2/GetManualAdjustmentDetails?trace_id=b3f37e57-2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&row_count=10&currency=CNY&row
_version=1346592723000&row_count=1&transaction_type=901&transaction_reference_id=a
djustment-001&status=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
lastRowVersionLongUpdated time of data (Unix time stamp in milliseconds)
resultJSON ArrayList of the result

JSON Array

Parameter nameData typeDescription
playerNameStringUnique identity of player
operatorTokenStringUnique identity of operator
currencyCodeStringCurrency of player
transactionReferenceIdStringReference Id for adjustment
transactionTypeIntegerTransaction type:
     900: External Adjustment
     901: Tournament Adjustment
transactionAmountDecimalAdjustment amount
transactionDateTimeLongAdjustment date and time
statusIntegerStatus of manual adjustment:
     1: Success
     0: Pending
transactionRemarkStringRemark for Adjustment

Example:

{
"data": {
"lastRowVersion": 1624444862653,
"result": [
{
"playerName": "abc",
"operatorToken": "aabbcc",
"currencyCode": "CNY",
"transactionReferenceId": "CASH-1234-1234567",
"transactionType": 901,
"transactionAmount": 1000,
"transactionDateTime": 1624444862653,
"status": 1,
"transactionRemark": ""
}
]
},
"error": null
}

2.8 Player [Latest version: v3]

2.8.1 Get Online Player Count

To get the total number of online players.

Request

API URL : {PgSoftAPIDomain}/Player/v3/GetOnlinePlayerCount
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity for operator
secret_keyStringYesShared passphrase between PGSoft and operator
game_idIntegerNoUnique identity for game
Note: System will return list of online players for all games if parameter value is not provided

Example:
URL:

https://api.pg-bo.me/external/Player/v3/GetOnlinePlayerCount?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&game_id=1

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
totalCountIntegerTotal number of records
totalPlayerCountIntegerTotal number of online players
onlinePlayerSummaryJSON ArrayList of online players for games

JSON Array

Parameter nameData typeDescription
rowVersionLongUpdated time of data (Unix time stamp in milliseconds)
gameIdIntegerUnique identity for game
playerCountIntegerTotal number of online players
statusIntegerStatus of player
     1: Online

Example:

{
"data": {
"onlinePlayerSummary": [
{
"rowVersion": 1581073260000,
"gameId": 0,
"playerCount": 1,
"status": 1
},
{
"rowVersion": 1581073260000,
"gameId": 52,
"playerCount": 1,
"status": 1
},
{
"rowVersion": 1581073260000,
"gameId": 68,
"playerCount": 1,
"status": 1
}
],
"totalCount": 3,
"totalPlayerCount": 3
},
"error": null
}

2.8.2 Get Players’ Online Status

To get the max 10 players last online statuses.

Request

API URL : {PgSoftAPIDomain}/Player/v3/GetPlayersOnlineStatus
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_namesString ArrayYesUnique identity of player

Example:
URL:

https://api.pg-bo.me/external/Player/v3/GetPlayersOnlineStatus?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311
Body:
https://api.pg-bo.me/external/Player/v3/GetPlayersOnlineStatus?trace_id=b3f37e57-
2873-40b1-aa95-f126c25ed311

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
playerNameStringUnique identity for player
gameIdStringUnique identity for game
statusIntegerOnline status of player:
     0: Offline
     1: Online

Example:

{
"data": [
{
"playerName": "player1",
"status": 1,
"gameId": 12
},
{
"playerName": "player2",
"status": 0
}
],
"error": null
}

2.8.3 Get Online Player List

To get a list of online players.

Request

API URL : {PgSoftAPIDomain}/Player/v3/GetOnlinePlayers
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
row_countIntegerNoNumber of records for each batch
Note:
• Default value: 1000
• Value range: 1-1000
row_versionLongNoUpdated time of data (Unix time stamp in milliseconds)
Default value: 1

Example:
URL:

https://api.pg-bo.me/external/Player/v3/GetOnlinePlayers?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&row_count=10

Response Body Parameters:
JSON Array

Parameter nameData typeDescription
playerNameStringUnique identity for player
gameIdIntegerUnique identity for game
Updated time of data
rowVersionLong(Unix time stamp in milliseconds)
Default value: 1

Example:

{
"data": [
{
"playerName": "tesplayer01",
"gameId": 60,
"rowVersion": 1607503788000
},
{
" playerName": "tesplayer02",
"gameId": 65,
"rowVersion": 1607503809000
}
],
"error": null
}

2.8.4 Create Player

To create a new player’s account in PG game system.

Note Implementation of this API is optional as player account will be created automatically for a first-time player to access PG games.

Request

API URL : {PgSoftAPIDomain}/v3/Player/Create
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData TypeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of players
• player name is not case sensitive
• Only alphabet, number, and "@", "", "-", "_" symbols are allowed
Note: Max 50 characters
nicknameStringNoNickname of player
Note: Max 50 characters
currencyStringYesCurrency of player

Example:
URL:

https://api.pg-bo.me/external/v3/Player/Create?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player123&currenc
y=EUR&nickname=player123

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
action_resultIntegerStatus of the request:
     1: Successful
     0: Failed

Example:

{
"data": {
"action_result": 1
},
"error": null
}

Error Response

CodeMessage
1034Invalid request
1035Operation Failed
1200Internal server error
1204Invalid operator
1305Invalid player
1315Player has another operation is in progress

2.8.5 Kick Out Player

To kick out a player from a PG game. The player will still be able to re-login to the game.

Request

API URL : {PgSoftAPIDomain}/v3/Player/Kick
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of players

Example:
URL:

https://api.pg-bo.me/external/v3/Player/Kick?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player123

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
action_resultIntegerStatus of the request:
     1: Successful
     0: Failed

Example:

{
"data": {
"action_result": 1
},
"error": null
}

Error Response

CodeMessage
1034Invalid request
1035Operation Failed
1200Internal server error
1204Invalid operator
1305Invalid player
1315Player has another operation is in progress

2.8.6 Suspend Player

To suspend a player’s account. The suspended players will not be able to access PG games anymore.

Request

API URL : {PgSoftAPIDomain}/v3/Player/Suspend
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of players
reasonStringYesReason to suspend the player

Example:
URL:

https://api.pg-bo.me/external/v3/Player/Suspend?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player123&reason=
suspendedplayer

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
action_resultIntegerStatus of the request:
     1: Successful
     0: Failed

Example:

{
"data": {
"action_result": 1
},
"error": null
}

Error Response

CodeMessage
1034Invalid request
1035Operation Failed
1200Internal server error
1204Invalid operator
1305Invalid player
1315Player has another operation is in progress

2.8.7 Resume Player

To resume a suspended player’s account.

Request

API URL : {PgSoftAPIDomain}/v3/Player/Reinstate
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of players
reasonStringYesReason of resume suspended player

Example:
URL:

https://api.pg-bo.me/external/v3/Player/Reinstate?trace_id=b3f37e57-2873-40b1-
aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player123&reason=
resumesuspendedplayer

Response Body Parameters:
JSON Object

Parameter nameData typeDescription
action_resultIntegerStatus of the request:
     1: Successful
     0: Failed

Example:

{
"data": {
"action_result": 1
},
"error": null
}

Error Response

CodeMessage
1034Invalid request
1035Operation Failed
1200Internal server error
1204Invalid operator
1305Invalid player (player already existed)
1315Player has another operation is in progress

2.8.8 Check Player Status

To check a specific player's account status.

Note This API is not to check an online player’s status, it is just to check the player’s account status in PG system. To check for an online active player, please check using the back office.

Request

API URL : {PgSoftAPIDomain}/v3/Player/Check
HTTP method : POST

URL Parameters:

Parameter nameData TypeMandatoryDescription
trace_idStringYesUnique identity (GUID) of the request.
Note:
• Please set the parameter value as GUID format.

Body Parameters:

Parameter nameData typeMandatoryDescription
operator_tokenStringYesUnique identity of operator
secret_keyStringYesShared passphrase between PGSoft and operator
player_nameStringYesUnique identity of players

Example:
URL:

https://api.pg-bo.me/external/v3/Player/Check?trace_id=b3f37e57-2873-40b1-aa95-
f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&player_name=player123

Response Body Parameters:
JSON Object

Parameter nameData TypeDescription
player_nameStringUnique identity of players
statusIntegerStatus of the request:
     0: Disabled
     1: Active
     2: Inactive/Deactivated
     3: Suspended
     4: Player has another operation is in progress

Example:

{
"data": {
"player_name": "player123",
"status": 1
},
"error": null
}

Footnotes

  1. This field will show null value in error response

  2. This field will show null value in success API response. Please refer to error response section for error response format