0% found this document useful (0 votes)
1K views

E-Sabong API REST Integration-Draft

test

Uploaded by

Vener Guevarra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

E-Sabong API REST Integration-Draft

test

Uploaded by

Vener Guevarra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

e-Sabong Gameplay

API REST Specification


September 2019

Version: 1.0 Document Status: DRAFT

 Asia Web 2019. All Rights Reserved.


TABLE OF CONTENTS
Table of Contents ............................................................................................................................................. 2
Introduction ...................................................................................................................................................... 3
SAMPLE USE CASES ..................................................................................................................................... 4
Player opens e-Sabong Games .................................................................................................................................. 4
Available API OPERATIONS ........................................................................................................................... 6
Available ENDPOINTS .................................................................................................................................... 7
POST /login/admin ...................................................................................................................................................... 7
POST /login/player ...................................................................................................................................................... 8
POST /player/register ................................................................................................................................................. 8
POST /player/update ................................................................................................................................................ 10
get /game/url ............................................................................................................................................................. 11
POST /wallet/fund-in ................................................................................................................................................. 12
get /wallet/balance .................................................................................................................................................... 13
POST /wallet/fund-out ............................................................................................................................................... 13
Release History ......................................................................................................................................................... 15

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 2


INTRODUCTION
The following document is the E-Sabong REST API Integration document.

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.

Please coordinate with your account manager for this.

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 3


SAMPLE USE CASES
Please provide some sample use cases here. Description of how the API is used in context.

Player opens e-Sabong Games


When a player wishes to play e-Sabong games, the first requirement of the e-Sabong Gameplay Server is for the
user to have an existing account in the Gameplay Services.

Endpoint: http://<gameplay.server>/player/register
Method: POST
Headers:
Name Value
Content-Type application/json
x-token-key <token from authorization endpoint>

URL Parameters: None


Body Parameters:
Parameter Description Required Type
playerNumber Merchant’s system key identifier of the player’s account Yes String
playerName Glenn Espussy No String
playerAlias Preferred display name of the player No String
language Preferred display language of the player Yes String
currency The currency used in the player’s account from the Yes String
merchant system
minBetLimit The smallest bet amount the player can make Yes Decimal
maxBetLimit The largest bet amount the player can make Yes Decimal
brandCode The brand or website code of the player Yes String
Sample:
{
"playerNumber": "P10101010101",
"playerName": "Glenn Espussy",
"playerAlias": "GAE",
"language": "en",

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 4


"currency": "USD",
"minBetLimit": 100,
"maxBetLimit": 500,
"brandCode": "PM"
}
Response:
{
"id": "c391067f-7465-4cb5-a5a8-c8e907a82cc2",
"createdDate": "2019-08-22T14:54:14",
"modifiedDate": "2019-08-22T14:54:14",
"operatorId": "268d9f6d-17b5-4acd-9ae2-da373822f2e8",
"operatorCode": "OP00000001",
"playerNumber": "P10101010101",
"playerName": " Glenn Espussy ",
"playerAlias": "GAE",
"status": "ACTIVE",
"language": "en",
"currency": "USD",
"minBetLimit": 100,
"maxBetLimit": 500,
"brandCode": "PM"
}

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 5


AVAILABLE API OPERATIONS

Operation on Entities Uniform API Operation Description

Query Entities GET Resource GET must be used to


retrieve a representation of
a resource.

Create Entity POST Resource POST must be used to


create a new resource

Partial Update of an Entity PATCH Resource PATCH must be used to


partially update a resource

Complete Update of an PUT Resource PUT must be used to


Entity completely update a
resource identified by its
resource URI

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 6


AVAILABLE ENDPOINTS

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"
}

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 7


POST /login/player
This endpoint provides the token key that is used to allow the player to make player-specific
requests in the gameplay services such as requesting a game url.

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:

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 8


 Creates a player registration 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 Invalid Brand Code.
 Returns HTTP/1.1 status code 409 Player Already Exists.
 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",
"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,

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 9


"maxBetLimit": 5000,
"brandCode": "PM"
}

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",

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 10


"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,
"maxBetLimit": 5000,
"brandCode": "PM"
}

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

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 11


{
"url": "http://gameplay-
ui.pitmasters.site:81/#/G888/eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlODVkNmVmMi03YTNiLTQy
MGQtYjk3ZS0yYWYzOTkxNzhmYmQiLCJpYXQiOjE1NjgxMTUxOTksInN1YiI6IlVpbmROcC9
WNm51djh2TkwxNVpRdVZ6RDZHSDJsR1RGTndoamdCaCt5MTRMUGV5MHdOQzRDZ21Z
UnFhMldaS2FlWDlQNHgxMGZTK2pQd2pacFNLaWdRRkRoWlZSZ1pRWUJmL0xkcTg5ZitXM
GpHSVV3Q3hkUWxldTN6TzZOczd6R3VFcEdlKzNMbFVUMUFTNU94amFNMTdyVjZKYkViV
3huSm5XMk1HWTZuNUFtZjZHSGR6RHFnTythTm1CK0J4aklTVmlrVlNoOXJlSXhiaVg5R1V
WZ0ViTGszNC9XSnpyVDRBNVArRWMwR0c1dGdIZHdaTUsvYm5YOURIRmJ3ZDVlN2ZiVU
ZUdmNlTHlkY3JySlZONitJaWp6MTVmWnFTTk5pOGtjSmNZRGRTYzQ0ZEUrbC8vQVRsSFp
QakowZ1lEIiwiaXNzIjoiZ2FtZXBsYXktYXBpIiwiZXhwIjoxNTY4MTMxMjAwfQ.Vx3yvgf7s5Qhfc
OtpOdg7VVxIfixVcmMv7l18ruFtLc"
}

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

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 12


}

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.

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 13


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 409 Invalid Fund Amount.
 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
}

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 14


RELEASE HISTORY

Release Date Release led by: Description


Number
Release 1.0 2019/09/01 Asia Web First Release of Draft Version of the
Document.

Version 1.0 © Asia Web 2019. All Rights Reserved. Page 15

You might also like