Overview
The Favorite Tours API allows tourists to save tours to their favorites list for easy access. This creates a personalized wishlist of tours they’re interested in.Base URL
Get All Favorite Tours
Retrieve all favorite tours across all users (typically used for admin purposes).Response
List of all favorite tour records
Get Favorite by ID
Retrieve a specific favorite tour record.Path Parameters
The ID of the favorite tour record
Response
Returns a single FavoriteTour object.Get Favorites by Tourist
Retrieve all favorite tours for a specific tourist.Path Parameters
The ID of the tourist
Response
Returns an array of FavoriteTour objects for the specified tourist.Add Tour to Favorites
Add a tour to a tourist’s favorites list.Request Body
ID of the tourist adding the favorite
ID of the tour to add to favorites
Response
Returns the created FavoriteTour object with generated ID and timestamp.Remove Tour from Favorites
Remove a tour from a tourist’s favorites list.Path Parameters
The ID of the favorite record to delete
Response
Returns the deleted FavoriteTour object.The favorite record is deleted from the database. The tourist can add the tour back to favorites at any time.
Use Cases
Build Wishlist
Tourists can save interesting tours while browsing to review later
Compare Tours
Keep track of multiple tours to compare features and prices
Share Recommendations
Create a list of favorite tours to share with travel companions
Track Interests
Guides can see which tours are most favorited to understand demand
Related Endpoints
- Tour Endpoints - View full tour details
- Tourist Profile - Manage tourist profile with favorite guides
- Bookings - Convert favorites to actual bookings