Skip to content
Last updated

This guide explains the HTTP status codes and messages returned by the API when a request fails.

When a request fails due to request errors, an error response message is returned in JSON format. The error response message includes a unique error code for the endpoint, an HTTP response message, and an HTTP response code. When enabled, the response contains HATEOAS links.

Example Response

{
  "error": {
    "code": "not_found",
    "message": "Listing was not found or expired, provided UUID: d3bfa3e1-e",
    "http_code": 404
  },
  "links": [
    {
      "method": "GET",
      "rel": "docs",
      "href": "https://docs.bemyguest.com.sg/openapi//products/product"
    }
  ],
  "timestamp": "2018-08-02T16:43:33.184+08:00"
}

HTTP Status Codes

HTTP StatusAPI Error CodeMessage (Example)
400error
400invalid_paramsCity not found, provided UUID:
400malformed_jsonJSON processing result:
400invalid_paramsDisallowed parameters provided
401GEN-UNAUTHORIZEDUnauthorized
403insufficient_balanceWallet balance too low to create a booking. Current balance:
404not_foundListing was not found or expired, provided UUID:
404upload_failedUploaded file is too big
404upload_failedNo upload content
409invalid_actionBooking does not have a reserved status. You cannot confirm this booking:
409invalid_actionBooking has status waiting. You cannot request cancellation until approved.
409invalid_actionBooking is already cancelled. You cannot cancel this booking again:
410goneProduct is no longer available
422invalid_dataArrival date is unavailable. Please choose another one.
422no_productProductType not found, UUID:
422no_productNumber of elements in 'perPax' array must be equal to number of guests.
422no_productProduct is not available for booking via API
422prices_mismatchArrival date is not available anymore. Please choose another one.
500internal_errorinternal_error_default