Restaurant API
This document outlines the API operations for retrieving restaurant data. The information with images may not unmatched. Below are the typical operations you can perform.
Base URL:
https://fdelux.globeapp.dev/api
Endpoint Summary
Method | Path | Description |
---|---|---|
GET: | /api/restaurants | Fetch All Restaurants |
GET: | /api/restaurants/popular | Fetch Popular Restaurants |
POST: | /api/restaurants/nearby | Fetch Nearby Restaurants |
GET: | /api/restaurants/cuisine-categories | Fetch Cuisine Categories |
GET: | /api/restaurants/dietary-options | Fetch Dietary Options |
POST: | /api/restaurants/filter | Filter Restaurants |
GET: | /api/restaurants/{id} | Find Restaurant by ID |
GET: | /api/restaurants/{id}/menu-items | Fetch Menu Items by Restaurant ID |
GET: | /api/restaurants/{id}/reviews | Fetch Reviews by Restaurant ID |
Fetch All Restaurants
- Method:
GET
-
Endpoint:
/restaurants
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
Responses
{
"message": "All restaurants fetched successfully",
"data": {
"restaurants": [
{
"id": 2001,
"name": "The Gourmet Bistro",
"rating": 4.9,
"location": {
"street_address": "10 Downing Street",
"city": "London",
"state_province": "England",
"postal_code": "SW1A 2AA",
"country": "United Kingdom",
"latitude": 51.5033,
"longitude": -0.1276
},
"cover": "https://fdelux.globeapp.dev/images/restaurants/pexels-chan-walrus-958545.jpg",
"cuisine": "French",
"lowest_price": 2.24,
"highest_price": 24.32
},
{
"id": 2002,
"name": "Spice Route Indian Cuisine",
"rating": 4.5,
"location": {
"street_address": "25 Spice Alley",
"city": "Manchester",
"state_province": "England",
"postal_code": "M1 1AA",
"country": "United Kingdom",
"latitude": 53.4808,
"longitude": -2.2426
},
"cover": "https://fdelux.globeapp.dev/images/restaurants/pexels-rajesh-tp-1624487.jpg",
"cuisine": "Indian",
"lowest_price": 2.24,
"highest_price": 24.32
}
]
}
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "An unexpected error occurred while fetching all restaurants.",
"details": "Error message details here."
}
Fetch Popular Restaurants
- Method:
GET
-
Endpoint:
/restaurants/popular
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/popular
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
Responses
{
"message": "Popular restaurants fetched successfully",
"data": {
"restaurants": [
{
"id": 2001,
"name": "The Gourmet Bistro",
"rating": 4.9,
"location": {
"street_address": "10 Downing Street",
"city": "London",
"state_province": "England",
"postal_code": "SW1A 2AA",
"country": "United Kingdom",
"latitude": 51.5033,
"longitude": -0.1276
},
"cover": "https://fdelux.globeapp.dev/images/restaurants/pexels-chan-walrus-958545.jpg",
"cuisine": "French",
"lowest_price": 2.24,
"highest_price": 24.32
}
]
}
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "An unexpected error occurred while fetching popular restaurants.",
"details": "Error message details here."
}
Fetch Nearby Restaurants
- Method:
POST
-
Endpoint:
/restaurants/nearby
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/nearby
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
{
"latitude": 51.5074,
"longitude": -0.1278,
"radius": 50.0 // in kilometers
}
Responses
{
"message": "Found 1 nearby restaurants",
"data": {
"restaurant_count": 1,
"restaurants": [
{
"id": 2001,
"name": "The Gourmet Bistro",
"rating": 4.9,
"location": {
"street_address": "10 Downing Street",
"city": "London",
"state_province": "England",
"postal_code": "SW1A 2AA",
"country": "United Kingdom",
"latitude": 51.5033,
"longitude": -0.1276
},
"cover": "https://fdelux.globeapp.dev/images/restaurants/pexels-chan-walrus-958545.jpg",
"cuisine": "French",
"lowest_price": 2.24,
"highest_price": 24.32
}
]
}
}
{
"message": "Invalid parameters for nearby search.",
"details": "Please provide valid 'latitude', 'longitude' (numeric), and 'radius' (positive numeric) in the request body."
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "No nearby restaurants found",
"details": "Try adjusting your coordinates or increasing the search radius."
}
{
"message": "Method Not Allowed",
"details": "Only POST requests are supported for this endpoint when using a request body."
}
{
"message": "An unexpected error occurred while fetching nearby restaurants.",
"details": "Error message details here."
}
Fetch Cuisine Categories
- Method:
GET
-
Endpoint:
/restaurants/cuisine-categories
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/cuisine-categories
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
Responses
{
"message": "Cuisine categories fetched successfully",
"data": {
"cuisine_categories": [
"All",
"French",
"Indonesian",
"Italian",
"Vegan",
"Japanese",
"Cafe"
]
}
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "An unexpected error occurred while fetching cuisine-categories.",
"details": "Error message details here."
}
Fetch Dietary Options
- Method:
GET
-
Endpoint:
/restaurants/dietary-options
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/dietary-options
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
Responses
{
"message": "Dietary options fetched successfully",
"data": {
"dietary_options": [
"All",
"Vegetarian",
"Gluten-Free",
"Halal",
"Vegan",
"Organic",
"Pescatarian",
"Vegan Options"
]
}
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "An unexpected error occurred while fetching dietary options.",
"details": "Error message details here."
}
Filter Restaurants
- Method:
POST
-
Endpoint:
/restaurants/filter
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/filter
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
{
"cuisine": "Italian",
"dietary_option": "Vegetarian"
}
Responses
{
"message": "Restaurants filtered successfully",
"data": {
"restaurant_count": 1,
"restaurants": [
{
"id": 2003,
"name": "Pasta Paradise",
"rating": 4.6,
"location": {
"street_address": "15 Pasta Lane",
"city": "Rome",
"state_province": "Lazio",
"postal_code": "00100",
"country": "Italy",
"latitude": 41.9028,
"longitude": 12.4964
},
"cover": "https://fdelux.globeapp.dev/images/restaurants/pexels-engin-akyurt-2955816.jpg",
"cuisine": "Italian",
"lowest_price": 2.24,
"highest_price": 24.32
}
]
}
}
{
"message": "Missing required parameters.",
"details": "Please provide both \"cuisine\" (string) and \"dietary_option\" (string) in the request body."
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "No restaurants found matching the criteria",
"details": "Try adjusting your filter parameters."
}
{
"message": "Method Not Allowed",
"details": "Only POST requests are supported for this endpoint when using a request body."
}
{
"message": "An unexpected error occurred while filtering restaurants.",
"details": "Error message details here."
}
Find Restaurant by ID
- Method:
GET
-
Endpoint:
/restaurants/{id}
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/2001
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
Responses
{
"message": "Restaurant fetched successfully",
"data": {
"restaurant": {
"id": 101,
"name": "The Gourmet Haven",
"description": "A Michelin-starred restaurant offering a modern twist on classic French cuisine.",
"rating": 4.9,
"lowest_price": 17.92,
"highest_price": 41.6,
"location": {
"street_address": "10 Rue de la Paix",
"city": "Paris",
"state_province": "Île-de-France",
"postal_code": "75002",
"country": "France",
"latitude": 48.8672,
"longitude": 2.3263
},
"contact": {
"phone": "+33 1 40 12 34 56",
"email": "[email protected]",
"website": "https://www.gourmethaven.fr"
},
"cover": "https://fdelux.globeapp.dev/images/restaurants/pexels-pixabay-262978.jpg",
"images": [
"https://fdelux.globeapp.dev/images/restaurants/pexels-pixabay-262978.jpg",
"https://fdelux.globeapp.dev/images/restaurants/pexels-reneasmussen-3289078.jpg",
"https://fdelux.globeapp.dev/images/restaurants/pexels-valeriya-32083393.jpg",
"https://fdelux.globeapp.dev/images/restaurants/pexels-fwstudio-1722183.jpg"
],
"image_sources": [
"https://www.pexels.com/"
],
"cuisine": "French",
"dietary_options": [
"Vegetarian",
"Gluten-Free"
],
"amenities": [
"Free Wi-Fi",
"Outdoor Seating",
"Private Dining Rooms",
"Valet Parking"
],
"opening_hours": {
"monday": "18:00-22:00",
"tuesday": "18:00-22:00",
"wednesday": "18:00-22:00",
"thursday": "18:00-22:00",
"friday": "18:00-23:00",
"saturday": "18:00-23:00",
"sunday": "Closed"
}
}
}
}
{
"message": "Invalid ID parameter",
"details": "ID must be a valid integer."
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "Restaurant not found",
"details": "No restaurant found with the provided ID: 2001"
}
{
"message": "An unexpected error occurred while finding the restaurant.",
"details": "Error message details here."
}
Fetch Reviews by Restaurant ID
- Method:
GET
-
Endpoint:
/restaurants/{id}/reviews
Example Request URL:
https://fdelux.globeapp.dev/api/restaurants/2001/reviews
Request
{
"Content-Type": "application/json",
"Authorization": "Bearer your-access-token"
}
Responses
{
"message": "Reviews fetched successfully",
"data": {
"reviews": [
{
"id": 1,
"restaurant_id": 2001,
"user_id": 21,
"user_name": "Emily White",
"rating": 5.0,
"comment": "Absolutely phenomenal! The Coq au Vin was a culinary masterpiece. Impeccable service and ambiance.",
"created_at": "2025-07-01T19:00:00"
},
{
"id": 2,
"restaurant_id": 2001,
"user_id": 22,
"user_name": "David Green",
"rating": 4.5,
"comment": "Great food and a lovely atmosphere. The Salade Niçoise was fresh and delicious. A bit pricey but worth it.",
"created_at": "2025-07-02T20:30:00"
}
]
}
}
{
"message": "Invalid restaurant ID parameter",
"details": "Restaurant ID must be a valid integer."
}
{
"message": "Authentication required. Please provide a Bearer token.",
"details": "Include a valid Bearer token in the Authorization header."
}
{
"message": "No reviews found for this restaurant",
"details": "No review data available for restaurant ID: 2001"
}
{
"message": "An unexpected error occurred while fetching reviews.",
"details": "Error message details here."
}