Restaurant & Food Delivery API

Complete restaurant and food delivery platform with menus, orders, reservations, reviews, and delivery tracking

9
Resources
2025-11-28
2 days ago

Categories

Food categories and menu sections

GET /api/restaurant/categories Public

Retrieve a paginated list of all categories

Request Example
GET /api/restaurant/categories
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "name": "Appetizers",
        "slug": "appetizers",
        "description": "Starters and small bites",
        "icon": "\ud83e\udd57",
        "items_count": 24
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/categories/{id} Public

Retrieve a single categorie by ID

Request Example
GET /api/restaurant/categories/1
Accept: application/json
Response Example 200 OK
{
    "name": "Appetizers",
    "slug": "appetizers",
    "description": "Starters and small bites",
    "icon": "\ud83e\udd57",
    "items_count": 24
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested categorie does not exist"
}
POST /api/restaurant/categories Auth Required

Create a new categorie

Request Body
POST /api/restaurant/categories
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Appetizers",
    "slug": "appetizers",
    "description": "Starters and small bites",
    "icon": "\ud83e\udd57",
    "items_count": 24
}
Response Example 201 Created
{
    "name": "Appetizers",
    "slug": "appetizers",
    "description": "Starters and small bites",
    "icon": "\ud83e\udd57",
    "items_count": 24
}
PUT/PATCH /api/restaurant/categories/{id} Auth Required

Update an existing categorie

Request Body
PUT /api/restaurant/categories/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Appetizers",
    "slug": "appetizers",
    "description": "Starters and small bites",
    "icon": "\ud83e\udd57",
    "items_count": 24
}
Response Example 200 OK
{
    "name": "Appetizers",
    "slug": "appetizers",
    "description": "Starters and small bites",
    "icon": "\ud83e\udd57",
    "items_count": 24
}
DELETE /api/restaurant/categories/{id} Auth Required

Delete a categorie by ID

Request Example
DELETE /api/restaurant/categories/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Categorie deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Delivery-addresses

User delivery addresses - user-specific

GET /api/restaurant/delivery-addresses Auth Required User Filtering

Retrieve a paginated list of all delivery-addresses

Request Example
GET /api/restaurant/delivery-addresses
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "user_id": 1,
        "user_name": "Michael Johnson",
        "label": "Home",
        "street_address": "789 Park Avenue",
        "apartment": "Apt 15B",
        "city": "New York",
        "postal_code": "10021",
        "phone": "+1-555-0201",
        "delivery_instructions": "Ring doorbell twice",
        "is_default": true
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/delivery-addresses/{id} Auth Required

Retrieve a single delivery-addresse by ID

Request Example
GET /api/restaurant/delivery-addresses/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "label": "Home",
    "street_address": "789 Park Avenue",
    "apartment": "Apt 15B",
    "city": "New York",
    "postal_code": "10021",
    "phone": "+1-555-0201",
    "delivery_instructions": "Ring doorbell twice",
    "is_default": true
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested delivery-addresse does not exist"
}
POST /api/restaurant/delivery-addresses Auth Required Auto User ID

Create a new delivery-addresse

Request Body
POST /api/restaurant/delivery-addresses
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "label": "Home",
    "street_address": "789 Park Avenue",
    "apartment": "Apt 15B",
    "city": "New York",
    "postal_code": "10021",
    "phone": "+1-555-0201",
    "delivery_instructions": "Ring doorbell twice",
    "is_default": true
}
Response Example 201 Created
{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "label": "Home",
    "street_address": "789 Park Avenue",
    "apartment": "Apt 15B",
    "city": "New York",
    "postal_code": "10021",
    "phone": "+1-555-0201",
    "delivery_instructions": "Ring doorbell twice",
    "is_default": true
}
PUT/PATCH /api/restaurant/delivery-addresses/{id} Auth Required Ownership Check

Update an existing delivery-addresse

Only the owner can update this resource
Request Body
PUT /api/restaurant/delivery-addresses/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "label": "Home",
    "street_address": "789 Park Avenue",
    "apartment": "Apt 15B",
    "city": "New York",
    "postal_code": "10021",
    "phone": "+1-555-0201",
    "delivery_instructions": "Ring doorbell twice",
    "is_default": true
}
Response Example 200 OK
{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "label": "Home",
    "street_address": "789 Park Avenue",
    "apartment": "Apt 15B",
    "city": "New York",
    "postal_code": "10021",
    "phone": "+1-555-0201",
    "delivery_instructions": "Ring doorbell twice",
    "is_default": true
}
DELETE /api/restaurant/delivery-addresses/{id} Auth Required Ownership Check

Delete a delivery-addresse by ID

Only the owner can delete this resource
Request Example
DELETE /api/restaurant/delivery-addresses/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Delivery-addresse deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Menu-items

Restaurant menu items and dishes

GET /api/restaurant/menu-items Public

Retrieve a paginated list of all menu-items

