PG Soft Slots games API Integrations Document External v1.12

1. Overview
The External API allows you to programmatically access PGSoft’s tools and services. You can use these
APIs to retrieve information, create, modify, or cancel various PG services such as free games, bonus
games, tournament and more.
PGSoft APIs are divided by services. Each of these services has its own section in this documentation.
All APIs in this documentation are optional, operator may choose to integrate API based on
requirements.
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
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
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:
Example
Host:
apiexample.pgsoft.com
x-date: 20190902
x-content-sha256:
1700116101f424b9f6fc695b4dbaf2b7b0ee763ba1b3b53298e3069143ed46f
1
Authorization: PWS-HMAC-SHA256
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:
To calculate a signature, you first need a string that includes {host}{x-content-sha256}{xdate} to sign. You will then calculate a HMAC-SHA256 hash of the string to sign by using a
signing key:
Calculate a HMAC-SHA256 hash of the string body:
Example
Salt : SALTEXAMPLE
Host : apiexample.pgsoft.com
x-date : 20190902
x-content-sha256 :
1700116101f424b9f6fc695b4dbaf2b7b0ee763ba1b3b53298e3069143ed46f1
Signature:
d78220cf06ae85f9d1db11dad9c3fd926799619eab3d28574aadb8cf328cd7aa
Component Description
Credential
Your 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
SignedHeaders
A 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
Signature
The 256-bit signature expressed as 64 lowercase hexadecimal characters.
Example:
d78220cf06ae85f9d1db11dad9c3fd926799619eab3d28574a
adb8cf328cd7aa
hmac-sha256({salt}, {host}{x-content-sha256}{x-date})
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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value
as GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft
and operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
from_time Long Yes
Time range of free games’ start times
(Unix time stamp in milliseconds)
to_time Long Yes
Time range of free games’ end times
(Unix time stamp in milliseconds)
free_game_id Integer No
Unique identity of free game
Default: All free games
currency String No
Currency of free game
Default: All currencies of free games
free_game_name String No
Given name of free game
Default: All given name of free games
free_game_transfer_type Integer No
Transfer type for free game
0: Standard
3: Flexible
Default: All transfer types
conversion_type Char No
Type of conversion after free game is
completed:
C: Cash
B: Bonus
Default: All conversion types
status Integer No
Status 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-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&f
rom_time=1346592723000&to_time=1546592723000&free_game_id=12345¤cy=CNY&free_
game_name=freegame2019&free_game_transfer_type=1&conversion_type=C&status=1
Response
Body Parameters:
JSON Object
Parameter name Data type Description
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of free games
JSON Array
Parameter name Data type Description
operatorToken String Unique identity of operator
freeGameId Integer Unique identity of free game
freeGameName String Given name of free game
transaction_id String Unique identity of transaction
isEvent Boolean
Type of free game:
True: Flexible
False: Standard
gameIds
Integer
Array
Unique identity of games
totalGame Integer
Total number of free games that will be given to a
single player
currencyCode String Currency of free game
coinSize Decimal Coin size of free game
multiplier Integer Bet multiplier of free game
minimumConversionAmount Decimal The minimum cash conversion amount of free game
maximumConversionAmount Decimal The maximum cash conversion amount of free game
conversionType Char
Type of conversion after free game is completed:
C: Cash
B: Bonus
bonusRatio Decimal
Wagering requirement for bonus game.
Refers to the multiple of the turnover in free game
that needs to be completed after the amount won in
free game has been transferred to the bonus wallet
bonusRatioAmount Decimal
Wagering 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
bonusMinimumConversionA
mount
Decimal
The minimum cash conversion amount of bonus
game
bonusMaximumConversionA
mount
Decimal
The maximum cash conversion amount of bonus
game
bonusType Integer
Bonus game conversion type:
0: Bonus
1: Cash
2: Bonus & Cash
status Integer
Status of free game:
0: Inactive (Cancelled)
1: Active
2: Expired
freeGameCountGiven Integer Total number of given free games
numberOfPlayers Integer Total number of players in free game
expiredDate Long
Expiry date of free game
(Unix time stamp in milliseconds)
createdDate Long
Created date of free game
(Unix time stamp in milliseconds)
createdBy String API or BackOffice user who created the free game
updatedBy String API or BackOffice user who updated the free game
isSupressDiscard Boolean
Permission 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.00,
"maximumConversionAmount": 1000.00;
"conversionType": "B",
"bonusRatio": 2,
"bonusRatioAmount": 0,
"bonusMinimumConversionAmount": 1000.00,
"bonusMaximumConversionAmount": 1500.00;
"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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value as
GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft and
operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
free_game_id Integer Yes Unique identity of free game
from_transaction_time Long Yes Time range of free game player’s
transactions
(Unix time stamp in milliseconds) to_transaction_time Long Yes
player_name String
No Unique identity of player
Note: Fuzzy matching is implemented
Default: All players
Example:
URL:
https://api.pgbo.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&f
ree_game_id=12345&player_name=player1&from_transaction_time=1346592723000&to_trans
action_time=1346592723000
Response
Body Parameters:
JSON Object
Parameter name Data type Description
totalConvertedAmount Decimal
Total amount that has been converted to cash in
free game
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of free games
JSON Array
Parameter name Data type Description
balanceId Integer Unique identity of player’s free game wallet
playerName String Unique identity of player
currencyCode String Currency of player
gameId Integer Unique identity of game
transactionAmount Decimal Converted amount of player
transactionDateTime Long Time of conversion
Example:
{
"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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value as
GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft and
operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
free_game_id Integer Yes Unique identity of free game
from_transaction_time Long Yes Time range of free game player’s
transactions
(Unix time stamp in milliseconds) to_transaction_time Long Yes
player_name String No
Unique identity of player
Note: Fuzzy matching is implemented
Default: All players
Example:
URL:
https://api.pgbo.me/external/FreeGame/v1/GetFreeGameBonusConvertedWallet?trace_id=b3f37e57-2873-
40b1-aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl&page_number=1&row_count=500&f
ree_game_id=12345&player_name=player1&from_transaction_time=1346592723000&to_trans
action_time=1346592723000
Response
Body Parameters:
JSON Object
Parameter name Data type Description
totalConvertedAmount Decimal
Total amount that has been converted to cash in
free game
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of free game players’ details
JSON Array
Parameter name Data type Description
balanceId Integer Unique identity of player’s free game wallet
playerName String Unique identity of player
currencyCode String Currency of player
gameId Integer Unique identity of game
transactionAmount Decimal Amount converted of player
transactionDateTime Long
Time of convert
(Unix time stamp in milliseconds)
Example:
{
"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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value as
GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft and
operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
free_game_id Integer Yes Unique identity of free game
from_time Long Yes Time range of free games’ start times
to_time Long Yes (Unix time stamp in milliseconds)
player_name String No
Unique identity of free game player
Note: Fuzzy matching is implemented
Default: All players
status Integer No
Status 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 name Data type Description
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of players in a free game
JSON Array
Parameter name Data type Description
balanceId Integer Unique identity of player’s free game wallet
playerId Integer Unique identity of player in free game
playerName String Unique identity of player in free game
walletType String
Type of player wallet in free game:
G: Free Game
B: Bonus
balanceAmount Decimal Player balance of free game
bonusRatioAmount Decimal
Wagering requirement for bonus game.
Refers to the total amount that need to be
completed after the amount won in free game has
been transferred to the bonus wallet
bonusMaximumConversion
Amount
Decimal Maximum conversion amount for free game’s bonus
freeGameMaximumConver
sionAmount
Decimal Maximum conversion amount for free game
freeGameCount Integer The player’s number of free games
status Integer
Status of free game wallet:
0: Inactive (Cancelled)
1: Active
2: Expired
3: Converted
4: Completed
5: New
6: User Cancelled
8: Pending
expiredDate Long
Expiry date of free game
(Unix time stamp in milliseconds)
createdBy String API or BackOffice user who created the free game
updatedBy String API or BackOffice user who updated the free game
updatedDate Long
Date of when a player is registered or re-registered
into the free game
(Unix time stamp in milliseconds)
createdDate Long
Date 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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value
as GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft
and operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
free_game_id Integer Yes Unique identity of free game
player_name String No
Unique identity of free game ‘s
unregistered player
Note: Fuzzy matching is
implemented
Default: All players
status Integer No
Status of wallet of unregistered
player:
0: Inactive (Cancelled)
1: Pending
2: Transferred
Default: All status
Example:
URL:
https://api.pgbo.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&p
layer_name=player1&free_game_id=12345&status=1
Response
Body Parameters:
JSON Object
Parameter name Data type Description
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of unregistered players in a free game
JSON Array
Parameter name Data type Description
pendingWalletId Integer
Unique identity of free game’s player’s pending
wallet
playerName String Unique identity of free game’s un-registered player
status Integer
Status of unregistered player’s wallet:
0: Inactive (Cancelled)
1: Pending
2: Transferred
updatedDate Long
Date of when a player is registered or re-registered
into the free game
(Unix time stamp in milliseconds)
createdDate Long
Date of when a player is registered into the free
game
(Unix time stamp in milliseconds)
createdBy String API or BackOffice user who registered the player
updatedBy String
API 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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value
as GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft
and operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
free_game_id Integer Yes Unique identity of free game
from_time Long Yes
Time range of free games’ start time
(Unix time stamp in milliseconds)
to_time Long Yes
Time range of free games’ end time
(Unix time stamp in milliseconds)
player_name String No
Unique identity of free game’s
unregistered player
Note: Fuzzy matching is
implemented
Default: All players
status Integer No
Status 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/GetFreeGameAllPlayers?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 name Data type Description
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of all players in a free game
JSON Array
Parameter name Data type Description
balanceId Integer Unique identity of player’s free game wallet
playerId Integer Unique identity of free game’s player
playerName String Unique identity of free game’s player
walletType String
Type of player wallet:
G: Free Game
B: Bonus
balanceAmount Decimal
Player balance of unconverted free game, or
converted amount of converted free game
bonusRatioAmount Decimal
Wagering 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
bonusMinimumConversion
Amount
Decimal Minimum conversion amount for free game’s bonus
bonusMaximumConversion
Amount
Decimal Maximum conversion amount for free game’s bonus
freeGameMaximumConver
sionAmount
Decimal Maximum conversion amount for free game
status Integer
Status of free game wallet:
0: Inactive (Cancelled)
1: Active
2: Expired
3: Converted
4: Completed
5: New
6: User Cancelled
8: Pending
expiredDate Long
Expiry date of free game
(Unix time stamp in milliseconds)
updatedDate Long
Date of when a player is registered or re-registered
into the free game
(Unix time stamp in milliseconds)
createdDate Long
Date 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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value as
GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft and
operator
page_number Integer Yes Batch number of data return
row_count Integer Yes
Number of records for each batch
Note: Value range 1-5000
player_name String Yes
Unique identity of free game’s
unregistered player
status
Integer
Array
No
Status 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&p
layer_name=player1&status=1&status=2
Response
Body Parameters:
JSON Object
Parameter name Data type Description
totalCount Integer Total number of records
totalPage Integer Total number of available batches
result JSON Array List of free games of a single player
JSON Array
Parameter name Data type Description
freeGameId Integer Unique identity free game
freeGameName String Given name of free game
transactionId String Unique identity of transaction
gameIds Integer Array Unique identity of games
gameCount Integer Total number of given free games
totalGame Integer
Total number of free games that will be given to a
single player
balanceAmount Decimal
Player balance of unconverted free game, or
converted amount of converted free game
minimumConversionAmount Decimal Minimum conversion amount for free game
maximumConversionAmount Decimal Maximum conversion amount for free game
multiplier Integer Bet multiplier of free game
coinSize Decimal Coin size of free game
expiredDate Long
Expiry date of free game
(Unix time stamp in milliseconds)
createdDate Long
Created date of free game
(Unix time stamp in milliseconds)
createdBy String API or BackOffice user who created the free game
updatedBy String API or BackOffice user who updated the free game
isSupressDiscard Boolean
Permission to allow players to cancel offer
True: Do not allow player to cancel offer
False: Allows player to cancel offer
status Integer
Status of free game wallet:
0: Inactive (Cancelled)
1: Active
2: Expired
3: Converted
4: Completed
5: New
6: User Cancelled
8: Pending
conversionType Char Type 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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value as
GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft and
operator
currency String Yes Currency of free game
free_game_name String Yes Given name of free game
expired_date long Yes
Expire date of free game
(Unix time stamp in milliseconds)
bonus_minimum_conver
sion_amount
Decimal No*
Minimum conversion amount for bonus
NULL: No limit for conversion amount
bonus_maximum_conver
sion_amount
Decimal No*
Maximum conversion amount for bonus
NULL: No limit for conversion amount
minimum_conversion_a
mount
Decimal No
Minimum conversion amount for free
game
NULL: No limit for conversion amount
maximum_conversion_a
mount
Decimal No
Maximum conversion amount for free
game
NULL: No limit for conversion amount
bonus_type Integer No*
Bonus wagering condition
0: Bonus
1: Cash
2: Bonus & Cash
bonus_ratio Decimal No*
Wagering requirement for bonus game.
Refers to the multiple of the turnover in
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_type Char Yes
Type of conversion after free game is
completed:
C: Cash
B: Bonus
multiplier Integer Yes Bet multiplier of free game
coin_size Decimal Yes Coin size of free game
game_count Integer Yes
Total number of free games that will be
given to each player
game_ids
Integer
Array
Yes
Unique identity of games
(Note: Only games with same base bet
are accepted)
is_event Boolean Yes
Type of free game:
True: Flexible
False: Standard
player_name String No
Unique 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_id String Yes
Unique identity of transaction.
Note: System will return a
corresponding free game id for a
duplicated transaction
non_discardable Boolean No
To 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¤cy=CNY&free_game_name=F
reeGame2019&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&transact
ion_id=12345&non_discardable=False
Response
Body Parameters:
JSON Object
Parameter name Data type Description
freeGameId Integer Unique 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 name Data Type Mandatory Description
trace_id String Yes
Unique identity (GUID) of the request
Note:
• Please set the parameter value as
GUID format
Body Parameters:
Parameter name Data type Mandatory Description
operator_token String Yes Unique identity of operator
secret_key String Yes
Shared passphrase between PGSoft and
operator
currency String Yes Currency of free game
free_game_name String Yes Given name of free game
expired_date long Yes
Expiry date of free game
(Unix time stamp in milliseconds)
bonus_minimum_conver
sion_amount
Decimal No*
Minimum conversion amount for bonus
NULL: No limit for conversion amount
bonus_maximum_conver
sion_amount
Decimal No*
Maximum conversion amount for bonus
NULL: No limit for conversion amount
minimum_conversion_a
mount
Decimal No
Minimum conversion amount for free
game
NULL: No limit for conversion amount
maximum_conversion_a
mount
Decimal No
Maximum conversion amount for free
game
NULL: No limit for conversion amount
bonus_type Integer No*
Bonus wagering condition:
0: Bonus
1: Cash
2: Bonus & Cash
bonus_ratio Decimal No*
Wagering requirement for bonus game.
Refers to the multiple of the turnover in
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_type Char Yes
Type of conversion for after free game is
completed:
C: Cash
B: Bonus
bet_amount Decimal Yes
Desired bet amount for each game.
Note: System will round down to
closest multiplier and coin size
automatically
game_count Integer Yes
Total number of free games that will be
given to each player
game_ids
Integer
Array
Yes
Unique identity of games
(Note: Only games with same base bet
are accepted)
is_event Boolean Yes
Type of free game:
True: Flexible
False: Standard
player_name String No
Unique 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_id String Yes
Unique identity of transaction.
Note: System will return a
corresponding free game ID for a
duplicate transaction
non_discardable Boolean No
To 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.pgbo.me/external/FreeGame/v1/CreateFreeGameByBetAmount?trace_id=b3f37e57-2873-40b1-
aa95-f126c25ed311
Body:
operator_token=abc123&secret_key=a1b25cde5f3gh46ijkl¤cy=CNY&free_game_name=F
reeGame2019&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_co
unt=20&game_ids=1&game_ids=2&is_event=true&player_name=player1&transaction_id=1234
5&non_discardable=False
Response
Body Parameters:
JSON Object
Parameter name Data type Description
freeGameId Integer Unique identity of free game
Example:
{
"data": {
"freeGameId ": 10915
} ,
"error": null
}