> For the complete documentation index, see [llms.txt](https://scorpioplay.gitbook.io/scorpio-play-casino-api-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scorpioplay.gitbook.io/scorpio-play-casino-api-doc/api-reference/openapi.md).

# Main API

All endpoints of our API are described on this page.

## Required HTTP Headers

All HTTP requests related to API must include the following HTTP headers.

<table><thead><tr><th width="167">Name</th><th width="186">Value</th><th>Example</th></tr></thead><tbody><tr><td>Authorization</td><td>Bearer {API_TOKEN} </td><td><mark style="color:green;"><code>Authorization: Bearer ed45553e-1702-4342-a70d-09bf7ff7f568</code></mark></td></tr><tr><td>Accept</td><td>application/json</td><td><mark style="color:orange;"><code>Accept: application/json</code></mark></td></tr><tr><td>Content-Type</td><td>application/json</td><td><mark style="color:red;"><code>Content-Type: application/json</code></mark></td></tr></tbody></table>

{% hint style="info" %}
To manage server load, transactions made two days before the maintenance period will be automatically deleted.
{% endhint %}

## API Error Response Codes

Below are the error response codes returned when calling the API.

<table><thead><tr><th width="265">Code</th><th>Description</th></tr></thead><tbody><tr><td>UNDER_MAINTENANCE</td><td>On maintenance</td></tr><tr><td>INTERNAL_SERVER_ERROR</td><td>Internal server error</td></tr><tr><td>VALIDATION_ERROR</td><td>Request data format error</td></tr><tr><td>SERVICE_EXCEPTION</td><td>Service exception occurred</td></tr><tr><td>TOKEN_NOT_FOUND</td><td>Authentication token not found</td></tr><tr><td>TOKEN_INVALID</td><td>Authentication token invalid</td></tr><tr><td>PERMISSION_ERROR</td><td>No access</td></tr><tr><td>PROVIDER_ERROR</td><td>Provider error</td></tr><tr><td>PARAMETERS_INVALID</td><td>Parameters invalid</td></tr><tr><td>CALLBACK_ERROR</td><td>Callback error (<em>Callback API error log needs to be checked</em>)</td></tr><tr><td>SERVER_IS_BUSY</td><td>Server load error (<em>concurrent call limit exceeded</em>)</td></tr><tr><td>IP_NOT_ALLOWED</td><td>Not allowed IP</td></tr><tr><td>AGENT_NOT_FOUND</td><td>Agent information not found</td></tr><tr><td>USER_NOT_FOUND</td><td>User information not found</td></tr><tr><td>GAME_NOT_FOUND</td><td>Game information not found</td></tr><tr><td>POINT_NOT_ENOUGH</td><td>Insufficient agent point balance</td></tr><tr><td>BALANCE_NOT_ENOUGH</td><td>Insufficient user point balance</td></tr><tr><td>PROVIDER_NOT_FOUND</td><td>Provider information not found</td></tr><tr><td>BONUSCALL_DOUBLE</td><td>Already bonus call is running</td></tr><tr><td>BONUSCALL_ALEADY_ENDED</td><td>Already bonus call is ended</td></tr><tr><td>ROUND_NOT_FOUND</td><td>Round information not found</td></tr><tr><td>CURRENCY_NOT_SUPPORTED</td><td>Currency is not supported</td></tr></tbody></table>