Request Example
GET /api/restaurant/menu-items
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "restaurant_id": 1,
        "restaurant_name": "Bella Italia",
        "category_id": 3,
        "category_name": "Pizza",
        "name": "Margherita Pizza",
        "slug": "margherita-pizza",
        "description": "Classic pizza with San Marzano tomatoes, fresh mozzarella, and basil",
        "image": "https://picsum.photos/600/400?random=food1",
        "price": 14.9900000000000002131628207280300557613372802734375,
        "original_price": null,
        "ingredients": [
            "Tomato Sauce",
            "Mozzarella",
            "Basil",
            "Olive Oil"
        ],
        "allergens": [
            "Gluten",
            "Dairy"
        ],
        "calories": 850,
        "is_vegetarian": true,
        "is_vegan": false,
        "is_gluten_free": false,
        "is_spicy": false,
        "spice_level": 0,
        "preparation_time": "15-20 min",
        "is_available": true,
        "is_popular": true,
        "rating": 4.79999999999999982236431605997495353221893310546875,
        "reviews_count": 156
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/menu-items/{id} Public

Retrieve a single menu-item by ID

Request Example
GET /api/restaurant/menu-items/1
Accept: application/json
Response Example 200 OK
{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "category_id": 3,
    "category_name": "Pizza",
    "name": "Margherita Pizza",
    "slug": "margherita-pizza",
    "description": "Classic pizza with San Marzano tomatoes, fresh mozzarella, and basil",
    "image": "https://picsum.photos/600/400?random=food1",
    "price": 14.9900000000000002131628207280300557613372802734375,
    "original_price": null,
    "ingredients": [
        "Tomato Sauce",
        "Mozzarella",
        "Basil",
        "Olive Oil"
    ],
    "allergens": [
        "Gluten",
        "Dairy"
    ],
    "calories": 850,
    "is_vegetarian": true,
    "is_vegan": false,
    "is_gluten_free": false,
    "is_spicy": false,
    "spice_level": 0,
    "preparation_time": "15-20 min",
    "is_available": true,
    "is_popular": true,
    "rating": 4.79999999999999982236431605997495353221893310546875,
    "reviews_count": 156
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested menu-item does not exist"
}
POST /api/restaurant/menu-items Auth Required

Create a new menu-item

Request Body
POST /api/restaurant/menu-items
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "category_id": 3,
    "category_name": "Pizza",
    "name": "Margherita Pizza",
    "slug": "margherita-pizza",
    "description": "Classic pizza with San Marzano tomatoes, fresh mozzarella, and basil",
    "image": "https://picsum.photos/600/400?random=food1",
    "price": 14.9900000000000002131628207280300557613372802734375,
    "original_price": null,
    "ingredients": [
        "Tomato Sauce",
        "Mozzarella",
        "Basil",
        "Olive Oil"
    ],
    "allergens": [
        "Gluten",
        "Dairy"
    ],
    "calories": 850,
    "is_vegetarian": true,
    "is_vegan": false,
    "is_gluten_free": false,
    "is_spicy": false,
    "spice_level": 0,
    "preparation_time": "15-20 min",
    "is_available": true,
    "is_popular": true,
    "rating": 4.79999999999999982236431605997495353221893310546875,
    "reviews_count": 156
}
Response Example 201 Created
{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "category_id": 3,
    "category_name": "Pizza",
    "name": "Margherita Pizza",
    "slug": "margherita-pizza",
    "description": "Classic pizza with San Marzano tomatoes, fresh mozzarella, and basil",
    "image": "https://picsum.photos/600/400?random=food1",
    "price": 14.9900000000000002131628207280300557613372802734375,
    "original_price": null,
    "ingredients": [
        "Tomato Sauce",
        "Mozzarella",
        "Basil",
        "Olive Oil"
    ],
    "allergens": [
        "Gluten",
        "Dairy"
    ],
    "calories": 850,
    "is_vegetarian": true,
    "is_vegan": false,
    "is_gluten_free": false,
    "is_spicy": false,
    "spice_level": 0,
    "preparation_time": "15-20 min",
    "is_available": true,
    "is_popular": true,
    "rating": 4.79999999999999982236431605997495353221893310546875,
    "reviews_count": 156
}
PUT/PATCH /api/restaurant/menu-items/{id} Auth Required

Update an existing menu-item

