API design
We will have many REST APIs for the hotel booking system. We will mostly have a microservice architecture for this kind of system.
Hotel Related APIs
- Get/api/v1/hotels/${id} - Get the details of a hotel
- POST/api/v1/hotels/${id} - Add a hotel to the system(Internal non user facing)
- DELETE/api/v1/hotels/${id} - Delete a hotel from the system(Internal non user facing) - Delete a hotel
- PATCH/api/v1/hotels/${id} - Update hotel information at the system(Internal non user facing)
Room Related APIs
- Get/api/v1/rooms/${id} - Get the details of a room
- POST/api/v1/rooms/${id} - Add a room to the hotel (Internal non user facing)
- DELETE/api/v1/rooms/${id} - Delete a room from the system(Internal non user facing) - Delete a room
- PATCH/api/v1/rooms/${id} - Update room information at the system(Internal non user facing)
Reservation Related APIs - Mostly all of these are customer facing APIs
- Get/api/v1/reservations/${id} - Get the details of a reservation
- POST/api/v1/reservations/${id} - Make a reservation
- DELETE/api/v1/reservations/${id} - Delete or cancel a reservation.
- PATCH/api/v1/reservations/${id} - Update reservation details for a customer.