E-Sabong API REST Integration-Draft
E-Sabong API REST Integration-Draft
This document aims to assist the merchant’s developers to integrate their system to the e-Sabong Gameplay server.
Developer Note:
To be able to proceed with this document and the actual integration, you must first obtain the proper security key.
You can get the security key soon as proper identification and documentation have been provided to our
management.
Endpoint: http://<gameplay.server>/player/register
Method: POST
Headers:
Name Value
Content-Type application/json
x-token-key <token from authorization endpoint>
POST /login/admin
This endpoint provides the token key that is used to allow the merchant/operator to make
administrative operations in the gameplay services such as registering a new player account.
Description:
Generates a token key that is used by the merchant/operator to make administrative
requests.
Behavior:
Returns HTTP/1.1 status code 200 if the request was successful.
Returns HTTP/1.1 status code 400 Bad Requests.
Returns HTTP/1.1 status code 403 Invalid Security Token.
Returns HTTP/1.1 status code 500 Internal Server Error.
Header
Content-Type : application/json
x-client-key : 22e215b6-9970-446a-a57e-fc35d4a3c253
QUERY PARAMETERS
NONE
REQUEST BODY
NONE
RESPONSE
200
Content-Type: application/json
{
"token":
"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2MTU3NTkwMy03ZGMxLTQyZmItOTk0OS02NDM0M2Fk
OGVhNzQiLCJpYXQiOjE1NjgxMDQyNTAsInN1YiI6IlVpbmROcC9WNm51djh2TkwxNVpRdVZ
6RDZHSDJsR1RGTndoamdCaCt5MTRMUGV5MHdOQzRDZ21ZUnFhMldaS2FlWDlQNHgxM
GZTK2pQd2pacFNLaWdRRkRoWlZSZ1pRWUJmL0xkcTg5ZitXMGpHSWW3Q3hkUWxldTN6
TzZOczd6R3VFcEdlKzNMbFVUMUFTNU94aHYDMdyVjZKYkViV3huSm5XMk1HWTZuNjRJU
DRTUjVrTnFzQklrMWs0bnRJNDhzcENFdEpqYWxKeHlwNlNGZys4UXRxRllndjV5RjJsS1pKY
1hoY20xcFFTc3hhMHI0bno1SVRuSkY1TTlZWEYiLCJpc3MiOiJnYW1lcGxheS1hcGkiLCJleH
AiOjE1NjgxMzEyMDB9.2UayJ13kWxeSpwFC4lMi38rF3Xmiog14_ajNCIIiJfQ"
}
Description:
Generates a token key that can be used by the player to make player-specific requests
such as getting a game url or placing bets.
Behavior:
Returns HTTP/1.1 status code 200 if the request was successful.
Returns HTTP/1.1 status code 400 Bad Requests.
Returns HTTP/1.1 status code 403 Invalid Security Token.
Returns HTTP/1.1 status code 500 Internal Server Error.
Header
Content-Type : application/json
x-client-key : 22e215b6-9970-446a-a57e-fc35d4a3c253
QUERY PARAMETERS
playerNumber
REQUEST BODY
NONE
RESPONSE
200
Content-Type: application/json
{"token":"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2YmNlZTViZC1iMTc0LTRiMzktODRiYS05N2ZiZ
DE4YjNlYjUiLCJpYXQiOjE1NjgxMDQ5NDMsInN1YiI6IlVpbmROcC9WNm51djh2TkwxNVpRd
VZ6RDZHSDJsR1RGTndoamdCaCt5MTRMUGV5MHdOQzRDZ21ZUnFhMldaS2FlWDlQNHg
xMGZTK2pQd2pacFNAAWdRRkRoWlfaZ1pRWUJmL0xkcTg5ZitXMGpHSVV3Q3hkUWxldTN
6TzZOczd6R3VFcEdlKzNMbFVUMUFTNU94amFNMTdyVjZKYkViV3huSm5XMk1HWTZuNU
FtZjZHSGR6RHFnTythTm1CK0J4alJxNVU0SHNJdUpaVjMzVW1QN2c5SDFvZ3dWdTgvUito
NEorMjJnTDdFMzZGU0dObFZhUGNSZWdHd0VHTXdCSG44UFlwNjhjV0RGZG5XSkZDZFpa
YmxhN1ZSNVppRTF2UStLMXdNL1N6cEV4am1ZZm0zbHVGVXNUZ1NlUlhhRVN0IiwiaXNzIj
oiZ2FtZXBsYXktYXBpIiwiZXhwIjoxNTY4MTMxMjAwfQ.xV8bHoGWklps8EYIImb0nuqrLUHNO
h9keTVDxkVAzA8"}
POST /player/register
This endpoint allows the merchant/operator to register a player in the gameplay service.
Description:
Header
Content-Type : application/json
x-token-key : <Admin Token>
QUERY PARAMETERS
NONE
REQUEST BODY
{
"playerNumber": "WLP000001",
"playerName": "Glenn Espussy",
"playerAlias": "GAE",
"language": "en",
"currency": "USD",
"minBetLimit": 100,
"maxBetLimit": 5000,
"brandCode": "PM"
}
RESPONSE
200
Content-Type: application/json
{
"id": "8e26bb0d-b34f-41d0-9ad6-f11a545319b9",
"createdDate": "2019-09-10T08:56:04",
"modifiedDate": "2019-09-10T08:56:04",
"operatorId": "268d9f6d-17b5-4acd-9ae2-da373822f2e8",
"operatorCode": "OP00000001",
"playerNumber": "WLP000001",
"playerName": "Glenn Espussy",
"playerAlias": "GAE",
"status": "ACTIVE",
"language": "en",
"currency": "USD",
"minBetLimit": 100,
POST /player/update
This endpoint allows the merchant/operator to update their players information in the gameplay
service.
Description:
Updates a player’s record in the gameplay service using an admin token by the
merchant/operator system.
Behavior:
Returns HTTP/1.1 status code 200 if the request was successful.
Returns HTTP/1.1 status code 400 Bad Requests.
Returns HTTP/1.1 status code 403 Invalid Security Token.
Returns HTTP/1.1 status code 404 Operator Brand or Player not found
Returns HTTP/1.1 status code 500 Internal Server Error.
Header
Content-Type : application/json
x-token-key : <Admin Token>
QUERY PARAMETERS
NONE
REQUEST BODY
{
"playerNumber": "WLP000001",
"playerName": "Glenn Espussy",
"playerAlias": "GAE",
"language": "en",
"currency": "USD",
"minBetLimit": 100,
"maxBetLimit": 5000,
"brandCode": "PM"
}
RESPONSE
200
Content-Type: application/json
{
"id": "8e26bb0d-b34f-41d0-9ad6-f11a545319b9",
GET /game/url
This endpoint provides the player with the game url that renders the actual betting console of the
game.
Description:
Returns the game link to the player to view the betting console
Allows the player to play the game
Behavior:
Returns HTTP/1.1 status code 200 if the request was successful.
Returns HTTP/1.1 status code 400 Bad Requests.
Returns HTTP/1.1 status code 403 Invalid Security Token.
Returns HTTP/1.1 status code 500 Internal Server Error.
Header
Content-Type : application/json
x-token-key : <Player Token>
QUERY PARAMETERS
arenaCode
REQUEST BODY
NONE
RESPONSE
200
Content-Type: application/json
POST /wallet/fund-in
This endpoint allows the merchant/operator to transfer the player’s fund from their system to the
gameplay server.
Description:
Transfers the player’s fund to the gameplay server.
Behavior:
Returns HTTP/1.1 status code 200 if the request was successful.
Returns HTTP/1.1 status code 403 Invalid Security Token.
Returns HTTP/1.1 status code 500 Internal Server Error.
Header
Content-Type : application/json
x-token-key : <Player Token>
QUERY PARAMETERS
amount
REQUEST BODY
NONE
RESPONSE
200
Content-Type: application/json
{
"playerNumber": "G881979116187",
"ballance": 1000,
"balance": 1000
GET /wallet/balance
This endpoint allows the merchant/operator to retrieve the player’s balance from the gameplay
server.
Description:
Returns the latest player’s balance
Behavior:
Returns HTTP/1.1 status code 200 if the request was successful.
Returns HTTP/1.1 status code 403 Invalid Security Token.
Returns HTTP/1.1 status code 500 Internal Server Error.
Header
Content-Type : application/json
x-token-key : <Player Token>
QUERY PARAMETERS
NONE
REQUEST BODY
NONE
RESPONSE
200
Content-Type: application/json
{
"playerNumber": "G881979116187",
"ballance": 1000,
"balance": 1000
}
POST /wallet/fund-out
This endpoint allows the merchant/operator to pull their player’s fund from the gameplay server to
their system.
Description:
Transfers the player’s fund from the gameplay server to the merchant/operator system.
Header
Content-Type : application/json
x-token-key : <Player Token>
QUERY PARAMETERS
amount
REQUEST BODY
NONE
RESPONSE
200
Content-Type: application/json
{
"playerNumber": "G881979116187",
"ballance": 1000,
"balance": 1000
}