Request Body
PUT /api/restaurant/menu-items/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "category_id": 3,
    "category_name": "Pizza",
    "name": "Margherita Pizza",
    "slug": "margherita-pizza",
    "description": "Classic pizza with San Marzano tomatoes, fresh mozzarella, and basil",
    "image": "https://picsum.photos/600/400?random=food1",
    "price": 14.9900000000000002131628207280300557613372802734375,
    "original_price": null,
    "ingredients": [
        "Tomato Sauce",
        "Mozzarella",
        "Basil",
        "Olive Oil"
    ],
    "allergens": [
        "Gluten",
        "Dairy"
    ],
    "calories": 850,
    "is_vegetarian": true,
    "is_vegan": false,
    "is_gluten_free": false,
    "is_spicy": false,
    "spice_level": 0,
    "preparation_time": "15-20 min",
    "is_available": true,
    "is_popular": true,
    "rating": 4.79999999999999982236431605997495353221893310546875,
    "reviews_count": 156
}
Response Example 200 OK
{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "category_id": 3,
    "category_name": "Pizza",
    "name": "Margherita Pizza",
    "slug": "margherita-pizza",
    "description": "Classic pizza with San Marzano tomatoes, fresh mozzarella, and basil",
    "image": "https://picsum.photos/600/400?random=food1",
    "price": 14.9900000000000002131628207280300557613372802734375,
    "original_price": null,
    "ingredients": [
        "Tomato Sauce",
        "Mozzarella",
        "Basil",
        "Olive Oil"
    ],
    "allergens": [
        "Gluten",
        "Dairy"
    ],
    "calories": 850,
    "is_vegetarian": true,
    "is_vegan": false,
    "is_gluten_free": false,
    "is_spicy": false,
    "spice_level": 0,
    "preparation_time": "15-20 min",
    "is_available": true,
    "is_popular": true,
    "rating": 4.79999999999999982236431605997495353221893310546875,
    "reviews_count": 156
}
DELETE /api/restaurant/menu-items/{id} Auth Required

Delete a menu-item by ID

Request Example
DELETE /api/restaurant/menu-items/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Menu-item deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Orders

Customer food orders - user-specific

GET /api/restaurant/orders Auth Required User Filtering

Retrieve a paginated list of all orders

Returns only orders belonging to authenticated user
Request Example
GET /api/restaurant/orders
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "order_number": "ORD-2024-001234",
        "user_id": 1,
        "user_name": "Michael Johnson",
        "restaurant_id": 1,
        "restaurant_name": "Bella Italia",
        "items": [
            {
                "name": "Margherita Pizza",
                "quantity": 1,
                "price": 14.9900000000000002131628207280300557613372802734375
            },
            {
                "name": "Spaghetti Carbonara",
                "quantity": 1,
                "price": 16.989999999999998436805981327779591083526611328125
            }
        ],
        "subtotal": 31.980000000000000426325641456060111522674560546875,
        "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
        "tax": 3.20000000000000017763568394002504646778106689453125,
        "discount": 0,
        "total": 39.1700000000000017053025658242404460906982421875,
        "delivery_address": {
            "street": "789 Park Avenue, Apt 15B",
            "city": "New York",
            "postal_code": "10021"
        },
        "payment_method": "Credit Card",
        "status": "Delivered",
        "delivery_type": "Delivery",
        "special_instructions": "Please ring the doorbell",
        "estimated_delivery_time": "2024-01-28T19:30:00Z",
        "created_at": "2024-01-28T18:45:00Z"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/orders/{id} Auth Required

Retrieve a single order by ID

Request Example
GET /api/restaurant/orders/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
    "order_number": "ORD-2024-001234",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "items": [
        {
            "name": "Margherita Pizza",
            "quantity": 1,
            "price": 14.9900000000000002131628207280300557613372802734375
        },
        {
            "name": "Spaghetti Carbonara",
            "quantity": 1,
            "price": 16.989999999999998436805981327779591083526611328125
        }
    ],
    "subtotal": 31.980000000000000426325641456060111522674560546875,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "tax": 3.20000000000000017763568394002504646778106689453125,
    "discount": 0,
    "total": 39.1700000000000017053025658242404460906982421875,
    "delivery_address": {
        "street": "789 Park Avenue, Apt 15B",
        "city": "New York",
        "postal_code": "10021"
    },
    "payment_method": "Credit Card",
    "status": "Delivered",
    "delivery_type": "Delivery",
    "special_instructions": "Please ring the doorbell",
    "estimated_delivery_time": "2024-01-28T19:30:00Z",
    "created_at": "2024-01-28T18:45:00Z"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested order does not exist"
}
POST /api/restaurant/orders Auth Required Auto User ID

Create a new order

