{
	"info": {
		"_postman_id": "restaurant-api-complete-final-v1",
		"name": "🍽️ Restaurant Management System - COMPLETE API v1",
		"description": "Complete, role-based Postman collection for the Restaurant Management System. Every endpoint is organized by role. Remember to add 'Authorization: Bearer {token}' header for protected routes.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "🌐 Central System",
			"description": "For discovering all restaurants in the multi-tenant system.",
			"item": [
				{
					"name": "List All Restaurants",
					"request": {
						"method": "GET",
						"header": [{"key": "Accept", "value": "application/json"}],
						"url": {
							"raw": "{{central_url}}/api/v1/restaurants",
							"host": ["{{central_url}}"],
							"path": ["api", "v1", "restaurants"]
						}
					}
				}
			]
		},
		{
			"name": "🔐 Authentication (All Roles)",
			"description": "Required first step for every role. Login to get access_token.",
			"item": [
				{
					"name": "Login",
					"event": [{
						"listen": "test",
						"script": {
							"exec": [
								"var json = pm.response.json();",
								"if (json.access_token) {",
								"    pm.environment.set('token', json.access_token);",
								"}"
							],
							"type": "text/javascript"
						}
					}],
					"request": {
						"method": "POST",
						"header": [{"key": "Accept", "value": "application/json"}],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"email\": \"admin@demo.com\",\n    \"password\": \"password\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/login",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "login"]
						}
					}
				},
				{
					"name": "My Profile (Me)",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/me",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "me"]
						}
					}
				},
				{
					"name": "Update My Profile",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Ahmed Updated\",\n    \"email\": \"admin@demo.com\",\n    \"gender\": \"male\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/profile/update",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "profile", "update"]
						}
					}
				},
				{
					"name": "My Addresses",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/profile/addresses",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "profile", "addresses"]
						}
					}
				},
				{
					"name": "Logout",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/logout",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "logout"]
						}
					}
				}
			]
		},
		{
			"name": "👑 Admin Panel",
			"description": "Requires role: admin",
			"item": [
				{
					"name": "Dashboard Sales Stats",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/stats",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "stats"]
						}
					}
				},
				{
					"name": "List All Staff",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/staff",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "staff"]
						}
					}
				},
				{
					"name": "Add New Staff",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"name\": \"Chef Ali\",\n    \"email\": \"chef@demo.com\",\n    \"password\": \"password\",\n    \"role\": \"kitchen\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/staff",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "staff"]
						}
					}
				},
				{
					"name": "Update Restaurant Settings",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"restaurant_name\": \"My Restaurant\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/settings",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "settings"]
						}
					}
				},
				{
					"name": "List Expenses",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/expenses",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "expenses"]
						}
					}
				},
				{
					"name": "Add New Expense",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"amount\": 250,\n    \"expense_category_id\": 1,\n    \"description\": \"Gas bill\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/expenses",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "expenses"]
						}
					}
				},
				{
					"name": "List Suppliers",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/suppliers",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "suppliers"]
						}
					}
				},
				{
					"name": "List Purchase Orders",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/admin/purchases",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "admin", "purchases"]
						}
					}
				}
			]
		},
		{
			"name": "💰 Waiter & Cashier",
			"description": "Requires role: staff or admin",
			"item": [
				{
					"name": "🔁 Shift - Open",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"opening_balance\": 1000\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/shifts/open",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "shifts", "open"]
						}
					}
				},
				{
					"name": "🔁 Shift - Current Status",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/shifts/current",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "shifts", "current"]
						}
					}
				},
				{
					"name": "🔁 Shift - Close",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"closing_balance\": 1750\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/shifts/close",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "shifts", "close"]
						}
					}
				},
				{
					"name": "📋 Orders - List All",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders?status=pending",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders"],
							"query": [
								{"key": "status", "value": "pending", "description": "pending | preparing | ready | served | delivered | cancelled"},
								{"key": "type", "value": "", "disabled": true, "description": "dine_in | delivery | takeaway"},
								{"key": "per_page", "value": "15", "disabled": true}
							]
						}
					}
				},
				{
					"name": "📋 Orders - Create (Dine In)",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"type\": \"dine_in\",\n    \"table_id\": 1,\n    \"payment_method\": \"cash\",\n    \"items\": [\n        { \"id\": 1, \"quantity\": 2 }\n    ]\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders"]
						}
					}
				},
				{
					"name": "📋 Orders - Create (Takeaway)",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"type\": \"takeaway\",\n    \"customer_name\": \"Ahmed\",\n    \"customer_phone\": \"0100000000\",\n    \"payment_method\": \"cash\",\n    \"items\": [\n        { \"id\": 1, \"quantity\": 1 }\n    ]\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders"]
						}
					}
				},
				{
					"name": "📋 Orders - Get Details",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders/1",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders", "1"]
						}
					}
				},
				{
					"name": "📋 Orders - Mark as Paid",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"payment_method\": \"cash\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders/1/pay",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders", "1", "pay"]
						}
					}
				},
				{
					"name": "📋 Orders - Cancel",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders/1/cancel",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders", "1", "cancel"]
						}
					}
				},
				{
					"name": "🪑 Reservations - List",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/reservations",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "reservations"]
						}
					}
				},
				{
					"name": "🪑 Reservations - Confirm",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/reservations/1/confirm",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "reservations", "1", "confirm"]
						}
					}
				}
			]
		},
		{
			"name": "👨‍🍳 Kitchen Display (KDS)",
			"description": "Requires role: kitchen or admin",
			"item": [
				{
					"name": "Get All Pending Orders",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/kitchen/pending",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "kitchen", "pending"]
						}
					}
				},
				{
					"name": "Mark Item as Preparing",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"status\": \"preparing\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/kitchen/items/1/status",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "kitchen", "items", "1", "status"]
						}
					}
				},
				{
					"name": "Mark Item as Ready",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"status\": \"ready\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/kitchen/items/1/status",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "kitchen", "items", "1", "status"]
						}
					}
				}
			]
		},
		{
			"name": "🚚 Driver App",
			"description": "Requires role: driver",
			"item": [
				{
					"name": "My Active Delivery Orders",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/driver/orders",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "driver", "orders"]
						}
					}
				},
				{
					"name": "My Stats (Today)",
					"request": {
						"method": "GET",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"url": {
							"raw": "{{tenant_url}}/api/v1/driver/stats",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "driver", "stats"]
						}
					}
				},
				{
					"name": "Update - Mark as Shipped",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"status\": \"shipped\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/driver/orders/1/status",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "driver", "orders", "1", "status"]
						}
					}
				},
				{
					"name": "Update - Mark as Delivered",
					"request": {
						"method": "POST",
						"header": [
							{"key": "Accept", "value": "application/json"},
							{"key": "Authorization", "value": "Bearer {{token}}"}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"status\": \"delivered\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/driver/orders/1/status",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "driver", "orders", "1", "status"]
						}
					}
				}
			]
		},
		{
			"name": "📱 Customer & Guest (Public)",
			"description": "No authentication required",
			"item": [
				{
					"name": "Menu - Categories & Products",
					"request": {
						"method": "GET",
						"header": [{"key": "Accept", "value": "application/json"}],
						"url": {
							"raw": "{{tenant_url}}/api/v1/categories",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "categories"]
						}
					}
				},
				{
					"name": "Menu - All Products",
					"request": {
						"method": "GET",
						"header": [{"key": "Accept", "value": "application/json"}],
						"url": {
							"raw": "{{tenant_url}}/api/v1/products",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "products"]
						}
					}
				},
				{
					"name": "Active Promotions",
					"request": {
						"method": "GET",
						"header": [{"key": "Accept", "value": "application/json"}],
						"url": {
							"raw": "{{tenant_url}}/api/v1/promotions",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "promotions"]
						}
					}
				},
				{
					"name": "Tables Availability",
					"request": {
						"method": "GET",
						"header": [{"key": "Accept", "value": "application/json"}],
						"url": {
							"raw": "{{tenant_url}}/api/v1/tables",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "tables"]
						}
					}
				},
				{
					"name": "Book a Table (Reservation)",
					"request": {
						"method": "POST",
						"header": [{"key": "Accept", "value": "application/json"}],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"customer_name\": \"Ahmed Ali\",\n    \"customer_phone\": \"0100000000\",\n    \"table_id\": 1,\n    \"guests_count\": 4,\n    \"reservation_time\": \"2026-05-20 20:00:00\"\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/reservations/public",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "reservations", "public"]
						}
					}
				},
				{
					"name": "Place Online Delivery Order",
					"request": {
						"method": "POST",
						"header": [{"key": "Accept", "value": "application/json"}],
						"body": {
							"mode": "raw",
							"raw": "{\n    \"type\": \"delivery\",\n    \"customer_name\": \"Sara Mohamed\",\n    \"customer_phone\": \"0111111111\",\n    \"delivery_address\": \"123 Tahrir St, Cairo\",\n    \"payment_method\": \"cash\",\n    \"items\": [\n        { \"id\": 1, \"quantity\": 1 },\n        { \"id\": 2, \"quantity\": 2 }\n    ]\n}",
							"options": {"raw": {"language": "json"}}
						},
						"url": {
							"raw": "{{tenant_url}}/api/v1/orders/guest",
							"host": ["{{tenant_url}}"],
							"path": ["api", "v1", "orders", "guest"]
						}
					}
				}
			]
		}
	],
	"variable": [
		{"key": "central_url", "value": "http://localhost:8000", "description": "Central system URL"},
		{"key": "tenant_url", "value": "http://demo.localhost:8000", "description": "Restaurant subdomain URL - change per restaurant"},
		{"key": "token", "value": "", "description": "Auto-filled after Login"}
	]
}
