Service

Name Cancel Reservation
Description Cancel a reservation
Method PATCH
URL /reservations/{reservation}
Example /api/reservations/123456789
Access OWNER, MANAGER, TRAVELER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
reservation number yes Reservation id.
message text no Message for additional information. Only it is required when reservation is paid.

Response

            
                {
                    "code": "R111",
                    "message": "Success"
                }
            
            

Response Codes

Code Message Cause Possible Frontend Message [Behavior]
EC000 Internal error in API Internal error connecting the database "Oops! Looks like we hit a snag. Try closing the app and reopening it."
EC001 User not found Token user id doesn't match our records "Sorry, We couldn't find your information!"
EC003 Reservation not found Reservation id doesn't match our records "Sorry, We couldn't find that reservation!"
EC011 Status not found Status doesn't match our records "Oops! Looks like we hit a snag. Try closing the app and reopening it."
EC025 Error when try to send email Error trying to send the email
EC031 Reservation not belong to that user The user logged in is not the reservation traveler or the owner "Sorry, you do not have access to that reservation!"
EC035 Ticket not found Ticket Type: "billing" doesn't match our records "Oops! Looks like we hit a snag. Try closing the app and reopening it."
R000 Fail The reservation wasn't cancelled
R111 Success The operation was successful "The reservation was cancelled successfully"
SC006 User no authorization The token role is not valid for using the API services "You have been logged out." - [Take the user to the login screen]
SC014 Expired token The token has expired "You have been logged out." - [Take the user to the login screen]
VID150 Invalid input for message Message is empty or it has only characters not allowed(" ", ', ’, ‘, ’, ", &, \, <, >, --) "Please fill out this field" - "Please enter a valid message"
VID234 Invalid input for reservation Reservation id is not a number "Sorry, We couldn't find that reservation!" - [Call the API again using a valid value for reservation id]