Request Body
POST /api/restaurant/orders
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "order_number": "ORD-2024-001234",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "items": [
        {
            "name": "Margherita Pizza",
            "quantity": 1,
            "price": 14.9900000000000002131628207280300557613372802734375
        },
        {
            "name": "Spaghetti Carbonara",
            "quantity": 1,
            "price": 16.989999999999998436805981327779591083526611328125
        }
    ],
    "subtotal": 31.980000000000000426325641456060111522674560546875,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "tax": 3.20000000000000017763568394002504646778106689453125,
    "discount": 0,
    "total": 39.1700000000000017053025658242404460906982421875,
    "delivery_address": {
        "street": "789 Park Avenue, Apt 15B",
        "city": "New York",
        "postal_code": "10021"
    },
    "payment_method": "Credit Card",
    "status": "Delivered",
    "delivery_type": "Delivery",
    "special_instructions": "Please ring the doorbell",
    "estimated_delivery_time": "2024-01-28T19:30:00Z"
}
Response Example 201 Created
{
    "order_number": "ORD-2024-001234",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "items": [
        {
            "name": "Margherita Pizza",
            "quantity": 1,
            "price": 14.9900000000000002131628207280300557613372802734375
        },
        {
            "name": "Spaghetti Carbonara",
            "quantity": 1,
            "price": 16.989999999999998436805981327779591083526611328125
        }
    ],
    "subtotal": 31.980000000000000426325641456060111522674560546875,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "tax": 3.20000000000000017763568394002504646778106689453125,
    "discount": 0,
    "total": 39.1700000000000017053025658242404460906982421875,
    "delivery_address": {
        "street": "789 Park Avenue, Apt 15B",
        "city": "New York",
        "postal_code": "10021"
    },
    "payment_method": "Credit Card",
    "status": "Delivered",
    "delivery_type": "Delivery",
    "special_instructions": "Please ring the doorbell",
    "estimated_delivery_time": "2024-01-28T19:30:00Z",
    "created_at": "2024-01-28T18:45:00Z"
}
PUT/PATCH /api/restaurant/orders/{id} Auth Required Ownership Check

Update an existing order

Only the owner can update this resource
Request Body
PUT /api/restaurant/orders/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "order_number": "ORD-2024-001234",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "items": [
        {
            "name": "Margherita Pizza",
            "quantity": 1,
            "price": 14.9900000000000002131628207280300557613372802734375
        },
        {
            "name": "Spaghetti Carbonara",
            "quantity": 1,
            "price": 16.989999999999998436805981327779591083526611328125
        }
    ],
    "subtotal": 31.980000000000000426325641456060111522674560546875,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "tax": 3.20000000000000017763568394002504646778106689453125,
    "discount": 0,
    "total": 39.1700000000000017053025658242404460906982421875,
    "delivery_address": {
        "street": "789 Park Avenue, Apt 15B",
        "city": "New York",
        "postal_code": "10021"
    },
    "payment_method": "Credit Card",
    "status": "Delivered",
    "delivery_type": "Delivery",
    "special_instructions": "Please ring the doorbell",
    "estimated_delivery_time": "2024-01-28T19:30:00Z"
}
Response Example 200 OK
{
    "order_number": "ORD-2024-001234",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "items": [
        {
            "name": "Margherita Pizza",
            "quantity": 1,
            "price": 14.9900000000000002131628207280300557613372802734375
        },
        {
            "name": "Spaghetti Carbonara",
            "quantity": 1,
            "price": 16.989999999999998436805981327779591083526611328125
        }
    ],
    "subtotal": 31.980000000000000426325641456060111522674560546875,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "tax": 3.20000000000000017763568394002504646778106689453125,
    "discount": 0,
    "total": 39.1700000000000017053025658242404460906982421875,
    "delivery_address": {
        "street": "789 Park Avenue, Apt 15B",
        "city": "New York",
        "postal_code": "10021"
    },
    "payment_method": "Credit Card",
    "status": "Delivered",
    "delivery_type": "Delivery",
    "special_instructions": "Please ring the doorbell",
    "estimated_delivery_time": "2024-01-28T19:30:00Z",
    "created_at": "2024-01-28T18:45:00Z"
}
DELETE /api/restaurant/orders/{id} Auth Required Ownership Check

Delete a order by ID

Only the owner can delete this resource
Request Example
DELETE /api/restaurant/orders/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Order deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Reservations

Table reservations - user-specific

GET /api/restaurant/reservations Auth Required User Filtering

Retrieve a paginated list of all reservations

Returns only reservations belonging to authenticated user
Request Example
GET /api/restaurant/reservations
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "reservation_number": "RES-2024-4567",
        "user_id": 1,
        "user_name": "Michael Johnson",
        "user_phone": "+1-555-0201",
        "restaurant_id": 1,
        "restaurant_name": "Bella Italia",
        "date": "2024-02-05",
        "time": "19:30",
        "guests_count": 4,
        "table_number": "T-12",
        "status": "Confirmed",
        "special_requests": "Window seat if possible",
        "created_at": "2024-01-25T14:30:00Z"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/reservations/{id} Auth Required

Retrieve a single reservation by ID

Request Example
GET /api/restaurant/reservations/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
    "reservation_number": "RES-2024-4567",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_phone": "+1-555-0201",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "date": "2024-02-05",
    "time": "19:30",
    "guests_count": 4,
    "table_number": "T-12",
    "status": "Confirmed",
    "special_requests": "Window seat if possible",
    "created_at": "2024-01-25T14:30:00Z"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested reservation does not exist"
}
POST /api/restaurant/reservations Auth Required Auto User ID

Create a new reservation

