Errors
Error Code | Meaning | Description |
---|---|---|
NOT_FOUND | Requested resource not found. | The reasons of this is the requested resource doesn't exist in scope of requester account. |
FORBIDDEN | Request do not allowed | Do not have an access to the requested resource in scope of booking engine (f.e. coupon, listing) |
WRONG_REQUEST_PARAMETERS | Bad request | The request parameters are invalid, do not allowed or missed |
LISTING_CALENDAR_BLOCKED | Listing calendar is blocked | Requested for booking listing is not available for given dates. |
MIN_NIGHT_MISMATCH | Reservation request didn’t pass listing min nights restriction | Listing minimum nights restriction value is greater then requested reservation period |
COUPON_NOT_FOUND | Coupon doesn’t exist | Passed to the reservation payload coupon code doesn’t exist in requester booking engine and will be removed from reservation payload. No discount applied. |
COUPON_IS_DISABLED | Coupon disabled | Passed to the reservation payload coupon code disabled in requester booking engine and will be removed from reservation payload. No discount applied. |
COUPON_MIN_NIGHT_MISMATCH | Reservation request didn’t pass coupon min nights restriction | Passed to the reservation payload coupon code minimum nights restriction value is greater then requested reservation period and will be removed from reservation payload. No discount applied. |
COUPON_MAXIMUM_USES_EXCEEDED | No uses left in requested coupon | Passed to the reservation payload coupon no uses left and will be removed from reservation payload. No discount applied. |
COUPON_EXPIRATION_DATE_EXCEEDED | Coupon expired | Passed to the reservation payload coupon expired and will be removed from reservation payload. No discount applied. |
COUPON_OUT_OF_CHECKIN_RANGE | Reservation request didn’t pass coupon check in restriction | Passed to the reservation payload coupon code cannot |
COUPON_UNEXPECTED_ERROR | Unexpected error | Unexpected error happened while coupon validation process was running. No discount applied. |
Error JSON
The applicative validations and errors are returned with 400 (Bad Request) HTTP response code accompanied with the following error structure:
Request validation error response structure:
{
"error_code":"WRONG_REQUEST_PARAMETERS",
"message":"Request didn't pass validation",
"data": {
"errors": [
"\"minOccupancy\" must be greater than 0",
"\"forbiddenParameter\" is not allowed"
]
}
}
Request error response structure:
{
"error_code":"CREATE_RESERVATION_ERROR",
"message":"Failed to create reservation",
"data": {
"errors": [
"LISTING_CALENDAR_BLOCKED"
],
"requestId": "7a63a0ef7470520b"
}
}
Any issues with unexpected API response which have requestId and raised to the Guesty support team should have attached requestId