Pending games
To fetch pending games make POST request with provided parameters:
URL: POST https://api.lostgame.tech/open-api-games/v1/pending-games?clientId=CLIENT_ID
Parameters
Request:
| Name | Type | Description |
|---|---|---|
sessionIds | List | Array of session ids. |
Response:
| Name | Type | Description |
|---|---|---|
api | string | Name of operation: “debit”, “credit”, “rollback” |
isSuccess | boolean | Is success? |
error | string | Empty string if isSuccess == true. |
errorMsg | string | Error code, see “Errors” table |
pendingGames | list | |
pendingGames | object | |
pendingGames.sessionId | string | Session id that has pending games |
pendingGames.gameId | string | Pending game id |
Notice!
Reasons why the pending games list is empty:
- Provider doesn't provide any information about pending games
- No pending games left
Errors:
| Name | Description |
|---|---|
| NO_ERRORS | No errors. Passed if isSuccess == true. |
| INVALID_CLIENT_ID | Invalid client id. |
| WRONG_PLATFORM_ID | Wrong platform id. |
| INVALID_BODY | Invalid request body. |
| INTERNAL_ERROR | Server error. |
Example
Request:
curl --location --request POST 'https://apiEndpoint/open-api-games/v1/pending-games' \
--header 'Content-Type: application/json' \
--data '{
"sessionIds" : ["*pb8iukp80qsd2yhhl|oe6nyrp8hRbtOTBipFR1ISqqNXnlNv3acI_lxJ6DFp3bsQ==", "*pb8iukp80qsd2yhhl|oe6nyrp8hRbtOTBipFR1ISqqNXnlNo1NOvSnoEs="]
}'
Response:
{
"isSuccess": true,
"error": "NO_ERRORS",
"errorMsg": "",
"pendingGames": [
{
"sessionId": "*pb8iukp80qsd2yhhl|oe6nyrp8hRbtOTBipFR1ISqqNXnlNv3acI_lxJ6DFp3bsQ==",
"gameId": "ib_awch"
},
{
"sessionId": "*pb8iukp80qsd2yhhl|oe6nyrp8hRbtOTBipFR1ISqqNXnlNo1NOvSnoEs=",
"gameId": "ib_r20"
}
]
}