API error codes and responses

The Homepass API returns the following status codes and error responses:

HTTP Status Codes
Each API response will return with one of the following HTTP status codes

CodeTextDescription
200SuccessThe request is valid.
400Bad RequestThe request is invalid.
401UnauthorizedAuthentication details are invalid
403ForbiddenRequest is understood, but access is refused.
404Not FoundThe requested URI is invalid or the requested resource does not exist.
500Internal Server ErrorSomething is broken on the backend. Contact the Homepass team for details
502Bad GatewayHomepass API is down.
503Service UnavailableHomepass API is overloaded with requests or being upgraded

Error Messages

Homepass APIs will return error messages in the following format:

{
  "statusCode": 400
  "error": "Bad Request"
  "messages": "Invalid page number"
}