Swagger Documentation
The description of all API methods is available on Swagger at https://api-demo.evenbetpoker.com/api/web/api-docs/?clientId=demo.
For each method, Swagger provides the following information:
- List of parameters
- List of errors returned by the method
- Model of data returned
Method Execution
You can test the method execution using the “Try it out” button. The following parameters are obligatory for a successful execution of the majority of the methods:
- clientId. Your casino identifier.
- sign. Request signature. It is required only for the methods in app section. You need to form a request signature by yourself using the list of the sent parameters.
- userId. Unique player’s identifier.
Model of Data Returned
The majority of methods return data in JSON API format:
{
"data": {
"id": "string", // Object identifier
"type": "string", // Object type, for example, currency
"attributes": { // Object attributes
"attribute-name": "",
...
}
}
}
For some methods that return a large amount of data, the pagination is used. The model of data returned is extended to display it correctly:
{
"links": { // Links for the appropriate page with data
"self": {
"href": "string" // URL of request to get a current page
},
"first": { // URL of request to get a first page
"href": "string"
},
"prev": { // URL of request to get a previous page
"href": "string"
},
"next": { // URL of request to get a next page
"href": "string"
},
"last": { // URL of request to get a last page
"href": "string"
}
},
"meta": { // Pagination information
"total-count": "integer", // Total number of objects sent
"page-count": "integer", // Total pages count
"current-page": "integer", // Current page number
"per-page": "integer" // The number of objects on a page
}
}
Errors List
Errors are returned as http-codes with the error explanation in the response body. Errors returned by the API:
404 Method not found
This error is returned if a called API method does not exist.
{
"errors": [
{
"status": 404,
"title": "Not Found",
"detail": "Page not found.",
"previous": {
"title": "Invalid Route",
"detail": "Unable to resolve the request [request URL]."
}
}
]
}
400 Bad Request
This error is returned if the request signature is not correct (for app methods).
{
"errors": [
{
"status": 400,
"title": "Bad Request",
"detail": "Not Valid Request Signature"
}
]
}
401 Unauthorized
This error is returned if the called method requires authorization, and the authorization token sent is not correct.
{
"errors": [
{
"status": 401,
"title": "Unauthorized",
"detail": "Your request was made with invalid credentials."
}
]
}
403 Forbidden
This error is returned if you are trying to access a method that is forbidden to use.
{
"errors": [
{
"status": 403,
"title": "Forbidden",
"detail": "You are not allowed to perform this action"
}
]
}
422 Incorrect data
This error is returned if the data sent were not validated before the processing.
{
"errors": [
{
"source": {
"pointer": "string" // The name of the parameter that caused error at validation
},
"detail": "string" // Error description
}
]
}
500 Internal server error
This error is returned if the request processing caused server error.
{
"errors": [
{
"status": 500,
"title": "string",
"detail": "string" // Error description
}
]
}