{"info":{"_postman_id":"f2623f83-ef48-472f-a531-38f9362cad55","name":"EverythingGadget API","description":"<html><head></head><body><img src=\"https://content.pstmn.io/826555cf-24ab-4f86-b9b5-abc96413ad52/ZXZlcnl0aGluZ2dhZGdldC5wbmc=\" width=\"647\" height=\"129\">\n\n<p>This is a repository for the API of Everything-Gadgets, an E-Commerce website, where you may purchase your preferred electronics products.</p>\n<h3 id=\"url\">{{URL}}</h3>\n<p><code>https://everything-gadget-production.up.railway.app/</code></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"24186009","collectionId":"f2623f83-ef48-472f-a531-38f9362cad55","publishedId":"2s93CHtuRV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"3a7d2f"},"publishDate":"2023-02-18T11:20:11.000Z"},"item":[{"name":"Products","item":[{"name":"Get All Products","id":"21f83a3e-da89-47bf-8852-07a26b1a03a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/products","description":"<p>This endpoint returns a list of all products in the database a page at a time. it supports filtering, searching, sorting , filed specific requests and pagination.</p>\n<h3 id=\"filtering\">Filtering</h3>\n<p>The filter key should be passed in the query with an appropirate value, valid keys: <strong>brand</strong>, <strong>averageRating</strong>, <strong>price</strong>, <strong>space</strong>, <strong>color</strong>, <strong>category</strong>, <strong>reviewsQuantity</strong>.<br />For complex filtering use a field name surffixed with a square bracket containg: <strong>gt</strong>, <strong>gte</strong>, <strong>lt</strong>, <strong>lte</strong>, for greater than, greater than or equal to, less than and less than or equal to.</p>\n<ul>\n<li><strong>price[lte]=80000</strong> to filter for products with price less than or equal to 80,000</li>\n</ul>\n<p><code>everything-gadget-production.up.railway.app/api/v1/products?price[lte]=80000</code></p>\n<ul>\n<li><strong>averageRating[gt]=3.5</strong> to filter for products with rating greater than 3.5</li>\n</ul>\n<p><code>everything-gadget-production.up.railway.app/api/v1/products?averageRating[gt]=3.5</code></p>\n<h3 id=\"search\">Search</h3>\n<p>Performs a full-text search for the text provided as value to the <strong>search</strong> keyword eg <strong>search=tripod</strong></p>\n<h3 id=\"sort\">Sort</h3>\n<p>Indicate the sorting key and direction for the results. Use the field name, prefixed with a minus sign ' - ' for descending and without the sign for descending order. Valid fields: <strong>price</strong>, <strong>averageRating</strong>. you can sort based on two fields by providing a comma seperated list like <strong>sort=price,averageRating</strong></p>\n<h3 id=\"fields\">Fields</h3>\n<p>Specify the fields that should be returned/removed from products. Use a comma separated list for multiple fields and a minus '-' sign to indicate fields that should be removed eg. <strong>fields=name,price,quantity,summary</strong></p>\n<h3 id=\"pagination\">Pagination</h3>\n<ul>\n<li><strong>page</strong>: The page of results needed.</li>\n<li><strong>limit</strong>: The maximum number of results to return, default value is 20.</li>\n</ul>\n","urlObject":{"path":["v1","products"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"space","value":"256gb"},{"disabled":true,"key":"sort","value":""},{"disabled":true,"key":"fields","value":"-productInfo,-specs"},{"disabled":true,"key":"search","value":"wireless"},{"disabled":true,"key":"catrgory","value":"headphone"}],"variable":[]}},"response":[{"id":"2694aa3b-5509-4d5f-835f-e55e6c62af75","name":"Get All Products","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{URL}}api/v1/products","host":["{{URL}}api"],"path":["v1","products"],"query":[{"key":"space","value":"256gb","disabled":true},{"key":"sort","value":null,"disabled":true},{"key":"search","value":null,"disabled":true},{"key":"fields","value":null,"disabled":true}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 1,\n    \"data\": {\n        \"products\": [\n            {\n                \"_id\": \"product ID\",\n                \"name\": \"Dell 14 Latitude 9420 Laptop\",\n                \"brand\": \"Dell\",\n                \"averageRating\": 3.7,\n                \"price\": 520000,\n                \"priceDiscount\": 34,\n                \"quantity\": 12,\n                \"summary\": \"3D speakerphone & Intelligent Audio.\",\n                \"category\": [\n                    \"laptop\",\n                    \"computer\"\n                ],\n                \"reviewsQuantity\": 3,\n                \"images\": [\n                    {\n                        \"public_id\": \"\",\n                        \"_id\": \"632cd216caeea1698a119c80\"\n                    }\n                ],\n                \"specs\": \"PERFORMANCE  '/n'CPU: 3 GHz Intel Core i7-1185G7 Quad-Core (11th Gen)'/n'Maximum Boost Speed: 4.8 GHz'/n'L3 Cache: 12 \",\n                \"productInfo\": \"Dell 14 Latitude 9420 Laptop - i7 Processor - 512GB SSD - 16GB RAM'/n'Designed to offer the best connectivity & collaboration experience, \",\n                \"boxContent\": \"Dell 14 Latitude 9420 Laptop'/n'65W USB Type-C Power Adapter'/n'Limited 3-Year Warranty\",\n                \"color\": [\n                    \"black\",\n                    \"blue\",\n                    \"rosegold\",\n                    \"oceangreen\"\n                ]\n            }\n        ]\n    }\n}"}],"_postman_id":"21f83a3e-da89-47bf-8852-07a26b1a03a1"},{"name":"Get Product","id":"3f04c46e-2d74-4afe-b049-8a554ae71b49","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/products/6403acd527adb30c35c54e33","description":"<p>Returns a single product.</p>\n","urlObject":{"path":["v1","products","6403acd527adb30c35c54e33"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"fe931709-a3bc-4a05-a460-4349058979e3","name":"Get Product","originalRequest":{"method":"GET","header":[],"url":"https://everything-gadget-production.up.railway.app/api/v1/products/632cd7decaeea1698a119c94"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"6445"},{"key":"etag","value":"W/\"192d-WNz0PAfEUYl27Dye2r/krwjfhIw\""},{"key":"date","value":"Fri, 24 Feb 2023 15:34:02 GMT"},{"key":"x-envoy-upstream-service-time","value":"295"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"product\": {\n            \"_id\": \"product ID\",\n            \"name\": \"Nikon Z 6II Mirrorless Camera Body\",\n            \"brand\": \"Nikon\",\n            \"averageRating\": 4.5,\n            \"price\": 152000,\n            \"priceDiscount\": 12,\n            \"quantity\": 7,\n            \"summary\": \"Outstanding low-light capabilities.\",\n            \"category\": [\n                \"camera\",\n                \"accessory\"\n            ],\n            \"reviewsQuantity\": 9,\n            \"images\": [\n                {\n                    \"public_id\": \"\",\n                    \"_id\": \"632cd7decaeea1698a119c95\"\n                }\n            ],\n            \"specs\": \"IMAGING  '/n'Lens Mount: Nikon Z'/n'Camera Format: Full-Frame (1x Crop Factor)'/n'Pixels: Actual: 25.28 Megapixel | Effective: 24.5 Megapixel'/n'Maximum Resolution: 6000 x 4000'/n'Aspec\",\n            \"productInfo\": \"ikon Z 6II Mirrorless Digital Camera (Body Only)'/n'Nikon EN-EL15c Rechargeable Lithium-Ion Battery'/n'Nikon MH-25A Battery Charger for EN-EL15 Li-Ion Battery\",\n            \"boxContent\": \"Nikon Z 6II Mirrorless Digital Camera (Body Only)'/n'Nikon EN-EL15c Rechargeable Lithium-Ion Battery'/n'Nikon MH-25A Battery Charger for EN-EL15 Li-Ion Battery'/n'Nikon EH-7P Charging AC Adapter'/n'Nikon UC-E24 USB Cable'/n'HDMI/USB Cable Clip'/n'Nikon BS-1 Hot Shoe Cover for Nikon SLR Cameras'/n'Nikon AN-DC19 Camera Strap'/n'Nikon BF-N1 Body Cap'/n'Nikon DK-29 Rubber Eyecu'/n'Limited 1-Year Warranty\",\n            \"color\": [\n                \"black\",\n                \"grey\"\n            ]\n        }\n    }\n}"}],"_postman_id":"3f04c46e-2d74-4afe-b049-8a554ae71b49"},{"name":"Featured Products","id":"5a216e13-c755-4df3-81f4-610b7ee1696b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/products/featured","description":"<p>Returns a list of products that are hot-deals, in order of highest average rating, only the name, rating, price, and summary is returned.</p>\n","urlObject":{"path":["v1","products","featured"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"d2abaabf-9bdb-41a2-a696-92b999cb8fcd","name":"Featured Products","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/products/featured"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"776"},{"key":"etag","value":"W/\"308-Qmt8010lklfRwmT0lf8CK6HQf8g\""},{"key":"date","value":"Sat, 25 Feb 2023 07:43:53 GMT"},{"key":"x-envoy-upstream-service-time","value":"309"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 4,\n    \"data\": {\n        \"products\": [\n            {\n                \"_id\": \"product ID\",\n                \"name\": \"Jbl Charge 5 Portable Waterproof Wireless Bluetooth Speaker\",\n                \"averageRating\": 5,\n                \"price\": 99505,\n                \"summary\": \"Wireless connect up to 2 smartphones or tablets .\"\n            },\n            {\n                \"_id\": \"product ID\",\n                \"name\": \"Samsung Galaxy A53, 6.5\",\n                \"averageRating\": 5,\n                \"price\": 230265,\n                \"summary\": \"Super AMOLED Screen, 6GB/128GB Memory, 64MP Quad Camera, 5000 mAh Battery, Android 12.\"\n            },\n            {\n                \"_id\": \"product ID\",\n                \"name\": \"Dell 14 Latitude 9420 Laptop\",\n                \"averageRating\": 3.7,\n                \"price\": 520000,\n                \"summary\": \"3D speakerphone & Intelligent Audio.\"\n            },\n            {\n                \"_id\": \"product ID\",\n                \"name\": \"STYLE 2.0 Bluetooth® speaker\",\n                \"averageRating\": 3.5,\n                \"price\": 75000,\n                \"summary\": \"Indoor/Outdoor Waterproof all-Purpose Speaker.\"\n            }\n        ]\n    }\n}"}],"_postman_id":"5a216e13-c755-4df3-81f4-610b7ee1696b"}],"id":"a2bf3104-b645-4ec4-872e-0af0f910e653","_postman_id":"a2bf3104-b645-4ec4-872e-0af0f910e653","description":""},{"name":"Users","item":[{"name":"Update User","id":"e3fecb93-e036-41ec-aaf3-0687652b2b37","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"url":"{{URL}}api/v1/users/6345fb1045ff9d914a634bd8","urlObject":{"path":["v1","users","6345fb1045ff9d914a634bd8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e3fecb93-e036-41ec-aaf3-0687652b2b37"},{"name":"Get Saved Products","id":"3fc4a525-9e2f-4c8f-8852-ca4e2296cf0e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/saved/products/","description":"<p>Returns a list of all products saves by the current logged in user</p>\n","urlObject":{"path":["v1","users","saved","products",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3fc4a525-9e2f-4c8f-8852-ca4e2296cf0e"},{"name":"Save A Product","id":"c506d40f-0ae1-4414-a5fb-b186161dfb6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"url":"{{URL}}api/v1/users/saved/products/6403acd527adb30c35c54e33","urlObject":{"path":["v1","users","saved","products","6403acd527adb30c35c54e33"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"d5717da7-d28f-40e2-a95a-028ee8f55e0c","name":"Save A Product","originalRequest":{"method":"PATCH","header":[],"url":"{{URL}}api/v1/users/saved/products/632cd7decaeea1698a119c94"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"166"},{"key":"etag","value":"W/\"a6-mN5EOn2SjsvJvkkOy7PmVy6h7Mw\""},{"key":"date","value":"Thu, 02 Mar 2023 20:01:51 GMT"},{"key":"x-envoy-upstream-service-time","value":"872"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"product succesfully added\",\n    \"data\": {\n        \"savedproducts\": [\n            \"632cd7decaeea1XXXXXXXXXX\",\n            \"632cd803caeea1XXXXXXXXXX\",\n            \"632cd7decaeeaXXXXXXXXXXX\"\n        ]\n    }\n}"}],"_postman_id":"c506d40f-0ae1-4414-a5fb-b186161dfb6c"},{"name":"Delete Saved Product","id":"e05465c7-578a-4305-adfb-65607964525d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/saved/products/6403acd527adb30c35c54e33","description":"<p>Delete a saved product by ID</p>\n","urlObject":{"path":["v1","users","saved","products","6403acd527adb30c35c54e33"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"3b3ee7ff-e0db-4826-8dbc-7b5279b9f278","name":"Delete Saved Product","originalRequest":{"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/saved/products/632cd7f4caeea1698a119c97"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"141"},{"key":"etag","value":"W/\"8d-4ZrWRb13gIjBZ4rY+8xyn8XJFHo\""},{"key":"date","value":"Thu, 02 Mar 2023 20:00:41 GMT"},{"key":"x-envoy-upstream-service-time","value":"878"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"product succesfully removed\",\n    \"data\": {\n        \"savedproducts\": [\n            \"632cd7decaeea1XXXXXXXXXX\",\n            \"632cd803caeea1XXXXXXXXXX\"\n        ]\n    }\n}"}],"_postman_id":"e05465c7-578a-4305-adfb-65607964525d"},{"name":"Get User Profile","id":"f67f1c09-24ae-4629-b83f-300753436339","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/profile","description":"<p>Returns user details to requesting user account</p>\n","urlObject":{"path":["v1","users","profile"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"badf6be6-68a2-434a-b493-104d0f20a056","name":"Get User Profile","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/users/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"395"},{"key":"etag","value":"W/\"18b-h/buuBm6lmW9rhPLvoWDTrORBYg\""},{"key":"date","value":"Thu, 02 Mar 2023 20:04:41 GMT"},{"key":"x-envoy-upstream-service-time","value":"584"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"User ID\",\n            \"name\": \"EteimZ Baba\",\n            \"email\": \"eteimz@gmail.com\",\n            \"phoneNumber\": 24568450964,\n            \"role\": \"user\",\n            \"savedProducts\": [\n                \"632cd7decaeea16XXXXXXXXX\",\n                \"632cd803caeea1XXXXXXXXXX\",\n                \"632cd7decaeea1XXXXXXXXXX\"\n            ],\n            \"address\": [],\n            \"postal_code\": \"\",\n            \"city\": \"\",\n            \"state\": \"\",\n            \"createdAt\": \"2023-03-02T19:14:10.300Z\",\n            \"updatedAt\": \"2023-03-02T20:01:51.467Z\",\n            \"__v\": 5\n        }\n    }\n}"}],"_postman_id":"f67f1c09-24ae-4629-b83f-300753436339"},{"name":"Update User Profile","id":"94bdd7dc-aa9c-406d-a141-81e5445d296e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"addresses\": [\"Mancity square5\"]\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/profile","description":"<p>This endpoint enables logged in users to update thier personal details with the exception of password, for password update use the update password endpoint.</p>\n","urlObject":{"path":["v1","users","profile"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"8be80417-3f40-4131-be53-060bd5e749a7","name":"Update User Profile","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"address\": [\"Eteimz New Location 11b, Okrika River state\"]\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"383"},{"key":"etag","value":"W/\"17f-q6SR/NlhGLyY0vN1m/zDJ3riKr8\""},{"key":"date","value":"Thu, 02 Mar 2023 20:40:26 GMT"},{"key":"x-envoy-upstream-service-time","value":"891"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"user\": {\n            \"postal_code\": \"\",\n            \"city\": \"\",\n            \"state\": \"\",\n            \"_id\": \"User Id\",\n            \"name\": \"Betty Holberton\",\n            \"email\": \"betty@gmail.com\",\n            \"phoneNumber\": 24568450964,\n            \"role\": \"admin\",\n            \"savedProducts\": [],\n            \"accountBalance\": 0,\n            \"createdAt\": \"2023-02-24T15:18:53.235Z\",\n            \"updatedAt\": \"2023-03-02T20:40:25.406Z\",\n            \"__v\": 0,\n            \"address\": [\n                \"Eteimz New Location 11b, Okrika River state\"\n            ]\n        }\n    }\n}"}],"_postman_id":"94bdd7dc-aa9c-406d-a141-81e5445d296e"},{"name":"Delete My Profile","id":"045db9b9-f339-45b6-811a-bdc5f602b022","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/profile","description":"<p>For Logged in users to delete their account if they so which</p>\n","urlObject":{"path":["v1","users","profile"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"045db9b9-f339-45b6-811a-bdc5f602b022"}],"id":"8afa3a36-5e14-4846-b7be-180337ddc71c","_postman_id":"8afa3a36-5e14-4846-b7be-180337ddc71c","description":""},{"name":"Order","item":[{"name":"Checkout","id":"2a230eff-d555-450d-a5e6-bf061cfb3542","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"user\": \"User ID\",\n  \"full_name\": \"Lamido Sanusi\",\n  \"address\": \"Apo Resettlement\",\n  \"city\": \"Abuja\",\n  \"phone\": \"27529487529\",\n  \"postal_code\": \"650211\",\n  \"total_paid\": \"450\",\n  \"items\": [\n    {\n      \"product\": \"product ID\",\n      \"quantity\": \"1\"\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/orders/checkout","description":"<p>For processing order for products and checkout</p>\n","urlObject":{"path":["v1","orders","checkout"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a230eff-d555-450d-a5e6-bf061cfb3542"}],"id":"147e846f-cfa9-4022-bc4b-26f5f40870be","description":"<h6 id=\"order-delivery-details-and-payment-processing\">Order, delivery details and payment processing</h6>\n","_postman_id":"147e846f-cfa9-4022-bc4b-26f5f40870be"},{"name":"Admin","item":[{"name":"Products Statistics","id":"3d2d689a-4f68-49bf-a8ad-60fe723bc9c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/products/product-stats","description":"<p>Returns products statistics orgainsed according to brand, for each brand of products the total number of products, min and max price etc are returned. Only admins can access this route.</p>\n","urlObject":{"path":["v1","products","product-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"7a07b5ba-aa8d-4ba6-8940-06b2adf7ccff","name":"Products Statistics","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/products/product-stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"978"},{"key":"etag","value":"W/\"3d2-5r2UpQ/8c54KxUWCpzH2sW0RMaU\""},{"key":"date","value":"Sat, 25 Feb 2023 07:46:46 GMT"},{"key":"x-envoy-upstream-service-time","value":"296"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 8,\n    \"data\": {\n        \"products\": [\n            {\n                \"_id\": \"JOBY\",\n                \"numProducts\": 1,\n                \"numReviews\": 12,\n                \"avgRating\": 3,\n                \"avgPrice\": 25000,\n                \"minPrice\": 25000,\n                \"maxPrice\": 25000\n            },\n            {\n                \"_id\": \"FUGOO\",\n                \"numProducts\": 1,\n                \"numReviews\": 12,\n                \"avgRating\": 3.5,\n                \"avgPrice\": 75000,\n                \"minPrice\": 75000,\n                \"maxPrice\": 75000\n            },\n            {\n                \"_id\": \"SONY\",\n                \"numProducts\": 1,\n                \"numReviews\": 15,\n                \"avgRating\": 4,\n                \"avgPrice\": 90000,\n                \"minPrice\": 90000,\n                \"maxPrice\": 90000\n            },\n            {\n                \"_id\": \"JBL\",\n                \"numProducts\": 1,\n                \"numReviews\": 23,\n                \"avgRating\": 5,\n                \"avgPrice\": 99505,\n                \"minPrice\": 99505,\n                \"maxPrice\": 99505\n            },\n            {\n                \"_id\": \"SARAMONIC\",\n                \"numProducts\": 1,\n                \"numReviews\": 12,\n                \"avgRating\": 3.5,\n                \"avgPrice\": 125000,\n                \"minPrice\": 125000,\n                \"maxPrice\": 125000\n            },\n            {\n                \"_id\": \"NIKON\",\n                \"numProducts\": 2,\n                \"numReviews\": 18,\n                \"avgRating\": 4.5,\n                \"avgPrice\": 152000,\n                \"minPrice\": 152000,\n                \"maxPrice\": 152000\n            },\n            {\n                \"_id\": \"SAMSUNG\",\n                \"numProducts\": 1,\n                \"numReviews\": 6,\n                \"avgRating\": 5,\n                \"avgPrice\": 230265,\n                \"minPrice\": 230265,\n                \"maxPrice\": 230265\n            },\n            {\n                \"_id\": \"DELL\",\n                \"numProducts\": 2,\n                \"numReviews\": 11,\n                \"avgRating\": 4.1,\n                \"avgPrice\": 431000,\n                \"minPrice\": 342000,\n                \"maxPrice\": 520000\n            }\n        ]\n    }\n}"}],"_postman_id":"3d2d689a-4f68-49bf-a8ad-60fe723bc9c6"},{"name":"Create Product","id":"383618e1-5248-4de6-834b-2c8088b70b07","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Macbook pro","type":"text"},{"key":"brand","value":"Apple","type":"text"},{"key":"averageRating","value":"","type":"text","disabled":true},{"key":"price","value":"6232","type":"text"},{"key":"images","type":"file","src":"/Users/bobsonprosper/Desktop/Screen Shot 2023-03-09 at 09.36.09.png","disabled":true},{"key":"images","type":"file","src":"/Users/bobsonprosper/Desktop/Screen Shot 2023-03-09 at 09.41.00.png","disabled":true},{"key":"quantity","value":"1","type":"text"}]},"url":"{{URL}}api/v1/products","description":"<p>Creates a new product, the newly created product is returned. The following fields are required</p>\n<p><strong>Images:</strong> When uploading images via html form always use <em>enctype</em> <em><strong>multipart/form-data</strong></em></p>\n<h3 id=\"required-fields\">Required Fields</h3>\n<ul>\n<li><strong>name</strong> : <em>String</em></li>\n<li><strong>price</strong> ; <em>Number</em></li>\n<li><strong>quantity</strong> : <em>Number</em></li>\n<li><strong>category :</strong> <em>Array of Strings</em></li>\n</ul>\n<h3 id=\"other-fields\">Other Fields</h3>\n<ul>\n<li><strong>brand</strong> : <em>String</em></li>\n<li><strong>averageRating</strong> ; <em>Number</em></li>\n<li><strong>priceDiscount</strong> : <em>Number</em></li>\n<li><strong>color :</strong> <em>String</em></li>\n<li><strong>space :</strong> <em>String eg 128gb</em></li>\n<li><strong>reviewsQuantity</strong> : <em>Number</em></li>\n<li><strong>images :</strong> <em>file mimetype image</em></li>\n<li><strong>specs :</strong> <em>String</em></li>\n<li><strong>productInfo</strong> : <em>String</em></li>\n<li><strong>boxContent</strong> : <em>String</em></li>\n</ul>\n","urlObject":{"path":["v1","products"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"964add44-9827-4530-b890-2801486823cb","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Test Product\",\n    \"brand\": \"Nikon\",\n    \"averageRating\": 4.5,\n    \"price\": 152000,\n    \"priceDiscount\": 0,\n    \"quantity\": 7,\n    \"summary\": \"Outstanding low-light capabilities.\",\n    \"color\": [\"Black\", \"Grey\"],\n    \"category\": [\"Camera\", \"Accessory\"],\n    \"space\": \"32gb\",\n    \"reviewsQuantity\": 9,\n    \"specs\": \"IMAGING  '/n'Lens Mount: Nikon Z'/n'Camera Format: Full-Frame (1x Crop Facto\",\n    \"productInfo\": \"Nikon Z 6II Mirrorless Camera Body'/n'This is what a hybrid still and\",\n    \"boxContent\": \"Nikon Z 6II Mirrorless Digital Camera (Body Only)'/n'Nikon EN-EL15c\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/products"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"674"},{"key":"etag","value":"W/\"2a2-9L7m/1wAYiaNo4U+u/lZh7Gk/kQ\""},{"key":"date","value":"Sat, 25 Feb 2023 07:37:37 GMT"},{"key":"x-envoy-upstream-service-time","value":"330"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"product\": {\n            \"name\": \"Test Product\",\n            \"brand\": \"Nikon\",\n            \"averageRating\": 4.5,\n            \"price\": 152000,\n            \"priceDiscount\": 0,\n            \"quantity\": 7,\n            \"summary\": \"Outstanding low-light capabilities.\",\n            \"color\": [\n                \"Black\",\n                \"Grey\"\n            ],\n            \"category\": [\n                \"Camera\",\n                \"Accessory\"\n            ],\n            \"space\": \"32gb\",\n            \"reviewsQuantity\": 9,\n            \"specs\": \"IMAGING  '/n'Lens Mount: Nikon Z'/n'Camera Format: Full-Frame (1x Crop Facto\",\n            \"productInfo\": \"Nikon Z 6II Mirrorless Camera Body'/n'This is what a hybrid still and\",\n            \"boxContent\": \"Nikon Z 6II Mirrorless Digital Camera (Body Only)'/n'Nikon EN-EL15c\",\n            \"_id\": \"product ID\",\n            \"images\": [],\n            \"createdAt\": \"2023-02-25T07:37:36.890Z\",\n            \"updatedAt\": \"2023-02-25T07:37:36.890Z\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"383618e1-5248-4de6-834b-2c8088b70b07"},{"name":"Delete Product","id":"d2d37cd5-8382-456d-b68b-e2ee2e851f21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{URL}}api/v1/products/64099beb27adb30c35c54e70","description":"<p>Deletes a particular product by ID, product is deleted from the database only admin can perform this operation.</p>\n","urlObject":{"path":["v1","products","64099beb27adb30c35c54e70"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2d37cd5-8382-456d-b68b-e2ee2e851f21"},{"name":"Get All Users","id":"c24c42e0-4868-4d38-aab0-d4bb766398f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/users","description":"<p>Returns a list of all active users on the platform, users who have deleted their accounts aka no-active users will not be returned. Only admin can get access to all user accounts, individual users only have access to their own accounts</p>\n","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"2c199135-a63a-448b-b353-80f515b2efea","name":"Get All Users","originalRequest":{"method":"GET","header":[],"url":"https://everything-gadget-production.up.railway.app/api/v1/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"1283"},{"key":"etag","value":"W/\"503-j/gpaALRVynC279atZTHmKv6AcU\""},{"key":"date","value":"Fri, 24 Feb 2023 15:29:03 GMT"},{"key":"x-envoy-upstream-service-time","value":"294"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 2,\n    \"data\": {\n        \"users\": [\n            {\n                \"_id\": \"63ebc88ed021ae059ac530a2\",\n                \"name\": \"brandon lewis\",\n                \"email\": \"brandon@gmail.com\",\n                \"phoneNumber\": 2345676873,\n                \"role\": \"user\",\n                \"savedProducts\": [],\n                \"accountBalance\": 0,\n                \"createdAt\": \"2023-02-14T17:44:46.898Z\",\n                \"updatedAt\": \"2023-02-14T17:44:46.898Z\",\n                \"__v\": 0\n            },\n            {\n                \"_id\": \"63f8d55dc2144d1d6c94e7fb\",\n                \"name\": \"Betty Holberton\",\n                \"email\": \"betty@gmail.com\",\n                \"phoneNumber\": 24568450964,\n                \"role\": \"user\",\n                \"savedProducts\": [],\n                \"accountBalance\": 0,\n                \"createdAt\": \"2023-02-24T15:18:53.235Z\",\n                \"updatedAt\": \"2023-02-24T15:18:53.235Z\",\n                \"__v\": 0\n            }\n        ]\n    }\n}"}],"_postman_id":"c24c42e0-4868-4d38-aab0-d4bb766398f2"},{"name":"Update Product","id":"0aa08a53-3eb8-4557-ad5d-4944233b40b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"space","value":"64gb","type":"text","disabled":true},{"key":"images","type":"file","value":null},{"key":"images","type":"file","value":null,"disabled":true},{"key":"images","type":"file","value":null,"disabled":true}]},"url":"{{URL}}api/v1/products/64099beb27adb30c35c54e70","description":"<p>Update product details with this endpoint eg, <strong>images</strong>, available <strong>quantity</strong>, <strong>color</strong> etc.</p>\n<p>check create product endpoint for a list of all product fields that can be updated.</p>\n","urlObject":{"path":["v1","products","64099beb27adb30c35c54e70"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"0aa08a53-3eb8-4557-ad5d-4944233b40b3"},{"name":"Admin Dashboard","id":"ad7dd7a3-e3c8-450f-b68c-9f223291267f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}admin","description":"<p>Visit this endpoint to get access to the Admin panel</p>\n<p>Sign in with your admin email and password to view dashboard and perform operations.</p>\n<img src=\"https://content.pstmn.io/adbf6981-b4cd-4d52-8992-39a98806240f/U2NyZWVuIFNob3QgMjAyMy0wMy0xMCBhdCAxMi4yMC40NS5wbmc=\" alt />","urlObject":{"host":["{{URL}}admin"],"query":[],"variable":[]}},"response":[],"_postman_id":"ad7dd7a3-e3c8-450f-b68c-9f223291267f"},{"name":"Delete User","id":"3e782ecc-dccc-40f6-b385-b66b64ea09db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/6345fb1045ff9d914a634bd8","urlObject":{"path":["v1","users","6345fb1045ff9d914a634bd8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e782ecc-dccc-40f6-b385-b66b64ea09db"},{"name":"Get User","id":"37c7ad4f-c4d0-4822-85c8-7a167b7950a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/users/6345fb1045ff9d914a634bd8","urlObject":{"path":["v1","users","6345fb1045ff9d914a634bd8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"37c7ad4f-c4d0-4822-85c8-7a167b7950a6"}],"id":"500def5f-e5f1-430a-a4a3-ead443a8c7de","_postman_id":"500def5f-e5f1-430a-a4a3-ead443a8c7de","description":""},{"name":"Blog","item":[{"name":"Get All Posts","id":"2b93fcbe-efd7-4a90-8beb-0edc32fb0b48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/blogs","description":"<p>List a page of all blog posts, latest posts are returned first. Anyone can access this route.</p>\n","urlObject":{"path":["v1","blogs"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"e4068428-9f16-41ba-a051-c033ea2796f3","name":"Get All Posts","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/blogs"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"2826"},{"key":"etag","value":"W/\"b0a-3kHm5W0xDlHBQKwdQ+Hvz033CJY\""},{"key":"date","value":"Thu, 02 Mar 2023 19:39:43 GMT"},{"key":"x-envoy-upstream-service-time","value":"292"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"blogs\": [\n            {\n                \"_id\": \"Post ID\",\n                \"title\": \"Which smart TV should you get in 2023?\",\n                \"content\": \"So you want to buy a new smart TV. But which smart TV should you get in 2023? Lucky for you, this year promises exciting new developments in TV tech. From massive OLED screens to affordable 4K options, there’s something\",\n                \"author\": \"User ID\",\n                \"createdAt\": \"2023-03-02T19:34:24.671Z\",\n                \"updatedAt\": \"2023-03-02T19:34:24.671Z\",\n                \"__v\": 0\n            },\n            {\n                \"_id\": \"Post ID\",\n                \"title\": \"Must-have iPhone 14 photography gadgets for 2023\",\n                \"content\": \"Your iPhone 14 series camera is pretty impressive. But these must-have iPhone 14 photography gadgets for 2023 take it further. From an anamorphic lens to a smart gimbal, these gizmos give your iPhone 14 photos a professional edge.\",\n                \"author\": \"User ID\",\n                \"createdAt\": \"2023-03-02T19:35:12.178Z\",\n                \"updatedAt\": \"2023-03-02T19:35:12.178Z\",\n                \"__v\": 0\n            },\n            {\n                \"_id\": \"post ID\",\n                \"title\": \"Best MacBook backpacks for daily commuters\",\n                \"content\": \"You rely on your MacBook Pro for work. So it makes sense to keep it protected when you commute. And that’s where the best MacBook backpacks for daily commuters come in. From stylish leather packs to rugged all-weather bags, one\",\n                \"author\": \"User ID\",\n                \"createdAt\": \"2023-03-02T19:35:51.062Z\",\n                \"updatedAt\": \"2023-03-02T19:35:51.062Z\",\n                \"__v\": 0\n            }\n        ]\n    }\n}"}],"_postman_id":"2b93fcbe-efd7-4a90-8beb-0edc32fb0b48"},{"name":"Create Post","id":"ddd345e2-1c4f-41d4-b382-db6f5720fff0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Must-have power stations for your everyday sbdvfsdfkjsdf\",\n    \"content\": \"Live in an area prone to blackouts? Maybe you love outdoor adventures. Then you know you won’t always be able to access the grid. Fortunately, we’re highlighting must-have power stations that can handle your everyday gadgets, so you don’t have. bala bulu \"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/blogs","description":"<p>Create a post on the blog, only admin can perform this action, send tiltle and content of the post on the request body.</p>\n","urlObject":{"path":["v1","blogs"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"c5ce3c1e-724c-434e-8d22-be154e5ecb59","name":"Create Post","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Apples Ultra slim Models\",\n    \"content\": \"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/blogs"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"849"},{"key":"etag","value":"W/\"351-T4zW6IskRrJBbW3NJ3IOaZ+cwSM\""},{"key":"date","value":"Thu, 02 Mar 2023 19:01:15 GMT"},{"key":"x-envoy-upstream-service-time","value":"602"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Successfully created blog\",\n    \"data\": {\n        \"blog\": {\n            \"title\": \"Apples Ultra slim Models\",\n            \"content\": \"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.\",\n            \"author\": {\n                \"address\": [],\n                \"postal_code\": \"\",\n                \"city\": \"\",\n                \"state\": \"\",\n                \"_id\": \"User ID\",\n                \"name\": \"Betty Holberton\",\n                \"email\": \"betty@gmail.com\",\n                \"phoneNumber\": 24568450964,\n                \"role\": \"admin\",\n                \"savedProducts\": [],\n                \"accountBalance\": 0,\n                \"createdAt\": \"2023-02-24T15:18:53.235Z\",\n                \"updatedAt\": \"2023-02-24T15:18:53.235Z\",\n                \"__v\": 0\n            },\n            \"_id\": \"Blog Post ID\",\n            \"createdAt\": \"2023-03-02T19:01:14.706Z\",\n            \"updatedAt\": \"2023-03-02T19:01:14.706Z\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"ddd345e2-1c4f-41d4-b382-db6f5720fff0"},{"name":"Get Blog Post","id":"302c21a2-d8cb-4b9e-a811-ce69a0b6b258","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/blogs/6400f27a2edf4b08d06fc60d","description":"<p>Show details of a blog posts, viewing posts on the blog is accessible to anyone. Send a reguest to this endpoint to get all posts.</p>\n","urlObject":{"path":["v1","blogs","6400f27a2edf4b08d06fc60d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"b9f42d16-ca49-4459-9d0e-c3236fa457c9","name":"Get Post","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/blogs/6400f27a2edf4b08d06fc60d"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"536"},{"key":"etag","value":"W/\"218-YE1iaDoVOCZwXv1Q2llwgIjy/u4\""},{"key":"date","value":"Thu, 02 Mar 2023 19:21:51 GMT"},{"key":"x-envoy-upstream-service-time","value":"296"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"blog\": {\n            \"_id\": \"Post ID\",\n            \"title\": \"Apples Ultra slim Models\",\n            \"content\": \"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.\",\n            \"author\": \"63f8d55dc2144d1d6c94e7fb\",\n            \"createdAt\": \"2023-03-02T19:01:14.706Z\",\n            \"updatedAt\": \"2023-03-02T19:01:14.706Z\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"302c21a2-d8cb-4b9e-a811-ce69a0b6b258"},{"name":"Update Blog Post","id":"607340a0-d418-407b-944c-ded2bdfafce1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n     \"title\": \"Must-have iPhone 14 photograph\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/blogs/6400fa702edf4b08d06fc624","description":"<p>To edit a particular post, send the field and new value, in the request body. Action can only be performed by an admin.</p>\n<p>Blog post title or content can be updated.</p>\n","urlObject":{"path":["v1","blogs","6400fa702edf4b08d06fc624"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"9266b073-f457-4191-8b18-09490aa37cc5","name":"Update Blog Post","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n     \"title\": \"Apples M2 Chip\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/blogs/6400f27a2edf4b08d06fc60d"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"526"},{"key":"etag","value":"W/\"20e-T2We+Y7M5KY7Gy2KWD8kHcwdqf4\""},{"key":"date","value":"Thu, 02 Mar 2023 19:29:25 GMT"},{"key":"x-envoy-upstream-service-time","value":"956"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"blog\": {\n            \"_id\": \"6400f27a2edf4b08d06fc60d\",\n            \"title\": \"Apples M2 Chip\",\n            \"content\": \"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.\",\n            \"author\": \"63f8d55dc2144d1d6c94e7fb\",\n            \"createdAt\": \"2023-03-02T19:01:14.706Z\",\n            \"updatedAt\": \"2023-03-02T19:29:24.975Z\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"607340a0-d418-407b-944c-ded2bdfafce1"},{"name":"Delete Blog Post","id":"fce4e51c-ad1e-47fb-8d10-e4fb37f368f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/blogs/6400f27a2edf4b08d06fc60d","description":"<p>Use this endpoint to delete a specific blog post by ID, only logged in admins can perform this action.</p>\n<p>Send a delete requst to this endpoint alonside the login token, opereation will be terminated if the account sending the request is not an admin.</p>\n","urlObject":{"path":["v1","blogs","6400f27a2edf4b08d06fc60d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"e3e08e1f-1f2e-423f-964a-8d8c214b6a23","name":"Delete Blog Post","originalRequest":{"method":"DELETE","header":[],"url":"{{URL}}api/v1/blogs/6400f27a2edf4b08d06fc60d"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"57"},{"key":"etag","value":"W/\"39-EnN9CiXp+V/GClUEQdGhadoLJMw\""},{"key":"date","value":"Thu, 02 Mar 2023 19:32:16 GMT"},{"key":"x-envoy-upstream-service-time","value":"879"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Succesfully deleted blog\"\n}"}],"_postman_id":"fce4e51c-ad1e-47fb-8d10-e4fb37f368f7"}],"id":"fd2e52d9-25d7-4e5a-8d5c-5ba8cbc4b4dc","description":"<h6 id=\"all-endpoints-relating-to-geting-and-manipulating-posts-on-the-blog\">All endpoints relating to geting and manipulating posts on the blog.</h6>\n","_postman_id":"fd2e52d9-25d7-4e5a-8d5c-5ba8cbc4b4dc"},{"name":"Authentication","item":[{"name":"Sign up","event":[{"listen":"test","script":{"id":"5521b3ca-ebe2-4951-9454-8a33d9543b41","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"cf95c7a9-7035-4fd9-bb5a-f76044f33284","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"kaddo Idu\",\n    \"email\": \"kaddo@mailsac.com\",\n    \"phoneNumber\": \"24568450964\",\n    \"password\": \"zuluMan@2\",\n    \"passwordConfirm\": \"zuluMan@2\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","description":"<p>New user account registeration is made possible via this endpoint.</p>\n<p>All of the four fields are required, after creating an account you are automatically sigened in, that is a token is returned along side user details</p>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"81dda2dd-9019-4b8c-a964-151cbae80af4","name":"Sign up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Betty Holberton\",\n    \"email\": \"betty@gmail.com\",\n    \"phoneNumber\": \"24568450964\",\n    \"password\": \"bettyHol117\"\n}","options":{"raw":{"language":"json"}}},"url":"https://everything-gadget-production.up.railway.app/api/v1/users/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"content-length","value":"482"},{"key":"etag","value":"W/\"1e2-cwTBOAFqOq9T4eF4O50U/3Jd1Go\""},{"key":"date","value":"Fri, 24 Feb 2023 15:18:54 GMT"},{"key":"x-envoy-upstream-service-time","value":"860"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"ptJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZjhkNTVkYzIxNDRkMWQ2Yzk0ZTdmYiIsImlhdCI6MTY3NzI1MTkzNCwiZXhwIjoxNjg1MDI3OTM0fQ.mVXgEZAklFANDqicohgvqz6qlr2ZvLWuIdCfD6GwYBZ\",\n    \"data\": {\n        \"user\": {\n            \"name\": \"Betty Holberton\",\n            \"email\": \"betty@gmail.com\",\n            \"phoneNumber\": 24568450964,\n            \"role\": \"user\",\n            \"active\": true,\n            \"savedProducts\": [],\n            \"accountBalance\": 0,\n            \"_id\": \"user ID\",\n            \"createdAt\": \"2023-02-24T15:18:53.235Z\",\n            \"updatedAt\": \"2023-02-24T15:18:53.235Z\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"cf95c7a9-7035-4fd9-bb5a-f76044f33284"},{"name":"Login","event":[{"listen":"test","script":{"id":"f9bcb0ec-5674-4ef7-9dee-d9ba74ef67b5","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"890a2bbe-c5e8-496f-b9fb-9950a2314a29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"betty@gmail.com\",\n    \"password\": \"bettyHol225\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","description":"<p>This endpoint lets users who already have an account to login to thier account.</p>\n<p>Certain actions such as checkout, updating user details, saving products etc can only be performed by logged in users. Use the forgot password endpoint to reset password if password is fogotten.</p>\n<p>On successful authentication the logged in user is returned alonside a login token, token is also automatically sent to browser cookie.</p>\n","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"892dc830-3af2-4fff-a4a4-41a957733959","name":"Login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"betty@gmail.com\",\n    \"password\": \"bettyHol225\"\n}","options":{"raw":{"language":"json"}}},"url":"https://everything-gadget-production.up.railway.app/api/v1/users/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"x-powered-by","value":"Express"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"468"},{"key":"etag","value":"W/\"1d4-ueodgjYZfy9VRjkg/FGwCgOPlrk\""},{"key":"date","value":"Fri, 24 Feb 2023 16:12:21 GMT"},{"key":"x-envoy-upstream-service-time","value":"717"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"pfJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZjhkNTVkYzIxNDRkMWQ2Yzk0ZTdmYiIsImlhdCI6MTY3NzI1NTE0MSwiZXhwIjoxNjg1MDMxMTQxfQ.vlWPpryoa5bhx7820IWKrLQSgs7KsBdQT287yEEAQ47\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"User ID\",\n            \"name\": \"Betty Holberton\",\n            \"email\": \"betty@gmail.com\",\n            \"phoneNumber\": 24568450964,\n            \"role\": \"user\",\n            \"savedProducts\": [],\n            \"accountBalance\": 0,\n            \"createdAt\": \"2023-02-24T15:18:53.235Z\",\n            \"updatedAt\": \"2023-02-24T15:18:53.235Z\",\n            \"__v\": 0\n        }\n    }\n}"}],"_postman_id":"890a2bbe-c5e8-496f-b9fb-9950a2314a29"},{"name":"Update User Password","event":[{"listen":"test","script":{"id":"c44ede4a-1ee4-4b52-b299-7abcd920ece4","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"e2e7bf03-d051-49f1-b7c3-388ad67b8bbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"currentpassword\": \"zuluMan@2\",\n    \"password\": \"newPass1234\",\n    \"passwordConfirm\": \"newPass1234\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/update/password","description":"<p>A user must be logged in to be able to update password</p>\n<p>Send a current password along with new password and password confirm, this operetion will not proceed if the current password is not corrrect.</p>\n","urlObject":{"path":["v1","users","update","password"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"b8feb1cf-f474-4eb6-9c63-6824cf42e46d","name":"Update User Password","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"currentpassword\": \"newPass123\",\n    \"password\": \"newPass1234\",\n    \"passwordConfirm\": \"newPass1234\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/update/password"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-embedder-policy","value":"require-corp"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"origin-agent-cluster","value":"?1"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"referrer-policy","value":"no-referrer"},{"key":"x-xss-protection","value":"0"},{"key":"x-ratelimit-limit","value":"100"},{"key":"x-ratelimit-remaining","value":"98"},{"key":"date","value":"Sat, 04 Mar 2023 11:48:48 GMT"},{"key":"x-ratelimit-reset","value":"1677931085"},{"key":"set-cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZWJjODhlZDAyMWFlMDU5YWM1MzBhMiIsImlhdCI6MTY3NzkzMDUzMCwiZXhwIjoxNjg1NzA2NTMwfQ.IIhRTp0WBfR5GYCjIYVdpa0rBptfAFIjvy6ZWrLMn1k; Path=/; Expires=Fri, 02 Jun 2023 11:48:50 GMT; HttpOnly; Secure"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"566"},{"key":"etag","value":"W/\"236-Xa1g+j5+15x0AFB6wFoC9zVRFL0\""},{"key":"x-envoy-upstream-service-time","value":"1739"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZWJjODhlZDAyMWFlMDU5YWM1MzBhMiIsImlhdCI6MTY3NzkzMDUzMCwiZXhwIjoxNjg1NzA2NTMwfQ.IIhRTp0WBfR5GYCjIYVdpa0rBptfAFIjvy6ZWrLMn1k\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"User ID\",\n            \"name\": \"brandon lewis\",\n            \"email\": \"brandon@gmail.com\",\n            \"phoneNumber\": 2345676873,\n            \"role\": \"user\",\n            \"savedProducts\": [],\n            \"accountBalance\": 0,\n            \"createdAt\": \"2023-02-14T17:44:46.898Z\",\n            \"updatedAt\": \"2023-03-04T11:48:49.900Z\",\n            \"__v\": 1,\n            \"addresses\": [],\n            \"city\": \"\",\n            \"postalCode\": \"\",\n            \"state\": \"\",\n            \"passwordChangedAt\": \"2023-03-04T11:48:49.324Z\"\n        }\n    }\n}"}],"_postman_id":"e2e7bf03-d051-49f1-b7c3-388ad67b8bbc"},{"name":"Forgot Password","id":"325a7019-651d-4c5a-ba0d-44592e8e77b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"kaddo@mailsac.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","description":"<p>Use this endpoint to get password reset token sent to a user via email. The email must belong to a registered account. The reset token will be used to reset user password.</p>\n","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"ec995358-da42-4695-98e8-a0ef56235a9e","name":"Forgot Password","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"brandon@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-embedder-policy","value":"require-corp"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"origin-agent-cluster","value":"?1"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"referrer-policy","value":"no-referrer"},{"key":"x-xss-protection","value":"0"},{"key":"x-ratelimit-limit","value":"100"},{"key":"x-ratelimit-remaining","value":"99"},{"key":"date","value":"Sat, 04 Mar 2023 11:01:37 GMT"},{"key":"x-ratelimit-reset","value":"1677931085"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"53"},{"key":"etag","value":"W/\"35-7vJh+jMVY1tC+XB9d74hwdymChI\""},{"key":"x-envoy-upstream-service-time","value":"1729"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Token sent to email!\"\n}"}],"_postman_id":"325a7019-651d-4c5a-ba0d-44592e8e77b0"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"3daf68e1-e361-41b7-ba57-ef35efe9b800","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"6b858b3b-f240-4d77-a6c6-e4a876be367a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"newPass123\",\n    \"passwordConfirm\": \"newPass123\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/2e4f9c43e59c1f078371a270b8cfc0223d6e047b622f4793f0e7c44d2e52ee80","description":"<p>This endpoint is for reseting user password after receiving reset link/token via email.</p>\n<p>send a patch request to the url provided in the email supplying the <strong>token</strong> as a parameter</p>\n<p>also send users new <strong>password</strong> and <strong>passwordConfirm</strong> in the body of the request</p>\n","urlObject":{"path":["v1","users","resetPassword","2e4f9c43e59c1f078371a270b8cfc0223d6e047b622f4793f0e7c44d2e52ee80"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"87c5c075-b616-44d4-bce3-18b418db3f48","name":"Reset Password","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"newPass123\",\n    \"passwordConfirm\": \"newPass123\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/07ae051d2e340fbdf099da25d7ed294a80706ab215dbf840c301204e5564c02c"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-embedder-policy","value":"require-corp"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"origin-agent-cluster","value":"?1"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"referrer-policy","value":"no-referrer"},{"key":"x-xss-protection","value":"0"},{"key":"x-ratelimit-limit","value":"100"},{"key":"x-ratelimit-remaining","value":"98"},{"key":"date","value":"Sat, 04 Mar 2023 11:03:07 GMT"},{"key":"x-ratelimit-reset","value":"1677931085"},{"key":"set-cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZWJjODhlZDAyMWFlMDU5YWM1MzBhMiIsImlhdCI6MTY3NzkyNzc4OCwiZXhwIjoxNjg1NzAzNzg4fQ.74gnizgSflNB5lt3CMNEqJJntmNvPdE61VVpdtosmEM; Path=/; Expires=Fri, 02 Jun 2023 11:03:08 GMT; HttpOnly; Secure"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"566"},{"key":"etag","value":"W/\"236-d6KHBkHKKQ28ekFAXvoZMD+F83Q\""},{"key":"x-envoy-upstream-service-time","value":"1042"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzZWJjODhlZDAyMWFlMDU5YWM1MzBhMiIsImlhdCI6MTY3NzkyNzc4OCwiZXhwIjoxNjg1NzAzNzg4fQ.74gnizgSflNB5lt3CMNEqJJntmNvPdE61VVpdtosmEM\",\n    \"data\": {\n        \"user\": {\n            \"_id\": \"User ID\",\n            \"name\": \"brandon lewis\",\n            \"email\": \"brandon@gmail.com\",\n            \"phoneNumber\": 2345676873,\n            \"role\": \"user\",\n            \"savedProducts\": [],\n            \"accountBalance\": 0,\n            \"createdAt\": \"2023-02-14T17:44:46.898Z\",\n            \"updatedAt\": \"2023-03-04T11:03:07.865Z\",\n            \"__v\": 1,\n            \"addresses\": [],\n            \"city\": \"\",\n            \"postalCode\": \"\",\n            \"state\": \"\",\n            \"passwordChangedAt\": \"2023-03-04T11:03:07.309Z\"\n        }\n    }\n}"}],"_postman_id":"6b858b3b-f240-4d77-a6c6-e4a876be367a"}],"id":"fa538f46-0fc2-4a67-8f87-cf3edbfa52f2","description":"<h6 id=\"sensitive-user-activities-related-to-authentication-and-password\">Sensitive user activities related to authentication and password</h6>\n","_postman_id":"fa538f46-0fc2-4a67-8f87-cf3edbfa52f2"},{"name":"Reviews","item":[{"name":"Product/Reviews","item":[{"name":"Create new review on product","id":"8973a86f-53a1-41fa-80cd-a29ad07e2d3c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"did't work as specified\",\n    \"rating\": 2.5\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/products/6403acd527adb30c35c54e33/reviews","urlObject":{"path":["v1","products","6403acd527adb30c35c54e33","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"220687a6-bd4b-4851-a5b7-842e4f2610b5","name":"Create new review on product","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"did't work as specified\",\n    \"rating\": 2.5\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/products/6403acd527adb30c35c54e33/reviews"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Embedder-Policy","value":"require-corp"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"91"},{"key":"Date","value":"Tue, 14 Mar 2023 23:42:57 GMT"},{"key":"X-RateLimit-Reset","value":"1678840447"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"269"},{"key":"ETag","value":"W/\"10d-v8k3KElmgbgfm2a3KuhMKruXnGc\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"review\": \"did't work as specified\",\n            \"rating\": 2.5,\n            \"product\": \"6403acd527adb30c35c54e33\",\n            \"user\": \"640228ada05d6bf9a5dc1f1f\",\n            \"_id\": \"6411068238ce6d17a009351b\",\n            \"createdAt\": \"2023-03-14T23:42:58.253Z\",\n            \"__v\": 0,\n            \"id\": \"6411068238ce6d17a009351b\"\n        }\n    }\n}"}],"_postman_id":"8973a86f-53a1-41fa-80cd-a29ad07e2d3c"}],"id":"ff79312e-83b9-4543-8d88-083a3712b6b5","description":"<p>Create review on a product</p>\n","_postman_id":"ff79312e-83b9-4543-8d88-083a3712b6b5"},{"name":"Create Review","id":"ddc77639-a2db-473b-b4dd-166aaeeab463","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"Nice laptop but not good for gaming\",\n    \"rating\": 3.5,\n    \"product\": \"632cd216caeea1698a119c7f\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","description":"<p>for creating review with this endpoint the prouduct ID must be submitted in the request body, you can also use the nested reviews endpoint /products/{productId}/reviews and provide the id as a path parameter.</p>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"f27012c1-c0f2-4c58-90a9-e99e0282754d","name":"Create Review","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"Totally not worth it\",\n    \"rating\": 1,\n    \"product\": \"6403acd527adb30c35c54e33\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Embedder-Policy","value":"require-corp"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"93"},{"key":"Date","value":"Tue, 14 Mar 2023 23:41:20 GMT"},{"key":"X-RateLimit-Reset","value":"1678840447"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"264"},{"key":"ETag","value":"W/\"108-ygOuDqoUzw+elvLjxlDD91DAg7M\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"review\": \"Totally not worth it\",\n            \"rating\": 1,\n            \"product\": \"6403acd527adb30c35c54e33\",\n            \"user\": \"64023943a39ec0d617ea4ab1\",\n            \"_id\": \"6411062138ce6d17a0093513\",\n            \"createdAt\": \"2023-03-14T23:41:21.120Z\",\n            \"__v\": 0,\n            \"id\": \"6411062138ce6d17a0093513\"\n        }\n    }\n}"}],"_postman_id":"ddc77639-a2db-473b-b4dd-166aaeeab463"},{"name":"Get All Reviews","id":"13e33f96-1fb2-4ede-ba3d-75d460215de4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{URL}}api/v1/reviews","description":"<p>Lists a page of all the reviews</p>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"rating[gt]","value":"3"}],"variable":[]}},"response":[{"id":"3a7a7aff-fc46-48d0-b98d-8987eeb455b4","name":"Get All Reviews","originalRequest":{"method":"GET","header":[],"body":{"mode":"urlencoded","urlencoded":[]},"url":{"raw":"{{URL}}api/v1/reviews","host":["{{URL}}api"],"path":["v1","reviews"],"query":[{"key":"rating[gt]","value":"3","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Embedder-Policy","value":"require-corp"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"95"},{"key":"Date","value":"Wed, 15 Mar 2023 00:06:37 GMT"},{"key":"X-RateLimit-Reset","value":"1678841951"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"676"},{"key":"ETag","value":"W/\"2a4-saMgdmFNuT0MjCFt86S+YLIhzXY\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"results\": 3,\n    \"data\": {\n        \"data\": [\n            {\n                \"_id\": \"641104c838ce6d17a0093500\",\n                \"review\": \"Nice and fast delivery\",\n                \"rating\": 4.5,\n                \"product\": \"6403acd527adb30c35c54e33\",\n                \"user\": {\n                    \"_id\": \"63f8d55dc2144d1d6c94e7fb\",\n                    \"name\": \"Betty Holberton\"\n                },\n                \"id\": \"641104c838ce6d17a0093500\"\n            },\n            {\n                \"_id\": \"6410ac6f06b37e9b5b0b7904\",\n                \"review\": \"Amazing product\",\n                \"rating\": 5,\n                \"product\": \"64099beb27adb30c35c54e70\",\n                \"user\": {\n                    \"_id\": \"63f8d55dc2144d1d6c94e7fb\",\n                    \"name\": \"Betty Holberton\"\n                },\n                \"id\": \"6410ac6f06b37e9b5b0b7904\"\n            },\n            {\n                \"_id\": \"6410aacb06b37e9b5b0b78f4\",\n                \"review\": \"Amazing product\",\n                \"rating\": 5,\n                \"product\": \"64099beb27adb30c35c54e70\",\n                \"user\": {\n                    \"_id\": \"6346008d4e01d7773317ed20\",\n                    \"name\": \"mancy\"\n                },\n                \"id\": \"6410aacb06b37e9b5b0b78f4\"\n            }\n        ]\n    }\n}"}],"_postman_id":"13e33f96-1fb2-4ede-ba3d-75d460215de4"},{"name":"Get Review","id":"9e7cd59a-baba-45c9-b45f-2de97e6603c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/6411058d38ce6d17a0093509","urlObject":{"path":["v1","reviews","6411058d38ce6d17a0093509"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"448b21b4-95c6-4f93-9275-a9a50fc005c0","name":"Get Review","originalRequest":{"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/641104c838ce6d17a0093500"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Security-Policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"Cross-Origin-Embedder-Policy","value":"require-corp"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"Cross-Origin-Resource-Policy","value":"same-origin"},{"key":"X-DNS-Prefetch-Control","value":"off"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Strict-Transport-Security","value":"max-age=15552000; includeSubDomains"},{"key":"X-Download-Options","value":"noopen"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Origin-Agent-Cluster","value":"?1"},{"key":"X-Permitted-Cross-Domain-Policies","value":"none"},{"key":"Referrer-Policy","value":"no-referrer"},{"key":"X-XSS-Protection","value":"0"},{"key":"X-RateLimit-Limit","value":"100"},{"key":"X-RateLimit-Remaining","value":"97"},{"key":"Date","value":"Wed, 15 Mar 2023 00:03:09 GMT"},{"key":"X-RateLimit-Reset","value":"1678841951"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"254"},{"key":"ETag","value":"W/\"fe-SgtW+tlKriUp6f8HPhh/i6V548Y\""},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"data\": {\n            \"_id\": \"641104c838ce6d17a0093500\",\n            \"review\": \"Nice and fast delivery\",\n            \"rating\": 4.5,\n            \"product\": \"6403acd527adb30c35c54e33\",\n            \"user\": {\n                \"_id\": \"63f8d55dc2144d1d6c94e7fb\",\n                \"name\": \"Betty Holberton\"\n            },\n            \"id\": \"641104c838ce6d17a0093500\"\n        }\n    }\n}"}],"_postman_id":"9e7cd59a-baba-45c9-b45f-2de97e6603c4"},{"name":"Update Review","id":"6de22805-85a3-4345-a20f-7cc7a13d3f4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\": 4\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/6411062138ce6d17a0093513","description":"<p>Update a review by Id, reviews may only be edited by the user who created it</p>\n","urlObject":{"path":["v1","reviews","6411062138ce6d17a0093513"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[{"id":"441ab44f-ff7c-4512-a957-02ca98728af3","name":"Update Review","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\": 4\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/6411062138ce6d17a0093513"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"access-control-allow-origin","value":"*"},{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-embedder-policy","value":"require-corp"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"strict-transport-security","value":"max-age=15552000; includeSubDomains"},{"key":"x-download-options","value":"noopen"},{"key":"x-content-type-options","value":"nosniff"},{"key":"origin-agent-cluster","value":"?1"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"referrer-policy","value":"no-referrer"},{"key":"x-xss-protection","value":"0"},{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"content-length","value":"61"},{"key":"etag","value":"W/\"3d-dB8yZvTlFPm8MxdTjJqCqNgn2KU\""},{"key":"vary","value":"Accept-Encoding"},{"key":"date","value":"Wed, 22 Mar 2023 01:51:57 GMT"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Review updated successfully!\"\n}"}],"_postman_id":"6de22805-85a3-4345-a20f-7cc7a13d3f4c"},{"name":"Delete Review","id":"dc500df8-ad9b-4708-80df-6b2f2f3f6f8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/6411058d38ce6d17a0093509","description":"<p>Delete review by ID</p>\n","urlObject":{"path":["v1","reviews","6411058d38ce6d17a0093509"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"dc500df8-ad9b-4708-80df-6b2f2f3f6f8c"}],"id":"34dff885-1e5a-4230-b9f6-1062dc66d16c","description":"<p>This endpoint provides functionality for product reviews, it supports nested endpoints.</p>\n<p>Create or get reviews directoly view the /reviews endpoint or via the /products/{productId}/reviews endpoint.</p>\n<p>a review is made up of:</p>\n<p><strong>review</strong>: The review text</p>\n<p><strong>rating</strong>: 1 - 5</p>\n<p><strong>user</strong>: The ID of the user who creates the review</p>\n<p><strong>product</strong>: The ID of the product for whicch the review was created.</p>\n","_postman_id":"34dff885-1e5a-4230-b9f6-1062dc66d16c"}]}