{"info":{"_postman_id":"21d984da-0df0-4fce-9c45-1a378a0d4450","name":"Restaurant API Documentation","description":"<html><head></head><body><p>API documentation for Assignment 5 in Backend Development, practice using middleware.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"52414209","collectionId":"21d984da-0df0-4fce-9c45-1a378a0d4450","publishedId":"2sBXcEm1AT","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-22T21:25:55.000Z"},"item":[{"name":"GET All Menu Items","id":"ae87dbab-9212-43b9-9388-765c0c071675","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu/8","urlObject":{"protocol":"http","port":"3000","path":["api","menu","8"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b59b43c0-da9c-448b-96a2-cab0809c329c","name":"Successful GET - All menu items","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/api/menu?","protocol":"http","host":["localhost"],"port":"3000","path":["api","menu"],"query":[{"key":null,"value":null,"description":"Retrieves all menu items","type":"text"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1383"},{"key":"ETag","value":"W/\"567-EwD6V1TAk3Ga/nVntbGJ4jTM7Y4\""},{"key":"Date","value":"Sun, 22 Feb 2026 20:44:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"name\": \"Classic Burger\",\n        \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\n        \"price\": 12.99,\n        \"category\": \"entree\",\n        \"ingredients\": [\n            \"beef\",\n            \"lettuce\",\n            \"tomato\",\n            \"cheese\",\n            \"bun\"\n        ],\n        \"available\": true\n    },\n    {\n        \"id\": 2,\n        \"name\": \"Chicken Caesar Salad\",\n        \"description\": \"Grilled chicken breast over romaine lettuce with parmesan and croutons\",\n        \"price\": 11.5,\n        \"category\": \"entree\",\n        \"ingredients\": [\n            \"chicken\",\n            \"romaine lettuce\",\n            \"parmesan cheese\",\n            \"croutons\",\n            \"caesar dressing\"\n        ],\n        \"available\": true\n    },\n    {\n        \"id\": 3,\n        \"name\": \"Mozzarella Sticks\",\n        \"description\": \"Crispy breaded mozzarella served with marinara sauce\",\n        \"price\": 8.99,\n        \"category\": \"appetizer\",\n        \"ingredients\": [\n            \"mozzarella cheese\",\n            \"breadcrumbs\",\n            \"marinara sauce\"\n        ],\n        \"available\": true\n    },\n    {\n        \"id\": 4,\n        \"name\": \"Chocolate Lava Cake\",\n        \"description\": \"Warm chocolate cake with molten center, served with vanilla ice cream\",\n        \"price\": 7.99,\n        \"category\": \"dessert\",\n        \"ingredients\": [\n            \"chocolate\",\n            \"flour\",\n            \"eggs\",\n            \"butter\",\n            \"vanilla ice cream\"\n        ],\n        \"available\": true\n    },\n    {\n        \"id\": 5,\n        \"name\": \"Fresh Lemonade\",\n        \"description\": \"House-made lemonade with fresh lemons and mint\",\n        \"price\": 3.99,\n        \"category\": \"beverage\",\n        \"ingredients\": [\n            \"lemons\",\n            \"sugar\",\n            \"water\",\n            \"mint\"\n        ],\n        \"available\": true\n    },\n    {\n        \"id\": 6,\n        \"name\": \"Fish and Chips\",\n        \"description\": \"Beer-battered cod with seasoned fries and coleslaw\",\n        \"price\": 14.99,\n        \"category\": \"entree\",\n        \"ingredients\": [\n            \"cod\",\n            \"beer batter\",\n            \"potatoes\",\n            \"coleslaw\",\n            \"tartar sauce\"\n        ],\n        \"available\": false\n    }\n]"},{"id":"ce9a34d2-3e6b-4d2c-b8c7-0e39ee299e24","name":"404 - Menu item not found","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu/8"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"31"},{"key":"ETag","value":"W/\"1f-VkPw/2BYMVEaaPnLLYFc7Gw75YM\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:04:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Menu item not found\"\n}"}],"_postman_id":"ae87dbab-9212-43b9-9388-765c0c071675"},{"name":"POST Chicken Tacos","id":"54efb486-a340-48fe-a309-152ac3c0fd80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": 13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu/1","urlObject":{"protocol":"http","port":"3000","path":["api","menu","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0183daaf-3daa-4e7c-a064-e1f5f5ed349e","name":"Successful POST - Added chicken tacos","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Chicken Tacos\",\r\n    \"description\":\"Corn tortillas filled with grilled chicken, lettuce, cheese, and sour cream.\",\r\n    \"price\":11.99,\r\n    \"category\":\"entree\",\r\n    \"ingredients\": [\"chicken\",\"corn tortilla\", \"lettuce\", \"cheese\",\"sour cream\"],\r\n    \"available\":true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu"},"status":"Created","code":201,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"249"},{"key":"ETag","value":"W/\"f9-HYHPTjPu59AvhKsrZljXfgJXf1w\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:02:14 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 7,\n    \"name\": \"Chicken Tacos\",\n    \"description\": \"Corn tortillas filled with grilled chicken, lettuce, cheese, and sour cream.\",\n    \"price\": 11.99,\n    \"category\": \"entree\",\n    \"ingredients\": [\n        \"chicken\",\n        \"corn tortilla\",\n        \"lettuce\",\n        \"cheese\",\n        \"sour cream\"\n    ],\n    \"available\": true\n}"},{"id":"5be8f214-b0e3-4d42-8856-9a7cc7e7984b","name":"400 - Price must be positive","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Chicken Tacos\",\r\n    \"description\":\"Corn tortillas filled with grilled chicken, lettuce, cheese, and sour cream.\",\r\n    \"price\":-2,\r\n    \"category\":\"entree\",\r\n    \"ingredients\": [\"chicken\",\"corn tortilla\", \"lettuce\", \"cheese\",\"sour cream\"],\r\n    \"available\":true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"77"},{"key":"ETag","value":"W/\"4d-pXdXQclXRZ9uWPIzFOMaFw1QxY0\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:16:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": \"Validation failed\",\n    \"messages\": [\n        \"Price must be a positive number\"\n    ]\n}"}],"_postman_id":"54efb486-a340-48fe-a309-152ac3c0fd80"},{"name":"PUT Chicken Tacos","id":"fb95ef31-f2a6-440f-b6d4-613f9792d68f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": -13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu/1","urlObject":{"protocol":"http","port":"3000","path":["api","menu","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0aa0e28a-a4b9-42e1-b027-dfa9db05c559","name":"Successful PUT - Change burger price","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": 13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu/1"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"221"},{"key":"ETag","value":"W/\"dd-HgqteulnodlQ1Q359gQPBKjr9pA\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:20:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"name\": \"Classic Burger\",\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\n    \"price\": 13.99,\n    \"category\": \"entree\",\n    \"ingredients\": [\n        \"beef\",\n        \"lettuce\",\n        \"tomato\",\n        \"cheese\",\n        \"bun\"\n    ],\n    \"available\": true\n}"},{"id":"51746e47-a0d2-4d76-ad5d-5954b8ed689b","name":"404 - Price must be positive","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": -13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/menu/1"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"77"},{"key":"ETag","value":"W/\"4d-pXdXQclXRZ9uWPIzFOMaFw1QxY0\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:21:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"errors\": \"Validation failed\",\n    \"messages\": [\n        \"Price must be a positive number\"\n    ]\n}"}],"_postman_id":"fb95ef31-f2a6-440f-b6d4-613f9792d68f"},{"name":"DELETE Burger","id":"a230b8f8-9da0-481a-a9db-e30f286216de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": 13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}"},"url":"http://localhost:3000/api/menu/10","urlObject":{"protocol":"http","port":"3000","path":["api","menu","10"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5cd50e4a-cb18-46f2-8c3b-e67c73e28f6a","name":"Successful DELETE Burger","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": 13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}"},"url":"http://localhost:3000/api/menu/1"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"277"},{"key":"ETag","value":"W/\"115-1+C3u1isQt97BQNmcNaUj537Tzg\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:22:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Menu item deleted successfully\",\n    \"menuItem\": {\n        \"id\": 1,\n        \"name\": \"Classic Burger\",\n        \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\n        \"price\": 13.99,\n        \"category\": \"entree\",\n        \"ingredients\": [\n            \"beef\",\n            \"lettuce\",\n            \"tomato\",\n            \"cheese\",\n            \"bun\"\n        ],\n        \"available\": true\n    }\n}"},{"id":"88e50923-919a-4c0a-8742-6e9f0ad996e7","name":"404 - Menu item not found","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"id\": 1,\r\n    \"name\": \"Classic Burger\",\r\n    \"description\": \"Beef patty with lettuce, tomato, and cheese on a sesame seed bun\",\r\n    \"price\": 13.99,\r\n    \"category\": \"entree\",\r\n    \"ingredients\": [\"beef\", \"lettuce\", \"tomato\", \"cheese\", \"bun\"],\r\n    \"available\": true\r\n}"},"url":"http://localhost:3000/api/menu/10"},"status":"Not Found","code":404,"_postman_previewlanguage":null,"header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"31"},{"key":"ETag","value":"W/\"1f-VkPw/2BYMVEaaPnLLYFc7Gw75YM\""},{"key":"Date","value":"Sun, 22 Feb 2026 21:23:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Menu item not found\"\n}"}],"_postman_id":"a230b8f8-9da0-481a-a9db-e30f286216de"}]}