{"info":{"_postman_id":"a6056225-80aa-4752-848e-1768136e3465","name":"kejog","description":"<html><head></head><body><p>API Documentation for Kejog.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"15544005","collectionId":"a6056225-80aa-4752-848e-1768136e3465","publishedId":"2s93sZ6ZAa","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-06-07T03:18:00.000Z"},"item":[{"name":"Auth","item":[{"name":"Reg","id":"7f549100-56fa-4415-9ab8-8b2e6d7204f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"richard\",\r\n    \"password\": \"richard\",\r\n    \"phoneNumber\": \"081366559149\", \r\n    \"role\": \"USER\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/auth/register","description":"<p>Register a new user.</p>\n","urlObject":{"port":"8000","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7f549100-56fa-4415-9ab8-8b2e6d7204f2"},{"name":"Log","id":"91cc1581-c642-4f34-834c-20ebd5aac99a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"phoneNumber\": \"081366559149\",\r\n    \"password\": \"richard\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/auth/login","description":"<p>Logging in as a certain user.</p>\n","urlObject":{"port":"8000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"91cc1581-c642-4f34-834c-20ebd5aac99a"}],"id":"9abaf088-cd06-4279-a32f-098fd1904a57","description":"<p>Auth modules, doesn't require JWT token.</p>\n","_postman_id":"9abaf088-cd06-4279-a32f-098fd1904a57"},{"name":"User","item":[{"name":"Get One","id":"58264384-0947-4469-9134-c5f844bc4675","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/api/users/647dd2811479646a9b1c22ef","description":"<p>Get profile details, only works if the JWT role is Admin or the current ID matches with the JWT profile.</p>\n","urlObject":{"port":"8000","path":["api","users","647dd2811479646a9b1c22ef"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"58264384-0947-4469-9134-c5f844bc4675"},{"name":"Update","id":"8aa2144b-d645-44b9-97b0-1ef876670f70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"currentPassword\": \"test123\",\r\n    \"name\": \"richard\",\r\n    \"phoneNumber\": \"000000000\",\r\n    \"password\": \"richard\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/users/647fea0b5d5b8cabf03a6b64","description":"<p>Update user profile with same access permission as above. User role cannot be updated.</p>\n","urlObject":{"port":"8000","path":["api","users","647fea0b5d5b8cabf03a6b64"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8aa2144b-d645-44b9-97b0-1ef876670f70"},{"name":"Delete","id":"4f70e987-668d-44d6-8139-d8162dda5e1e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:8000/api/users/647e19d5fe79d1a2dd31a970","description":"<p>Delete a user with same access permission as above.</p>\n","urlObject":{"port":"8000","path":["api","users","647e19d5fe79d1a2dd31a970"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4f70e987-668d-44d6-8139-d8162dda5e1e"}],"id":"c31ff8c2-1d7b-4885-874c-76dc32fde5a6","description":"<p>User module, responsible in user management.</p>\n","_postman_id":"c31ff8c2-1d7b-4885-874c-76dc32fde5a6"},{"name":"Restaurant","item":[{"name":"Add Restaurant","id":"1947e452-ee9b-4cca-a722-11f065bd4211","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"richard's restaurant 2\",\r\n    \"address\": \"restaurant streets\",\r\n    \"phoneNumber\": \"081366559147\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/restaurants","description":"<p>Adding a new restaurant.</p>\n","urlObject":{"port":"8000","path":["api","restaurants"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1947e452-ee9b-4cca-a722-11f065bd4211"},{"name":"Get Restaurants","id":"81ffd646-16c0-4ed6-a4d4-ce0cd091daa5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/api/restaurants","description":"<p>Get active restaurants.</p>\n","urlObject":{"port":"8000","path":["api","restaurants"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"81ffd646-16c0-4ed6-a4d4-ce0cd091daa5"},{"name":"Get Restaurant Details","id":"05853e15-a539-4435-83a7-eeac4afef047","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/api/restaurants/647ee3f9bdc0dfa462f51ed0","description":"<p>Get restaurant details.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","647ee3f9bdc0dfa462f51ed0"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"05853e15-a539-4435-83a7-eeac4afef047"},{"name":"Update Restaurant","id":"736668b5-f32f-4fd5-8879-00ea80b8a899","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"address\": \"streets restaurant\",\r\n    \"phoneNumber\": \"08136699414\",\r\n    \"isActive\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/restaurants/647ee80946447a5fcd01cbcb","description":"<p>Update restaurant profiles.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","647ee80946447a5fcd01cbcb"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"736668b5-f32f-4fd5-8879-00ea80b8a899"},{"name":"Delete Restaurant","id":"8fda08d6-659a-4254-b829-6edce429546d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:8000/api/restaurants/647ee80946447a5fcd01cbcb","description":"<p>Delete a restaurant.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","647ee80946447a5fcd01cbcb"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8fda08d6-659a-4254-b829-6edce429546d"}],"id":"9cf21359-927b-4fd0-aa18-0e45665ae5f0","description":"<p>Changes endpoints are only available to Merchant. Only several public APIs are available to users, for example, getting menu details or getting all restaurants.</p>\n","_postman_id":"9cf21359-927b-4fd0-aa18-0e45665ae5f0"},{"name":"Cuisine","item":[{"name":"Add Cuisine","id":"df497420-d54f-473f-9bbf-f9fbb8252d92","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"fried cabbage\",\r\n    \"price\": 2000\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/restaurants/647ee3f9bdc0dfa462f51ed0/cuisines","description":"<p>Add a new cuisine.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","647ee3f9bdc0dfa462f51ed0","cuisines"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"df497420-d54f-473f-9bbf-f9fbb8252d92"},{"name":"Get All Cuisines","id":"19fbf568-eefc-464a-b4a5-7a9439286b2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/api/restaurants/647ee3f9bdc0dfa462f51ed0/cuisines","description":"<p>Get all cuisines of a restaurant.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","647ee3f9bdc0dfa462f51ed0","cuisines"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"19fbf568-eefc-464a-b4a5-7a9439286b2c"},{"name":"Get Cuisine Details","id":"9fc865c8-07e3-4f99-95fb-6d20e99e01f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/api/restaurants/cuisines/647efedc7f3b8ba7bd0781c5","description":"<p>Get cuisine details.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","cuisines","647efedc7f3b8ba7bd0781c5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9fc865c8-07e3-4f99-95fb-6d20e99e01f9"},{"name":"Update Cuisine","id":"450f4778-a8d1-4fc7-a179-8891b6491959","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"duck fried\",\r\n    \"price\": 5000,\r\n    \"isActive\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/restaurants/cuisines/647ff1cac9ef3f445657ef47","description":"<p>Update cuisine details.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","cuisines","647ff1cac9ef3f445657ef47"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"450f4778-a8d1-4fc7-a179-8891b6491959"},{"name":"Delete Cuisine","id":"314c488f-e8b9-4413-ba46-1350b67fdd74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:8000/api/restaurants/cuisines/647efedc7f3b8ba7bd0781c5","description":"<p>Delete a cuisine.</p>\n","urlObject":{"port":"8000","path":["api","restaurants","cuisines","647efedc7f3b8ba7bd0781c5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"314c488f-e8b9-4413-ba46-1350b67fdd74"}],"id":"ddc1d564-c9ed-4391-b90c-a9d7441c2073","description":"<p>Cuisine modules, a component to Restaurant. Same access permission rules as Restaurant modules.</p>\n","_postman_id":"ddc1d564-c9ed-4391-b90c-a9d7441c2073"},{"name":"GoFood","item":[{"name":"Order","id":"062b71e2-3d75-48bf-a78e-aeddc22e7f9e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"restaurantID\": \"647ee3f9bdc0dfa462f51ed0\",\r\n    \"cuisinesID\": [\r\n        \"647f0cbfc6ed2225260854f3\",\r\n        \"647efeac7f3b8ba7bd0781c1\"\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/api/gofood/","description":"<p>Available to users. Create a new order with specified list of cuisines.</p>\n","urlObject":{"port":"8000","path":["api","gofood",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"062b71e2-3d75-48bf-a78e-aeddc22e7f9e"},{"name":"Finish Order","id":"a7576b6c-c06d-43f8-b9c1-41e73719b057","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"localhost:8000/api/gofood/647f488d1da2841ab1c004e8/finish","description":"<p>Available to users. Will update the status of the order to FINISHED.</p>\n","urlObject":{"port":"8000","path":["api","gofood","647f488d1da2841ab1c004e8","finish"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7576b6c-c06d-43f8-b9c1-41e73719b057"},{"name":"Cancel Order","id":"d8c404ba-dbc6-40ca-a919-8146e1f70b52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"localhost:8000/api/gofood/647f48901da2841ab1c004ed/cancel","description":"<p>Available to both merchants and users. Will update order status to CANCELLED.</p>\n","urlObject":{"port":"8000","path":["api","gofood","647f48901da2841ab1c004ed","cancel"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d8c404ba-dbc6-40ca-a919-8146e1f70b52"},{"name":"Get Order Details","id":"935e7725-2a70-4748-9292-51d8ffb0ea86","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/api/gofood/647f488d1da2841ab1c004e8","description":"<p>Available to both merchants and users. Retrieve the order details.</p>\n","urlObject":{"port":"8000","path":["api","gofood","647f488d1da2841ab1c004e8"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"935e7725-2a70-4748-9292-51d8ffb0ea86"}],"id":"ccdc179e-45e7-4e2a-92cc-c25330b84f88","description":"<p>Gofood modules, specific use for users in general and merchants for some.</p>\n","_postman_id":"ccdc179e-45e7-4e2a-92cc-c25330b84f88"}]}