{"info":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"20091662","collectionId":"0f235c74-6817-4f13-ace9-50e6a8f74109","publishedId":"2sAXxTapib","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-14T07:35:35.000Z"},"item":[{"name":"Dev-Token","item":[{"name":"get-token (System-admin)","event":[{"listen":"test","script":{"id":"e355f3ae-46c4-42bb-8320-4e6ed1d19ba5","exec":["var jsonData = pm.response.json()[\"access_token\"];\r","\r","pm.collectionVariables.set(\"accessToken_admin\", jsonData);"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"7339b6e1-1a78-4f51-9137-8c8fe4b4d53d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"fe66607d-dafc-4eb0-91c8-919fcdf4da2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"content-type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"type":"text","key":"grant_type","value":"password"},{"type":"text","key":"username","value":"test@dev.com"},{"type":"text","key":"password","value":"g6#*w=qt###Np3K"},{"type":"text","key":"audience","value":"https://user-api.example.com"},{"type":"text","key":"scope","value":"roles"},{"type":"text","key":"client_id","value":"k8JfdZwRlLxAfQBheKeWYSSMejQMpHd1"},{"type":"text","key":"client_secret","value":"LedW4Che_-hvichheLl4IBWymKGf9lAojfiAV-cxpv9cRA1aD0QC934ZEYhUCS7V"},{"key":"realm","value":"con_uS79nI0JSrmE99Op","type":"text","disabled":true},{"key":"username","value":"test2@dev.com","type":"text","disabled":true},{"key":"password","value":"Test@123","type":"text","disabled":true}]},"url":"https://snackaroo-dev.us.auth0.com/oauth/token","description":"<p>Get development auth token to test the enpoints for system admin user.</p>\n","urlObject":{"protocol":"https","path":["oauth","token"],"host":["snackaroo-dev","us","auth0","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"fe66607d-dafc-4eb0-91c8-919fcdf4da2f"},{"name":"get-token (Restaurant-admin)","event":[{"listen":"test","script":{"id":"e355f3ae-46c4-42bb-8320-4e6ed1d19ba5","exec":["var jsonData = pm.response.json()[\"access_token\"];\r","\r","pm.collectionVariables.set(\"accessToken_restaurant-admin\", jsonData);"],"type":"text/javascript","packages":{}}}],"id":"7f52e9b4-5cc2-4e42-9cb1-5a5d7790f76a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"content-type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"type":"text","key":"grant_type","value":"password"},{"type":"text","key":"username1","value":"test@dev.com","disabled":true},{"type":"text","key":"password1","value":"g6#*w=qt###Np3K","disabled":true},{"type":"text","key":"audience","value":"https://user-api.example.com"},{"type":"text","key":"scope","value":"roles"},{"type":"text","key":"client_id","value":"k8JfdZwRlLxAfQBheKeWYSSMejQMpHd1"},{"type":"text","key":"client_secret","value":"LedW4Che_-hvichheLl4IBWymKGf9lAojfiAV-cxpv9cRA1aD0QC934ZEYhUCS7V"},{"key":"realm","value":"con_uS79nI0JSrmE99Op","type":"text","disabled":true},{"key":"username","value":"test2@dev.com","type":"text"},{"key":"password","value":"Test@123","type":"text"}]},"url":"https://snackaroo-dev.us.auth0.com/oauth/token","description":"<p>Get development auth token to test the enpoints for restaurant admin user.</p>\n","urlObject":{"protocol":"https","path":["oauth","token"],"host":["snackaroo-dev","us","auth0","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7f52e9b4-5cc2-4e42-9cb1-5a5d7790f76a"},{"name":"get-token (User)","event":[{"listen":"test","script":{"id":"e355f3ae-46c4-42bb-8320-4e6ed1d19ba5","exec":["var jsonData = pm.response.json()[\"access_token\"];\r","\r","pm.collectionVariables.set(\"accessToken_user\", jsonData);"],"type":"text/javascript","packages":{}}}],"id":"344c80c0-675a-4e2f-ab8c-69d54daceb8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"content-type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"type":"text","key":"grant_type","value":"password"},{"type":"text","key":"username1","value":"test@dev.com","disabled":true},{"type":"text","key":"password1","value":"g6#*w=qt###Np3K","disabled":true},{"type":"text","key":"audience","value":"https://user-api.example.com"},{"type":"text","key":"scope","value":"roles"},{"type":"text","key":"client_id","value":"k8JfdZwRlLxAfQBheKeWYSSMejQMpHd1"},{"type":"text","key":"client_secret","value":"LedW4Che_-hvichheLl4IBWymKGf9lAojfiAV-cxpv9cRA1aD0QC934ZEYhUCS7V"},{"key":"realm","value":"con_uS79nI0JSrmE99Op","type":"text","disabled":true},{"key":"username","value":"test3@dev.com","type":"text"},{"key":"password","value":"Test@123","type":"text"}]},"url":"https://snackaroo-dev.us.auth0.com/oauth/token","description":"<p>Get development auth token to test the enpoints for a regular user (customer).</p>\n","urlObject":{"protocol":"https","path":["oauth","token"],"host":["snackaroo-dev","us","auth0","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"344c80c0-675a-4e2f-ab8c-69d54daceb8d"}],"id":"f490f86a-8665-4d6e-9b14-b9f39b133ef5","description":"<p>Get development token for each user role in the dev database</p>\n","_postman_id":"f490f86a-8665-4d6e-9b14-b9f39b133ef5","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}}},{"name":"User-info","item":[{"name":"user info","id":"f62e24aa-55ee-463e-a153-ee840ee4066b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/user-info/me","description":"<h2 id=\"retrieve-user-information\">Retrieve User Information</h2>\n<p>This endpoint allows you to retrieve the information of the currently authenticated user.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This request does not require a request body.</p>\n<h3 id=\"response\">Response</h3>\n<p>Upon a successful request, the response will include the user's information such as name, email, and profile details.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}},"urlObject":{"protocol":"http","port":"8080","path":["api","user-info","me"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f62e24aa-55ee-463e-a153-ee840ee4066b"},{"name":"register (user)","id":"f7aa1126-68cd-46c3-8831-384afb57cca7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"first_name\": \"Test\",\r\n    \"last_name\": \"User\", \r\n    \"contact_number\": \"+94123456789\",\r\n    \"profile_picture_url\": \"https://avatar.iran.liara.run/public/37\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/user-info/create","description":"<p>This endpoint allows you to register a new user in the system. The user should be alredy authenticated with Auth0. It should include the following parameters:</p>\n<ul>\n<li><p><code>first_name</code>: (string) The first name of the user.</p>\n</li>\n<li><p><code>last_name</code>: (string) The last name of the user.</p>\n</li>\n<li><p><code>contact_number</code>: (string) The contact number of the user.</p>\n</li>\n<li><p><code>profile_picture_url</code>: (string) The URL of the user's profile picture.</p>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}},"urlObject":{"protocol":"http","port":"8080","path":["api","user-info","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f7aa1126-68cd-46c3-8831-384afb57cca7"}],"id":"05b8eba1-db51-4b07-b018-a4935a91fae1","description":"<p>Register a new user in the system and to get the current authenticated user's information</p>\n","_postman_id":"05b8eba1-db51-4b07-b018-a4935a91fae1","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}}},{"name":"User","item":[{"name":"order (create)","id":"54122f0b-1bde-46f5-b910-f5de4db1f916","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"restaurant_id\": 20176,\r\n    \"delivery_location\": \"My location\",\r\n    \"delivery_address_line1\": \"My adress, line 1\",\r\n    \"delivery_address_line2\": \"My adress, line 2\",\r\n    \"order_items\": \r\n    [\r\n        {\r\n        \"dish_id\": 404778,\r\n        \"quantity\": 8\r\n        }\r\n    ]\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/user/order","description":"<p>Allows a registered user (customer) to create an order for a restaurant with requested dish items and quantity.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}},"urlObject":{"protocol":"http","port":"8080","path":["api","user","order"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"54122f0b-1bde-46f5-b910-f5de4db1f916"},{"name":"review (create)","id":"9611a8a4-f9c8-4b39-8580-a93b5dff67ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"restaurant_id\": 20176,\r\n    \"rating\": 5,\r\n    \"description\": \"This is a sample review\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/user/add-review","description":"<p>Lets a user (customer) add a review to a restaurant. He should have past order with the restaurant to add a review.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}},"urlObject":{"protocol":"http","port":"8080","path":["api","user","add-review"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9611a8a4-f9c8-4b39-8580-a93b5dff67ec"},{"name":"orders","id":"29e69442-cfb2-46f8-b47e-b6eebc4ba756","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/user/orders?page=1&limit=10","description":"<p>Allows users to get all their past orders, can be filterd using the order status and paginate with query params, response is orderd according to the order time descending.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}},"urlObject":{"protocol":"http","port":"8080","path":["api","user","orders"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"},{"disabled":true,"key":"status","value":"PROCESSING"}],"variable":[]}},"response":[],"_postman_id":"29e69442-cfb2-46f8-b47e-b6eebc4ba756"},{"name":"order","id":"784102aa-594d-4f3b-acb8-400d8e17df85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/user/orders/540400","description":"<p>Request order details using order id, user can only request his own orders.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}},"urlObject":{"protocol":"http","port":"8080","path":["api","user","orders","540400"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"784102aa-594d-4f3b-acb8-400d8e17df85"}],"id":"15100f8b-135b-4c55-bd61-d31893746bc1","description":"<p>User related endpoints (need user permissions)</p>\n","_postman_id":"15100f8b-135b-4c55-bd61-d31893746bc1","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"0f235c74-6817-4f13-ace9-50e6a8f74109","id":"0f235c74-6817-4f13-ace9-50e6a8f74109","name":"Snackaroo","type":"collection"}}},{"name":"Admin","item":[{"name":"restaurant (create)","id":"89771912-5f54-4c8f-a256-9708e7f58b64","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"restaurant_admin\": 10205,\r\n    \"name\": \"Test restaurant\" ,\r\n    \"thumbnail_image_url\": \"https://loremflickr.com/320/320/food,restaurant?lock=3894915635388910\" ,\r\n    \"tag_line\": \"tagline\",\r\n    \"location\": \"location\",\r\n    \"address\": \"Sample address\",\r\n    \"contact_number\": \"1234567890\",\r\n    \"hygiene_rating\": 5,\r\n    \"notes\": \"This is a sample note\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/admin/restaurant","description":"<p>Create a new restaurant in the system, the restaurant admin should already be registrerd user in Auth0. And the system admin should allocate him necessary \"restaurant-admin\" role in Auth0 dashborad.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"01d53306-55ff-46a0-92e0-d9a1b5462cb4","id":"01d53306-55ff-46a0-92e0-d9a1b5462cb4","name":"Admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","admin","restaurant"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"89771912-5f54-4c8f-a256-9708e7f58b64"}],"id":"01d53306-55ff-46a0-92e0-d9a1b5462cb4","description":"<p>System admin related endpoints (need admin permissions)</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"cc8561de-1428-40bf-a8e7-e5d10ac19c95","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"94badf75-bde6-468a-aae7-74dff51485e6","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"01d53306-55ff-46a0-92e0-d9a1b5462cb4"},{"name":"Restaurant-admin","item":[{"name":"dish-item (create)","id":"9f4c8715-8be7-4971-a3f8-a58b7d48940b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"dish_category_id\": 3000544,\r\n    \"thumbnail_image_url\": \"https://loremflickr.com/320/320/food?lock=5044929977609793\",\r\n    \"dish_name\": \"Sample dish name2\",\r\n    \"dish_description\": \"Sample description\",\r\n    \"calories\": 599,\r\n    \"base_price\": 55,\r\n    \"ingredients\": \"Sample ingredeants\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/dish-item","description":"<p>Allows restaurant admin user to add a dish item for his restaurant under a dish category.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","dish-item"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9f4c8715-8be7-4971-a3f8-a58b7d48940b"},{"name":"dish-category(create)","id":"520bed27-4993-4db3-811b-55a29810132c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"dish_category_name\": \"Sample dish Category\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/dish-category","description":"<p>Allows restaurant admin user to add a dish category</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","dish-category"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"520bed27-4993-4db3-811b-55a29810132c"},{"name":"order-status (update)","id":"124e2520-bec5-4272-b885-4dc48e9b184c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"order_id\": 521100,\r\n    \"order_status\": \"PROCESSING\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/order","description":"<p>Allows restaurant admin user to update order status.</p>\n<p>Possible order status:</p>\n<p>PENDING<br />PROCESSING<br />SHIPPED<br />DELIVERED<br />CANCELLED</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","order"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"124e2520-bec5-4272-b885-4dc48e9b184c"},{"name":"orders","id":"fa2251b1-6782-4bfe-8600-d89510d244ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/orders?page=1&limit=5&status=PROCESSING","description":"<p>Allows restaurant admin user to get all orders for their restaurant. Can be filterd using the order status.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","orders"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"5"},{"key":"status","value":"PROCESSING"}],"variable":[]}},"response":[],"_postman_id":"fa2251b1-6782-4bfe-8600-d89510d244ba"},{"name":"report (Avg order value)","id":"7db5309f-1785-4e89-8a34-559eee2d4ab7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/reports/average-order-value?from=2023-05-29 16:19:0&to=2024-06-16 22:41:19","description":"<p>Allows restaurant admin user to generate a report that shows the average order value for a given time period.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","reports","average-order-value"],"host":["localhost"],"query":[{"key":"from","value":"2023-05-29 16:19:0"},{"key":"to","value":"2024-06-16 22:41:19"}],"variable":[]}},"response":[],"_postman_id":"7db5309f-1785-4e89-8a34-559eee2d4ab7"},{"name":"report (total sales grouping)","id":"25d7c623-6927-44df-9bab-bcf88d1187b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/reports/sales?from=2023-05-29 16:19:05&to=2024-06-16 22:41:19&grouping=weekly","description":"<p>Allows restaurant admin user to generate a report that shows total sales for a given time period. Grouped using daily, weekly, and monthly.</p>\n<p>Valid values for the `grouping` parameter:</p>\n<p>daily<br />weekly<br />monthly</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","reports","sales"],"host":["localhost"],"query":[{"key":"from","value":"2023-05-29 16:19:05"},{"key":"to","value":"2024-06-16 22:41:19"},{"key":"grouping","value":"weekly"}],"variable":[]}},"response":[],"_postman_id":"25d7c623-6927-44df-9bab-bcf88d1187b8"},{"name":"report (top selling)","id":"dd347024-2226-4bb2-86e5-6f8ee1e45737","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/reports/top-selling-items?criteria=orders","description":"<p>Allows restaurant admin user to generate a report that shows the top 10 selling dish items. The user can request it to be according to number of orders or total revenue.</p>\n<p>Valid values for the `criteria` parameter:</p>\n<ul>\n<li><p>orders</p>\n</li>\n<li><p>revenue</p>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","reports","top-selling-items"],"host":["localhost"],"query":[{"key":"criteria","value":"orders"},{"disabled":true,"key":"criteria","value":"revenue"}],"variable":[]}},"response":[],"_postman_id":"dd347024-2226-4bb2-86e5-6f8ee1e45737"},{"name":"report (total sales)","id":"17147080-b0f7-429f-bc1d-69965fc3c934","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/reports/total-sales?from=2023-05-29 16:19:05&to=2024-06-16 22:41:19","description":"<p>Allows restaurant admin user to generate a report that shows total sales, and total delivered orders for a given time period</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","reports","total-sales"],"host":["localhost"],"query":[{"key":"from","value":"2023-05-29 16:19:05"},{"key":"to","value":"2024-06-16 22:41:19"}],"variable":[]}},"response":[],"_postman_id":"17147080-b0f7-429f-bc1d-69965fc3c934"},{"name":"report (orders)","id":"16e5fef6-8df6-496f-85a7-34af95a49bc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/restaurant-admin/reports/orders?from=2024-05-29 16:19:05&to=2024-06-16 22:41:19&status=DELIVERED","description":"<p>Allows restaurant admin user to query orders filtered according to a given time period and order status</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":true,"source":{"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b","id":"3d168188-9b6e-4074-8ce9-bbdece68851b","name":"Restaurant-admin","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","restaurant-admin","reports","orders"],"host":["localhost"],"query":[{"key":"from","value":"2024-05-29 16:19:05"},{"key":"to","value":"2024-06-16 22:41:19"},{"key":"status","value":"DELIVERED"}],"variable":[]}},"response":[],"_postman_id":"16e5fef6-8df6-496f-85a7-34af95a49bc1"}],"id":"3d168188-9b6e-4074-8ce9-bbdece68851b","description":"<p>Restaurant admin related endpoints (need restaurant-admin permissions)</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"ccc04ad7-5a3f-475a-ac29-b49745c255c4","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"a2bd3e4c-9459-421b-9cc4-fe8d1bcb6699","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"3d168188-9b6e-4074-8ce9-bbdece68851b"},{"name":"Public","item":[{"name":"restaurant","id":"52e51b8b-ede1-4e60-a3a5-cbb55b708f1e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8080/api/public/restaurants/20140","description":"<p>Public endpoint to get restaurant metadata using restaurant id.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants","20140"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"52e51b8b-ede1-4e60-a3a5-cbb55b708f1e"},{"name":"restaurants","id":"beaa5dcd-028e-4a4b-bad5-d64da173a34d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"http://localhost:8080/api/public/restaurants?page=1&limit=10","description":"<p>Public endpoint to get all restaurants. Request is paginated by default to llimit to 10.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"f8120779-a416-4193-8392-12752f68baf6","id":"f8120779-a416-4193-8392-12752f68baf6","name":"Public","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[],"_postman_id":"beaa5dcd-028e-4a4b-bad5-d64da173a34d"},{"name":"dish","id":"8f38d455-a5a4-478b-bed7-a24d1d16b414","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/public/restaurants/dishes/400002","description":"<p>Public endpoint to get a dish item details using dish id</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"f8120779-a416-4193-8392-12752f68baf6","id":"f8120779-a416-4193-8392-12752f68baf6","name":"Public","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants","dishes","400002"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f38d455-a5a4-478b-bed7-a24d1d16b414"},{"name":"dishes","id":"115a12ce-c7ad-4cb1-b161-e2b4bee1d563","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/public/restaurants/20140/dishes?page=1&limit=999","description":"<p>Public endpoint to get dishes of a restaurant using restaurant id as a path param.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"f8120779-a416-4193-8392-12752f68baf6","id":"f8120779-a416-4193-8392-12752f68baf6","name":"Public","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants","20140","dishes"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"999"}],"variable":[]}},"response":[],"_postman_id":"115a12ce-c7ad-4cb1-b161-e2b4bee1d563"},{"name":"reviews (restaurant)","id":"2a00e742-7239-4a4f-9e26-5fd7596e19b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/public/restaurants/20002/reviews?page=1&limit=999","description":"<p>Public endpoint to get reviews of a restaurant using restaurant id as a path param.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"f8120779-a416-4193-8392-12752f68baf6","id":"f8120779-a416-4193-8392-12752f68baf6","name":"Public","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants","20002","reviews"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"999"}],"variable":[]}},"response":[],"_postman_id":"2a00e742-7239-4a4f-9e26-5fd7596e19b1"},{"name":"reviews-metadata (restaurant)","id":"3b8e6eea-f98b-49e1-88f8-718ca85ee4f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/public/restaurants/20005/reviews-metadata","description":"<p>Public endpoint to get review metadatda of a restaurant using restaurant id as a path param. Metadata incluedes the avarage rating and review count.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"f8120779-a416-4193-8392-12752f68baf6","id":"f8120779-a416-4193-8392-12752f68baf6","name":"Public","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants","20005","reviews-metadata"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3b8e6eea-f98b-49e1-88f8-718ca85ee4f6"},{"name":"dish-categories (restaurant)","id":"b41db44d-d377-4bab-8dd5-4ed73e0f7e2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/public/restaurants/20002/dish-categories","description":"<p>Public endpoint to get dish categories of a restaurant using restaurant id as a path param.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"f8120779-a416-4193-8392-12752f68baf6","id":"f8120779-a416-4193-8392-12752f68baf6","name":"Public","type":"folder"}},"urlObject":{"protocol":"http","port":"8080","path":["api","public","restaurants","20002","dish-categories"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b41db44d-d377-4bab-8dd5-4ed73e0f7e2c"}],"id":"f8120779-a416-4193-8392-12752f68baf6","description":"<p>Public endpints of the system.</p>\n","auth":{"type":"noauth","isInherited":false},"event":[{"listen":"prerequest","script":{"id":"01b81f22-dee9-408c-9db4-644abbb828b0","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"29b1c7e1-d2cf-47a9-a5a6-1b87f2634289","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"f8120779-a416-4193-8392-12752f68baf6"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]}},"event":[{"listen":"prerequest","script":{"id":"6439a67b-e36b-4254-a211-ef0b0d53e260","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"fdb1f6c8-3cf4-4650-9e6c-1e144c074349","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"accessToken_admin","value":"","type":"string"},{"key":"accessToken_restaurant-admin","value":"","type":"string"},{"key":"accessToken_user","value":"","type":"string"}]}