HTTP Errors

Our API follows a predictable HTTP error code format:

  • 400 - Bad Request: The request cannot be processed
  • 401 - Unauthorized: The API key token is missing, invalid, or expired.
  • 403 - Forbidden: The API key token cannot access the specified resource.
  • 404 - Not Found: The request resource cannot be found.
  • 500 - Internal Server Error: Failure to process the request.

Error Structure

Errors are always returned in JSON format. Each error includes a code and a message, indicating the general reason for the error, as well as a type to categorize the issue. Additionally, a details array provides more specific information about the error condition. For example:

{
    "code": 2001,
    "details": [
        {
            "message": "check_in_date is not less than check_out_date. Please check reservation dates."
        }
    ],
    "message": "Unable to process your request. Missing or invalid request parameters.",
    "request_id": "9a15bee6-43c7-40b1-8b52-dd28daf9134b",
    "type": "VALIDATION"
}