Docs

Lottery · Reference

Lottery error codes

HTTP status codes and error bodies returned by the Lottery API.

Status codes

Status Meaning
200 Success
401 Authentication failed. Check your Bearer token.
422 Validation error. Check the request parameters and amounts.

Error bodies

Authentication errors return a list of messages:

401
{
  "errors": ["Access denied"]
}

Validation errors return a single message:

422
{
  "error": "Invalid input"
}
error value Meaning
Invalid input The input is invalid
Company not found The company was not found

Both endpoints, Retrieve current lottery draw information and Purchase a lottery ticket, return these errors.

Common causes

  • Authentication errors. An invalid or expired token.
  • Validation errors. An incorrect amount, an invalid draw number, or a combination_count out of range.
  • Business rule errors. For example, second_rematch without rematch.