List of Possible Errors of the Reservation Service
Descriptions
This documentation explains the list of possible errors from the Reservation APIs (create, update, and cancel) from the OpenRice API Integrations project.
List of Errors
| Feature | Action | Status Code | Error Message |
|---|---|---|---|
| Common Request | Send a request without an Authorization token header | 401 | "Missing authentication token" |
| Send a request with an invalid Authorization token header | 401 | "Invalid authentication token" | |
| Send a request with an invalid Authentication token format | 401 | "Invalid authentication token format" | |
| Create New Reservation | Missing Params when creating a new reservation | 200 | "param is missing or the value is empty: {missing param}" |
Create a new reservation with adult = 0 | 200 | "Party size cannot be 0" | |
Create a new reservation with the restaurant allow_booking: false | 200 | "This restaurant doesn't accept booking" | |
| Create a new reservation without choosing any packages | 200 | "Restaurant Package can not be blank" "Please select package" | |
| Create a new reservation with different package types with the same pricing mode (multiple) (e.g choose ayce and bfp packages) | 200 | "Booking cannot have different package types" | |
| Create a new reservation with more than one packages but there is package with single pricing mode (e.g choose xp and pp packages ) | 200 | "Only one package can be purchased in a single booking" | |
| Create a new reservation with the past date and time | 200 | "The time that you have selected is either in the past or incorrect. Please look and make sure the time is selected as “am” or “pm” correctly." | |
| Create a new reservation on the restaurant before the restaurant launching date (e.g restaurant's launching date is August 08, 2023, but the client try to create a reservation on August 07, 2023) | 200 | "We open reservation after Tue, 08 Aug 2023 onwards" | |
| Create a new reservation with an invalid phone number | 200 | "Phone number is invalid" | |
Create a new reservation with packages quantity = 0 | 200 | "invalid package" | |
Create a new reservation with packages that require pre-payment (require_cc: true) but not include the payment in the request body | 200 | "{package name} package requires prepayment" | |
| Create a new reservation but the date, time, package, adult and kids are unavailable | 200 | "The restaurant do not accept booking for the selected time, please change date/time." | |
| There is an error from HH internal server | 200 | "Sorry, something went wrong" "Something went wrong" | |
| Update Reservation | Update reservation that doesn't exist | 200 | "reservation not found" |
| Update reservation but the primary attributes (date start_time, adult, kids, phone, name, special_request) is not changed | 200 | "We can not process your request if no data changed and Reservation is not modified" | |
| Update reservation but the selected packages are blank | 200 | "Please select a package" | |
| Update reservation and try to combine different package types (e.g choose ayce and pp packages) | 200 | "Restaurant packages are not in same type" | |
| Update reservation but the date, start_time, adult, or kids are unavailable | 200 | "The restaurant do not accept booking for the selected time, please change date/time." | |
Update reservation but the adult or kids is less than min_seat or greater than max_seat of the selected packages | 200 | "Total adult and kids should between {min seat} and {max seat} | |
Update reservation but the adult is less than min_seat of the selected package | 200 | "This package allows a maximum of {adult} adults per booking." | |
Update reservation but the adult is greater than max_seat of the selected ayce package | 200 | "This package requires a minimum of %{adults} adults per booking." | |
| Update reservation but the date or time is unavailable for the selected ayce package | 200 | "{package_name} package is unavailable on your selected date/time" | |
Update reservation but the adult is greater than the total available seats of the selected party pack package | 200 | "Your selected package(s) can only accomodate maximum of {adult} adults" | |
| Try to update the reservation with pre-paid/pre-payment (except date and time if available) | 200 | "You can’t modify a prepaid booking, please contact our support team (LINE@HUNGRYHUB)" | |
| There is an error from HH internal server | 200 | "Sorry, something went wrong" "Something went wrong" | |
| Cancel Reservation | Cancel a reservation that doesn't exist | 200 | "reservation not found" |
| Cancel reservation but missing required params | 200 | "param is missing or the value is empty: {missing param}" | |
| Cancel a reservation that has been canceled | 200 | "'Sorry this reservation already cancelled." | |
| Cancel reservation but the reservation has pre-paid/pre-payment | 200 | "'Sorry, this booking can not be canceled" | |
| Cancel reservation but the reason is null or empty | 200 | "Reason is required" | |
| Cancel reservation that already in the past (time now > dining time) | 200 | "Sorry your reservation has passed. You can no longer cancel your reservation. You have been marked as No Show" | |
| There is an error from HH internal server | 200 | "Sorry, something went wrong" "Something went wrong" |
Note:
- Packages Pricing Mode
ayce: :multiple
pp: :single
xp: :single
hah: :single
hs: :single
sm: :multiple
bfp: :multiple