get-user-balance¶
curl -X 'GET' 'https://{api-domain}/v1/wallet-proxy/v1/{playerId}/balances/sport'
-H 'Authorization: {auth-token}'
-H 'X-Brand: {brand}'
-H 'X-Operator-Id: {operator}'
Request parameters:
| Param | Param location | Type | Required | Description |
|---|---|---|---|---|
| playerId | Route | string | + | Id of player |
| currencies | Query | string[] | - | currencies that will be returned in response. Optional parameter, by default, all available currencies are returned. |
| X-Brand | Header | string | + | key for tenant identification, provided by GR8-Tech |
| X-Operator-Id | Header | string | + | key for tenant identification, provided by GR8-Tech |
| Authorization | Header | string | + | Authorization token "{authResponse.token_type} {authResponse.access_token}" |
Success response¶
Response example
{
"main": {
"USD": {
"cash": "1000.0",
"bonus": "0",
"locked": "0"
}
},
"sportsbook": {
"USD": {
"cash": "1000.0",
"bonus": "0",
"locked": "0"
}
},
"swat": {
"USD": {
"cash": "1000.0",
"bonus": "0",
"locked": "0"
}
}
}
Error response¶
Error response schema
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"origin": {
"type": "string"
}
},
"additionalProperties": true,
"required": [
"code",
"message",
"origin"
]
},
"additionalProperties": true,
"required": [
"error"
]
}
}
Error response example
{
"error": {
"code": "error.user.not-found",
"message": "User with specified Id was not found",
"origin": "{source-of-error}"
}
}
Error response description¶
| Parameter | Type | Required? | Description |
|---|---|---|---|
| body | object | + | Error response object |
| body.error | object | + | Error object description |
| body.error.code | string | + | Error code. Possible wallet error codes list |
| body.error.message | string | + | Error message |
| body.error.origin | string | - | Source of error. Is using for debugging and bugs investigation |