Request Body
POST /api/restaurant/reservations
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "reservation_number": "RES-2024-4567",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_phone": "+1-555-0201",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "date": "2024-02-05",
    "time": "19:30",
    "guests_count": 4,
    "table_number": "T-12",
    "status": "Confirmed",
    "special_requests": "Window seat if possible"
}
Response Example 201 Created
{
    "reservation_number": "RES-2024-4567",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_phone": "+1-555-0201",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "date": "2024-02-05",
    "time": "19:30",
    "guests_count": 4,
    "table_number": "T-12",
    "status": "Confirmed",
    "special_requests": "Window seat if possible",
    "created_at": "2024-01-25T14:30:00Z"
}
PUT/PATCH /api/restaurant/reservations/{id} Auth Required Ownership Check

Update an existing reservation

Only the owner can update this resource
Request Body
PUT /api/restaurant/reservations/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "reservation_number": "RES-2024-4567",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_phone": "+1-555-0201",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "date": "2024-02-05",
    "time": "19:30",
    "guests_count": 4,
    "table_number": "T-12",
    "status": "Confirmed",
    "special_requests": "Window seat if possible"
}
Response Example 200 OK
{
    "reservation_number": "RES-2024-4567",
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_phone": "+1-555-0201",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "date": "2024-02-05",
    "time": "19:30",
    "guests_count": 4,
    "table_number": "T-12",
    "status": "Confirmed",
    "special_requests": "Window seat if possible",
    "created_at": "2024-01-25T14:30:00Z"
}
DELETE /api/restaurant/reservations/{id} Auth Required Ownership Check

Delete a reservation by ID

Only the owner can delete this resource
Request Example
DELETE /api/restaurant/reservations/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Reservation deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Restaurants

Restaurant listings and information

GET /api/restaurant/restaurants Public

Retrieve a paginated list of all restaurants

Request Example
GET /api/restaurant/restaurants
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "name": "Bella Italia",
        "slug": "bella-italia",
        "description": "Authentic Italian cuisine with homemade pasta and wood-fired pizza",
        "cuisine_type": "Italian",
        "logo": "https://picsum.photos/200/200?random=rest1",
        "cover_image": "https://picsum.photos/800/400?random=rest1",
        "address": "123 Main Street",
        "city": "New York",
        "phone": "+1-555-1001",
        "email": "info@bellaitalia.com",
        "website": "https://bellaitalia.com",
        "rating": 4.70000000000000017763568394002504646778106689453125,
        "reviews_count": 342,
        "price_range": "$$",
        "opening_hours": {
            "monday": "11:00-22:00",
            "tuesday": "11:00-22:00",
            "wednesday": "11:00-22:00",
            "thursday": "11:00-23:00",
            "friday": "11:00-23:00",
            "saturday": "12:00-23:00",
            "sunday": "12:00-21:00"
        },
        "delivery_time": "30-45 min",
        "minimum_order": 15,
        "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
        "is_open": true,
        "accepts_reservations": true
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/restaurants/{id} Public

Retrieve a single restaurant by ID

Request Example
GET /api/restaurant/restaurants/1
Accept: application/json
Response Example 200 OK
{
    "name": "Bella Italia",
    "slug": "bella-italia",
    "description": "Authentic Italian cuisine with homemade pasta and wood-fired pizza",
    "cuisine_type": "Italian",
    "logo": "https://picsum.photos/200/200?random=rest1",
    "cover_image": "https://picsum.photos/800/400?random=rest1",
    "address": "123 Main Street",
    "city": "New York",
    "phone": "+1-555-1001",
    "email": "info@bellaitalia.com",
    "website": "https://bellaitalia.com",
    "rating": 4.70000000000000017763568394002504646778106689453125,
    "reviews_count": 342,
    "price_range": "$$",
    "opening_hours": {
        "monday": "11:00-22:00",
        "tuesday": "11:00-22:00",
        "wednesday": "11:00-22:00",
        "thursday": "11:00-23:00",
        "friday": "11:00-23:00",
        "saturday": "12:00-23:00",
        "sunday": "12:00-21:00"
    },
    "delivery_time": "30-45 min",
    "minimum_order": 15,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "is_open": true,
    "accepts_reservations": true
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested restaurant does not exist"
}
POST /api/restaurant/restaurants Auth Required

Create a new restaurant

