AIC Aggregator

Search the documentation

Search sections, endpoints, parameters...

Section 08

Responses and errors

How AIC interprets your responses and which errors its API returns.

Responses and errors#

How AIC interprets your API's responses#

AIC determines the outcome of each wallet call from the HTTP status code and the body of your response:

CodeMessageDescription
200data + statusSuccess. data is the player's new balance and status carries code "0"; if status is missing, the response is rejected.
404NOT_FOUNDPlayer not found. Respond with HTTP 404 and message NOT_FOUND.
400OVERFLOWInsufficient balance. Respond with HTTP 400 and message OVERFLOW.
—*Any other response (another HTTP status, non-numeric data, or a timeout) makes the operation fail towards the supplier.

Error response examples#

Player not found (HTTP 404):

{
  "statusCode": 404,
  "message": "NOT_FOUND"
}

Insufficient balance (HTTP 400):

{
  "statusCode": 400,
  "message": "OVERFLOW"
}

Important

Every successful response must include a numeric data and the status object (code: "0", message, datetime). Without status, AIC rejects the response.

Note

Depending on the supplier, a player not found or an insufficient balance is shown in the game with its reason or as a generic error. In both cases the operation is not applied.

AIC endpoint errors#

SituationResponse
Invalid Project ID or API Key on loginHTTP 403
Unknown or inactive project on getGameListHTTP 400 or 404
Game that could not be openedSee Open a game
Unknown Merchant Name on round-playedHTTP 400 with CUSTOMER_NOT_FOUND
Unknown transaction or one from another project on round-playedHTTP 200 with status.code 404 or 409
Unexpected errorHTTP 400