Link Search Menu Expand Document

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:

NameTypeDescription
sessionIdsListArray of session ids.

Response:

NameTypeDescription
apistringName of operation: “debit”, “credit”, “rollback”
isSuccessbooleanIs success?
errorstringEmpty string if isSuccess == true.
errorMsgstringError code, see “Errors” table
pendingGameslist 
pendingGamesobject 
pendingGames.sessionIdstringSession id that has pending games
pendingGames.gameIdstringPending 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:

NameDescription
NO_ERRORSNo errors. Passed if isSuccess == true.
INVALID_CLIENT_IDInvalid client id.
WRONG_PLATFORM_IDWrong platform id.
INVALID_BODYInvalid request body.
INTERNAL_ERRORServer 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"
    }
  ]
}