Request Body
POST /api/restaurant/restaurants
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Bella Italia",
    "slug": "bella-italia",
    "description": "Authentic Italian cuisine with homemade pasta and wood-fired pizza",
    "cuisine_type": "Italian",
    "logo": "https://picsum.photos/200/200?random=rest1",
    "cover_image": "https://picsum.photos/800/400?random=rest1",
    "address": "123 Main Street",
    "city": "New York",
    "phone": "+1-555-1001",
    "email": "info@bellaitalia.com",
    "website": "https://bellaitalia.com",
    "rating": 4.70000000000000017763568394002504646778106689453125,
    "reviews_count": 342,
    "price_range": "$$",
    "opening_hours": {
        "monday": "11:00-22:00",
        "tuesday": "11:00-22:00",
        "wednesday": "11:00-22:00",
        "thursday": "11:00-23:00",
        "friday": "11:00-23:00",
        "saturday": "12:00-23:00",
        "sunday": "12:00-21:00"
    },
    "delivery_time": "30-45 min",
    "minimum_order": 15,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "is_open": true,
    "accepts_reservations": true
}
Response Example 201 Created
{
    "name": "Bella Italia",
    "slug": "bella-italia",
    "description": "Authentic Italian cuisine with homemade pasta and wood-fired pizza",
    "cuisine_type": "Italian",
    "logo": "https://picsum.photos/200/200?random=rest1",
    "cover_image": "https://picsum.photos/800/400?random=rest1",
    "address": "123 Main Street",
    "city": "New York",
    "phone": "+1-555-1001",
    "email": "info@bellaitalia.com",
    "website": "https://bellaitalia.com",
    "rating": 4.70000000000000017763568394002504646778106689453125,
    "reviews_count": 342,
    "price_range": "$$",
    "opening_hours": {
        "monday": "11:00-22:00",
        "tuesday": "11:00-22:00",
        "wednesday": "11:00-22:00",
        "thursday": "11:00-23:00",
        "friday": "11:00-23:00",
        "saturday": "12:00-23:00",
        "sunday": "12:00-21:00"
    },
    "delivery_time": "30-45 min",
    "minimum_order": 15,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "is_open": true,
    "accepts_reservations": true
}
PUT/PATCH /api/restaurant/restaurants/{id} Auth Required

Update an existing restaurant

Request Body
PUT /api/restaurant/restaurants/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Bella Italia",
    "slug": "bella-italia",
    "description": "Authentic Italian cuisine with homemade pasta and wood-fired pizza",
    "cuisine_type": "Italian",
    "logo": "https://picsum.photos/200/200?random=rest1",
    "cover_image": "https://picsum.photos/800/400?random=rest1",
    "address": "123 Main Street",
    "city": "New York",
    "phone": "+1-555-1001",
    "email": "info@bellaitalia.com",
    "website": "https://bellaitalia.com",
    "rating": 4.70000000000000017763568394002504646778106689453125,
    "reviews_count": 342,
    "price_range": "$$",
    "opening_hours": {
        "monday": "11:00-22:00",
        "tuesday": "11:00-22:00",
        "wednesday": "11:00-22:00",
        "thursday": "11:00-23:00",
        "friday": "11:00-23:00",
        "saturday": "12:00-23:00",
        "sunday": "12:00-21:00"
    },
    "delivery_time": "30-45 min",
    "minimum_order": 15,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "is_open": true,
    "accepts_reservations": true
}
Response Example 200 OK
{
    "name": "Bella Italia",
    "slug": "bella-italia",
    "description": "Authentic Italian cuisine with homemade pasta and wood-fired pizza",
    "cuisine_type": "Italian",
    "logo": "https://picsum.photos/200/200?random=rest1",
    "cover_image": "https://picsum.photos/800/400?random=rest1",
    "address": "123 Main Street",
    "city": "New York",
    "phone": "+1-555-1001",
    "email": "info@bellaitalia.com",
    "website": "https://bellaitalia.com",
    "rating": 4.70000000000000017763568394002504646778106689453125,
    "reviews_count": 342,
    "price_range": "$$",
    "opening_hours": {
        "monday": "11:00-22:00",
        "tuesday": "11:00-22:00",
        "wednesday": "11:00-22:00",
        "thursday": "11:00-23:00",
        "friday": "11:00-23:00",
        "saturday": "12:00-23:00",
        "sunday": "12:00-21:00"
    },
    "delivery_time": "30-45 min",
    "minimum_order": 15,
    "delivery_fee": 3.9900000000000002131628207280300557613372802734375,
    "is_open": true,
    "accepts_reservations": true
}
DELETE /api/restaurant/restaurants/{id} Auth Required

Delete a restaurant by ID

Request Example
DELETE /api/restaurant/restaurants/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Restaurant deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Reviews

Restaurant and menu item reviews

GET /api/restaurant/reviews Public

Retrieve a paginated list of all reviews

Request Example
GET /api/restaurant/reviews
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "user_id": 1,
        "user_name": "Michael Johnson",
        "user_avatar": "https://i.pravatar.cc/50?img=12",
        "restaurant_id": 1,
        "restaurant_name": "Bella Italia",
        "menu_item_id": 1,
        "menu_item_name": "Margherita Pizza",
        "rating": 5,
        "title": "Best pizza in town!",
        "comment": "Absolutely delicious! The crust was perfect and ingredients were fresh. Will definitely order again.",
        "food_quality": 5,
        "service_quality": 5,
        "delivery_speed": 4,
        "value_for_money": 5,
        "images": [
            "https://picsum.photos/400/300?random=review1"
        ],
        "verified_order": true,
        "helpful_count": 23,
        "created_at": "2024-01-20T10:30:00Z"
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/reviews/{id} Public

Retrieve a single review by ID

