{"info":{"_postman_id":"026203eb-3605-4b1b-9cb5-b94e8213eb92","name":"ProShop","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"19789580","collectionId":"026203eb-3605-4b1b-9cb5-b94e8213eb92","publishedId":"VUjSGPrW","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-08-14T13:19:10.000Z"},"item":[{"name":"Products","item":[{"name":"GET /api/products","id":"5aee89f9-db9d-4fd4-b788-865aae001e16","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/products","description":"<p>Get all the products available</p>\n","urlObject":{"path":["api","products"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5aee89f9-db9d-4fd4-b788-865aae001e16"},{"name":"GET /api/products/:id","id":"658e8b80-6225-4113-951a-26fa2351aa7c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/products/62d56f8cbd61a2bf1a60ce36","description":"<p>Get a single product by ID</p>\n","urlObject":{"path":["api","products","62d56f8cbd61a2bf1a60ce36"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"658e8b80-6225-4113-951a-26fa2351aa7c"},{"name":"Admin- Delete Product /api/products/:id","id":"760d0675-685d-4b85-a255-4af7a9c8b1b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/products/62f61cd16f912e53e7465c9f","urlObject":{"path":["api","products","62f61cd16f912e53e7465c9f"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"760d0675-685d-4b85-a255-4af7a9c8b1b6"},{"name":"Admin- Create product /api/products/","id":"e7bdc977-3282-4cbc-87f3-69a16bf5db30","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\": \"Sample name\",\r\n    \"image\": \"/images/sample.jpg\",\r\n    \"brand\": \"Sample brand\",\r\n    \"category\": \"Sample category\",\r\n    \"description\": \"Sample description\",\r\n    \"price\": 0,\r\n    \"countInStock\": 156\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/products","urlObject":{"path":["api","products"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e7bdc977-3282-4cbc-87f3-69a16bf5db30"},{"name":"Admin- Update product /api/products/:id","id":"fbfe4b76-d048-40a3-b52b-81e4e1ea3882","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Not Sample\",\r\n    \"price\": 1,\r\n    \"user\": \"62d56f8cbd61a2bf1a60ce32\",\r\n    \"image\": \"asdf\",\r\n    \"brand\": \"Some Bracn\",\r\n    \"category\": \"SAmple\",\r\n    \"countInStock\": 51,\r\n    \"numReviews\": 5,\r\n    \"description\": \"sampleee\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/products/62f6360ff335743504921089","urlObject":{"path":["api","products","62f6360ff335743504921089"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fbfe4b76-d048-40a3-b52b-81e4e1ea3882"},{"name":"Admin- Image upload","id":"df5f552c-86f7-44b6-ae01-a2b49b7bef23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","type":"file","src":"/C:/Users/piyus/Downloads/White Gold Elegant Minimalist ATS Data Analyst Resume CV A4 Printable.png"}]},"url":"{{URL}}/api/uploads","urlObject":{"path":["api","uploads"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"df5f552c-86f7-44b6-ae01-a2b49b7bef23"},{"name":"Search Products","id":"279cbcf3-ccee-4f41-ab55-67862f870e62","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/products?search=cannon","urlObject":{"path":["api","products"],"host":["{{URL}}"],"query":[{"key":"search","value":"cannon"}],"variable":[]}},"response":[],"_postman_id":"279cbcf3-ccee-4f41-ab55-67862f870e62"}],"id":"2282866b-e1d2-4824-bd8c-3fb920003ef0","_postman_id":"2282866b-e1d2-4824-bd8c-3fb920003ef0","description":""},{"name":"Users & Auth","item":[{"name":"api/users/login","event":[{"listen":"test","script":{"id":"d7207658-7d02-489d-8140-9ecef97a548e","exec":["pm.environment.set('TOKEN', pm.response.json().token)"],"type":"text/javascript"}}],"id":"e18771e9-3167-40b6-aab4-ebd55f4aab16","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@example.com\",\r\n    \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/login","description":"<p>Authenticate user and get token</p>\n","urlObject":{"path":["api","users","login"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e18771e9-3167-40b6-aab4-ebd55f4aab16"},{"name":"/api/users/profile","id":"2469a27b-3f34-4e31-a91e-fa0740a7c9be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/users/profile","description":"<p>Return logged in user</p>\n","urlObject":{"path":["api","users","profile"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"2469a27b-3f34-4e31-a91e-fa0740a7c9be"},{"name":"Register user- /api/users","event":[{"listen":"test","script":{"id":"0a3e61ae-ae54-4f65-b8f8-faa2c142f931","exec":["pm.environment.set('TOKEN', pm.response.json().token)"],"type":"text/javascript"}}],"id":"4cec451c-5614-40bf-a286-8eeddd04dc6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Namaste\",\r\n    \"email\":\"namaste@example.com\",\r\n    \"password\":\"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users","description":"<p>Create new user</p>\n","urlObject":{"path":["api","users"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4cec451c-5614-40bf-a286-8eeddd04dc6a"},{"name":"Update User /api/users/profile","event":[{"listen":"test","script":{"id":"a99845d0-3d4a-45d7-97c4-8ee06199b088","exec":["pm.environment.set('TOKEN', pm.response.json().token)"],"type":"text/javascript"}}],"id":"f6613677-38c3-4a67-81e0-18eaad76f626","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Johnny\",\r\n    \"password\":\"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/profile","description":"<p>Update user details</p>\n","urlObject":{"path":["api","users","profile"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f6613677-38c3-4a67-81e0-18eaad76f626"},{"name":"Admin- Get all users /api/users","id":"be362929-1089-4e30-8439-1da07e88433f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/users","urlObject":{"path":["api","users"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"be362929-1089-4e30-8439-1da07e88433f"},{"name":"Admin- Delete a user /api/users/:id","id":"4a7ad3b6-8d60-4bab-bba6-c7accb74ab53","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/users/62f2788747f778f87b2c3b06","urlObject":{"path":["api","users","62f2788747f778f87b2c3b06"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4a7ad3b6-8d60-4bab-bba6-c7accb74ab53"},{"name":"Admin- Get user by ID /api/users/:id","id":"b280f59c-2366-4f0f-881b-f2920f31823e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/users/62d56f8cbd61a2bf1a60ce3","urlObject":{"path":["api","users","62d56f8cbd61a2bf1a60ce3"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b280f59c-2366-4f0f-881b-f2920f31823e"},{"name":"Admin- Update user /api/users/:id","id":"d0952373-39dd-49d6-bb66-9e01f0ca33d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"New Name\",\r\n    \"email\": \"name@example.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/users/62f3a5a5164b6a906bf8d01e","urlObject":{"path":["api","users","62f3a5a5164b6a906bf8d01e"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0952373-39dd-49d6-bb66-9e01f0ca33d1"}],"id":"1eee9693-5982-4605-9b02-112df68aec63","description":"<p>Routes that have to do with managing users and their authentication</p>\n","_postman_id":"1eee9693-5982-4605-9b02-112df68aec63"},{"name":"Orders","item":[{"name":"Get order by id /api/orders/:id","id":"c7629909-ba5f-4bf8-a94e-d4148f5e97ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/orders/62f2438de12320e9bf8dd74b","urlObject":{"path":["api","orders","62f2438de12320e9bf8dd74b"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c7629909-ba5f-4bf8-a94e-d4148f5e97ee"},{"name":"Get all orders of this user /api/orders/myOrders","id":"34cf5b41-b6f3-47be-a5f3-8d596a7d57dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/orders/myOrders","urlObject":{"path":["api","orders","myOrders"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"34cf5b41-b6f3-47be-a5f3-8d596a7d57dd"},{"name":"Admin- Get all orders","id":"6c5dd116-1ce6-442a-8e0f-e332d8a6a960","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/orders","urlObject":{"path":["api","orders"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c5dd116-1ce6-442a-8e0f-e332d8a6a960"},{"name":"Admin- Update Order Delivery Status /api/orders/:id/deliver","id":"ceff308d-074b-4a3c-99f9-380373f5c66e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[],"url":"{{URL}}/api/orders/62F6019E0C9EC4FEEFD62306/deliver","urlObject":{"path":["api","orders","62F6019E0C9EC4FEEFD62306","deliver"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ceff308d-074b-4a3c-99f9-380373f5c66e"}],"id":"d7babd25-6f04-4598-840c-92837db2840a","_postman_id":"d7babd25-6f04-4598-840c-92837db2840a","description":""},{"name":"Reviews","item":[{"name":"Add a review /api/products/:id/reviews","id":"b2b037c0-2fe2-4306-983b-35724de1c426","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"rating\":\"5\",\r\n    \"comment\":\"Greatestest product ever.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/products/62f779b2e0504c2b916fed78/reviews","urlObject":{"path":["api","products","62f779b2e0504c2b916fed78","reviews"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b2b037c0-2fe2-4306-983b-35724de1c426"}],"id":"0df3c6fb-a0f6-4cdc-a31b-3f503f150d00","_postman_id":"0df3c6fb-a0f6-4cdc-a31b-3f503f150d00","description":""}]}