Project background information
Currently I am working on a new reservation app. With this app a user is able to book a table at a nightlife venue. The venue will either approve or decline the booking before the user is able to finalise his or her booking.
Current routes
Used for placing a reservation at a venue – POST /api/v1/reservations
Get all the reservations for a specific venue – GET /api/v1/venues/:venue_id/reservations
Get all the reservations for a specific user – GET /api/v1/users/:customer_id/reservations
Get an individual reservation by id – GET /api/v1/reservations/:reservation_id
Used for updating a reservation its status – PATCH /api/v1/reservations/:reservation_id
Wished behaviour
Currently I am kind of struggling with having decent names for my routes that execute specific actions. Such as cancelling a reservation.
Is this a correct naming according to best practises?
- PATCH /api/v1/reservations/:reservation_id/decline
Question
- In general how would you name an route that is responsible for accepting or declining a route. Would you make a generic route or two separate ones?