Request Example
GET /api/restaurant/reviews/1
Accept: application/json
Response Example 200 OK
{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_avatar": "https://i.pravatar.cc/50?img=12",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "menu_item_id": 1,
    "menu_item_name": "Margherita Pizza",
    "rating": 5,
    "title": "Best pizza in town!",
    "comment": "Absolutely delicious! The crust was perfect and ingredients were fresh. Will definitely order again.",
    "food_quality": 5,
    "service_quality": 5,
    "delivery_speed": 4,
    "value_for_money": 5,
    "images": [
        "https://picsum.photos/400/300?random=review1"
    ],
    "verified_order": true,
    "helpful_count": 23,
    "created_at": "2024-01-20T10:30:00Z"
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested review does not exist"
}
POST /api/restaurant/reviews Auth Required Auto User ID

Create a new review

Request Body
POST /api/restaurant/reviews
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_avatar": "https://i.pravatar.cc/50?img=12",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "menu_item_id": 1,
    "menu_item_name": "Margherita Pizza",
    "rating": 5,
    "title": "Best pizza in town!",
    "comment": "Absolutely delicious! The crust was perfect and ingredients were fresh. Will definitely order again.",
    "food_quality": 5,
    "service_quality": 5,
    "delivery_speed": 4,
    "value_for_money": 5,
    "images": [
        "https://picsum.photos/400/300?random=review1"
    ],
    "verified_order": true,
    "helpful_count": 23
}
Response Example 201 Created
{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_avatar": "https://i.pravatar.cc/50?img=12",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "menu_item_id": 1,
    "menu_item_name": "Margherita Pizza",
    "rating": 5,
    "title": "Best pizza in town!",
    "comment": "Absolutely delicious! The crust was perfect and ingredients were fresh. Will definitely order again.",
    "food_quality": 5,
    "service_quality": 5,
    "delivery_speed": 4,
    "value_for_money": 5,
    "images": [
        "https://picsum.photos/400/300?random=review1"
    ],
    "verified_order": true,
    "helpful_count": 23,
    "created_at": "2024-01-20T10:30:00Z"
}
PUT/PATCH /api/restaurant/reviews/{id} Auth Required Ownership Check

Update an existing review

Only the owner can update this resource
Request Body
PUT /api/restaurant/reviews/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_avatar": "https://i.pravatar.cc/50?img=12",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "menu_item_id": 1,
    "menu_item_name": "Margherita Pizza",
    "rating": 5,
    "title": "Best pizza in town!",
    "comment": "Absolutely delicious! The crust was perfect and ingredients were fresh. Will definitely order again.",
    "food_quality": 5,
    "service_quality": 5,
    "delivery_speed": 4,
    "value_for_money": 5,
    "images": [
        "https://picsum.photos/400/300?random=review1"
    ],
    "verified_order": true,
    "helpful_count": 23
}
Response Example 200 OK
{
    "user_id": 1,
    "user_name": "Michael Johnson",
    "user_avatar": "https://i.pravatar.cc/50?img=12",
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "menu_item_id": 1,
    "menu_item_name": "Margherita Pizza",
    "rating": 5,
    "title": "Best pizza in town!",
    "comment": "Absolutely delicious! The crust was perfect and ingredients were fresh. Will definitely order again.",
    "food_quality": 5,
    "service_quality": 5,
    "delivery_speed": 4,
    "value_for_money": 5,
    "images": [
        "https://picsum.photos/400/300?random=review1"
    ],
    "verified_order": true,
    "helpful_count": 23,
    "created_at": "2024-01-20T10:30:00Z"
}
DELETE /api/restaurant/reviews/{id} Auth Required Ownership Check

Delete a review by ID

Only the owner can delete this resource
Request Example
DELETE /api/restaurant/reviews/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "Review deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Tables

Restaurant table information

GET /api/restaurant/tables Public

Retrieve a paginated list of all tables

Request Example
GET /api/restaurant/tables
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "restaurant_id": 1,
        "restaurant_name": "Bella Italia",
        "table_number": "T-1",
        "capacity": 2,
        "location": "Window",
        "is_available": true
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/tables/{id} Public

Retrieve a single table by ID

Request Example
GET /api/restaurant/tables/1
Accept: application/json
Response Example 200 OK
{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "table_number": "T-1",
    "capacity": 2,
    "location": "Window",
    "is_available": true
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested table does not exist"
}
POST /api/restaurant/tables Public

Create a new table

Request Body
POST /api/restaurant/tables
Content-Type: application/json

{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "table_number": "T-1",
    "capacity": 2,
    "location": "Window",
    "is_available": true
}
Response Example 201 Created
{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "table_number": "T-1",
    "capacity": 2,
    "location": "Window",
    "is_available": true
}
PUT/PATCH /api/restaurant/tables/{id} Public

Update an existing table

Request Body
PUT /api/restaurant/tables/1
Content-Type: application/json

{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "table_number": "T-1",
    "capacity": 2,
    "location": "Window",
    "is_available": true
}
Response Example 200 OK
{
    "restaurant_id": 1,
    "restaurant_name": "Bella Italia",
    "table_number": "T-1",
    "capacity": 2,
    "location": "Window",
    "is_available": true
}
DELETE /api/restaurant/tables/{id} Public

