GetBalanceAll
URl: https://{{gmag_api_url
}}/player/balance/all?hash={{xxx}}.
Method: POST.
Purpose: used to get players' balance of a brand.
Request
Name | Type | Required | Description |
---|---|---|---|
playerId | String(24) | No | The unique ID identified a Player on brand’s side. |
subBrandId | Int | No | which brand scoped |
currency | String(4) | No | balance currency |
page | Int | No | default value 1, page number |
size | Int | No | default value 5000, page size, maximum 10000 |
Response
Name | Type | Required | Description |
---|---|---|---|
total | Int | Yes | total records |
currrent | Int | Yes | current page number |
size | Int | Yes | how many records in a page |
pages | Int | Yes | how many pages |
records | List | Yes | record details |
Keys of records element
Name | Type | Required | Description |
---|---|---|---|
playerId | String(24) | Yes | The unique ID identified a Player on brand’s side. |
currency | String(4) | Yes | The player’s Currency Code. |
balance | numeric(16, 4) | Yes | The player’s balance. |
bonusBalance | numeric(16, 4) | Yes | The player’s bonus balance. |
brandId | DateTime | Yes | Which brand this player in |
Request example
{
"requestId": "requestId1234",
"brandId": 1001
}
Response example
//success
{ "error": "0",
"message": "SUCCESS",
"total": 107,
"current": 1,
"size": 5000,
"pages": 1,
"records": [
{
"brandId": 222,
"playerId": "CNYTEST",
"currency": "CNY",
"balance": 0,
"bonusBalance": 0
},
{
"brandId": 222,
"playerId": "CNYTEST11",
"currency": "CNY",
"balance": 0,
"bonusBalance": 0
},
{
"brandId": 222,
"playerId": "CNYTEST111",
"currency": "CNY",
"balance": 0,
"bonusBalance": 0
}]
}
//error
{
"requestId": "requestId1234",
"error": "P_02",
"message": "Invalid hash",
}