Delete a table by ID

Request Example
DELETE /api/restaurant/tables/1
Accept: application/json
Response Example 200 OK
{
  "message": "Table deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}

Users

Restaurant customers and users

GET /api/restaurant/users Public

Retrieve a paginated list of all users

Request Example
GET /api/restaurant/users
Accept: application/json
Response Example 200 OK
{
  "data": [
    {
        "id": 1,
        "name": "Michael Johnson",
        "email": "michael@foodlover.com",
        "password": "$2y$12$WPejqAxhV1x/RHOU4ZzqOuHp1qN2AnUi519gnMe95xh54jM07FCYG",
        "api_token": "7ffc0e13cc1bb1ae92ac22ab537b3c7054cb6668706b46e296be9acfc8769fba",
        "phone": "+1-555-0201",
        "avatar": "https://i.pravatar.cc/150?img=12",
        "joined_at": "2023-06-15",
        "orders_count": 28,
        "loyalty_points": 450,
        "is_premium": true
    },
    ...
  ],
  "meta": {
    "current_page": 1,
    "total": 50,
    "per_page": 15
  }
}
GET /api/restaurant/users/{id} Public

Retrieve a single user by ID

Request Example
GET /api/restaurant/users/1
Accept: application/json
Response Example 200 OK
{
    "id": 1,
    "name": "Michael Johnson",
    "email": "michael@foodlover.com",
    "password": "$2y$12$WPejqAxhV1x/RHOU4ZzqOuHp1qN2AnUi519gnMe95xh54jM07FCYG",
    "api_token": "7ffc0e13cc1bb1ae92ac22ab537b3c7054cb6668706b46e296be9acfc8769fba",
    "phone": "+1-555-0201",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "joined_at": "2023-06-15",
    "orders_count": 28,
    "loyalty_points": 450,
    "is_premium": true
}
Error Response 404 Not Found
{
  "error": "Resource not found",
  "message": "The requested user does not exist"
}
POST /api/restaurant/users Public

Create a new user

Request Body
POST /api/restaurant/users
Content-Type: application/json

{
    "name": "Michael Johnson",
    "email": "michael@foodlover.com",
    "password": "$2y$12$WPejqAxhV1x/RHOU4ZzqOuHp1qN2AnUi519gnMe95xh54jM07FCYG",
    "api_token": "7ffc0e13cc1bb1ae92ac22ab537b3c7054cb6668706b46e296be9acfc8769fba",
    "phone": "+1-555-0201",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "joined_at": "2023-06-15",
    "orders_count": 28,
    "loyalty_points": 450,
    "is_premium": true
}
Response Example 201 Created
{
    "id": 1,
    "name": "Michael Johnson",
    "email": "michael@foodlover.com",
    "password": "$2y$12$WPejqAxhV1x/RHOU4ZzqOuHp1qN2AnUi519gnMe95xh54jM07FCYG",
    "api_token": "7ffc0e13cc1bb1ae92ac22ab537b3c7054cb6668706b46e296be9acfc8769fba",
    "phone": "+1-555-0201",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "joined_at": "2023-06-15",
    "orders_count": 28,
    "loyalty_points": 450,
    "is_premium": true
}
PUT/PATCH /api/restaurant/users/{id} Auth Required Ownership Check

Update an existing user

Only the owner can update this resource
Request Body
PUT /api/restaurant/users/1
Authorization: Bearer YOUR_API_TOKEN
Content-Type: application/json

{
    "name": "Michael Johnson",
    "email": "michael@foodlover.com",
    "password": "$2y$12$WPejqAxhV1x/RHOU4ZzqOuHp1qN2AnUi519gnMe95xh54jM07FCYG",
    "api_token": "7ffc0e13cc1bb1ae92ac22ab537b3c7054cb6668706b46e296be9acfc8769fba",
    "phone": "+1-555-0201",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "joined_at": "2023-06-15",
    "orders_count": 28,
    "loyalty_points": 450,
    "is_premium": true
}
Response Example 200 OK
{
    "id": 1,
    "name": "Michael Johnson",
    "email": "michael@foodlover.com",
    "password": "$2y$12$WPejqAxhV1x/RHOU4ZzqOuHp1qN2AnUi519gnMe95xh54jM07FCYG",
    "api_token": "7ffc0e13cc1bb1ae92ac22ab537b3c7054cb6668706b46e296be9acfc8769fba",
    "phone": "+1-555-0201",
    "avatar": "https://i.pravatar.cc/150?img=12",
    "joined_at": "2023-06-15",
    "orders_count": 28,
    "loyalty_points": 450,
    "is_premium": true
}
DELETE /api/restaurant/users/{id} Auth Required Ownership Check

Delete a user by ID

Only the owner can delete this resource
Request Example
DELETE /api/restaurant/users/1
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Response Example 200 OK
{
  "message": "User deleted successfully"
}
Error Response 500 Error
{
  "error": "Deletion failed",
  "message": "Unable to delete the resource"
}