{"info":{"_postman_id":"044e06bd-7121-477a-bedb-43e32d8e49a9","name":"shop API","description":"<html><head></head><body><h2 id=\"documentation\">Documentation</h2>\n<p>This collection contain documentation on how to make requests and what to expect on different endpoints in the system</p>\n<p>The system require one of three levels of permission depending on the endpoint and sensitivity of data</p>\n<p>Permission levels:</p>\n<ol>\n<li>Normal user</li>\n<li>Registered User</li>\n<li>Administrator</li>\n</ol>\n<p><strong>Note:</strong> So far there is no documentation for payment endpoints, am working on it, it requires external payment API integration</p>\n<p><strong>Source Code</strong>: <a href=\"https://github.com/eliya27/e-commerceAPI.git\">https://github.com/eliya27/e-commerceAPI.git</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"21318343","collectionId":"044e06bd-7121-477a-bedb-43e32d8e49a9","publishedId":"VUqmvevt","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-08-17T16:56:20.000Z"},"item":[{"name":"Authentication","item":[{"name":"Register User","id":"ec64b159-40ec-4a21-8bb8-a3e2639d622b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\":\"mary10 eliya\",\r\n  \"email\": \"mary10@gmail.com\",\r\n  \"password\": \"mypass\"\r\n  \r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/auth/register","description":"<p>Registration endpoint for users, user required to put username, email and password, by default user admin status is <code>False</code> unless upgraded by administrators.<br />Username, email and password all must be a string</p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","auth","register"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"ae4cff71-739f-4980-9e5b-451cb22fb8b9","name":"Register user example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\":\"mary08 eliya\",\r\n  \"email\": \"mary08@gmail.com\",\r\n  \"password\": \"mypass\"\r\n  \r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/auth/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"173"},{"key":"ETag","value":"W/\"ad-0rmEg8wJzjfnz7CbsCAjGQKxs4U\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:22:28 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"username\": \"mary08 eliya\",\n    \"email\": \"mary08@gmail.com\",\n    \"_id\": \"62fcdd83f1739d37f3273245\",\n    \"createdAt\": \"2022-08-17T12:22:27.909Z\",\n    \"updatedAt\": \"2022-08-17T12:22:27.909Z\",\n    \"__v\": 0\n}"}],"_postman_id":"ec64b159-40ec-4a21-8bb8-a3e2639d622b"},{"name":"Login","id":"0f7482d6-9716-4eac-9f63-c5407eca1508","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\":\"mary05 eliya\",\r\n  \"password\": \"mypass\"\r\n  \r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/auth/login","description":"<p>Endpoint for registered user to Login in the system, user must specify correct username and password</p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","auth","login"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"d6c15420-dd8f-45b5-af6e-27b1e566e8f9","name":"User login example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\":\"mary08 eliya\",\r\n  \"password\": \"mypass\"\r\n  \r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/auth/login"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Set-Cookie","value":"access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYyZmNkZDgzZjE3MzlkMzdmMzI3MzI0NSIsImlzQWRtaW4iOmZhbHNlLCJpYXQiOjE2NjA3MzkzODAsImV4cCI6MTY2MDk5ODU4MH0.Q_uhGU8JCXdyolxDlLzu7ND0xpGpzBrDEBkwZDAgpeg; Path=/; HttpOnly"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"173"},{"key":"ETag","value":"W/\"ad-EMlXvxERAsUNKIhwggwOOAfJfxY\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:29:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"62fcdd83f1739d37f3273245\",\n    \"username\": \"mary08 eliya\",\n    \"email\": \"mary08@gmail.com\",\n    \"createdAt\": \"2022-08-17T12:22:27.909Z\",\n    \"updatedAt\": \"2022-08-17T12:22:27.909Z\",\n    \"__v\": 0\n}"}],"_postman_id":"0f7482d6-9716-4eac-9f63-c5407eca1508"}],"id":"bfcda126-59b0-4004-9faf-d2edcbd9bcf2","description":"<p>This collection contain endpoints for users(both Admins and customers) to register and login to the system</p>\n","_postman_id":"bfcda126-59b0-4004-9faf-d2edcbd9bcf2"},{"name":"Users","item":[{"name":"Get all users","id":"2ae0fb2f-d6d7-4074-b1a1-df1698cd24c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/","description":"<p>A successfully request in this endpoint return list of all the users registered in the system</p>\n<blockquote>\n<p>Require Admin access permission</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","user",""],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"5af386ea-6b74-4d4a-892d-11d9c57e039e","name":"Get all users (example)","originalRequest":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"2752"},{"key":"ETag","value":"W/\"ac0-ALWMIMPjKntHygGd7vv7asye7Uk\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:39:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"62cfd7f66fd34046697fb0b3\",\n        \"username\": \"eliya gervas\",\n        \"email\": \"eliyagervas27@gmail.com\",\n        \"password\": \"U2FsdGVkX19I0sg0lUO1/+PEjoVFSQwKBlo4et0lsZY=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-07-14T08:46:46.153Z\",\n        \"updatedAt\": \"2022-07-14T08:46:46.153Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62cfdae012921257f03d83db\",\n        \"username\": \"tekla wilson\",\n        \"email\": \"wilson27@gmail.com\",\n        \"password\": \"U2FsdGVkX1+KQU4O8YjV+ysSlUw2sngipIH2Lfu0HyM=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-07-14T08:59:12.855Z\",\n        \"updatedAt\": \"2022-07-14T08:59:12.855Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62cfdd8b12921257f03d83dd\",\n        \"username\": \"lidya gervas\",\n        \"email\": \"lidyagervas27@gmail.com\",\n        \"password\": \"U2FsdGVkX199gBMgJeFoD4ke12VQU6+/1ktESOLr2D4=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-07-14T09:10:35.275Z\",\n        \"updatedAt\": \"2022-07-14T09:10:35.275Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fa46abf276a7f54303e211\",\n        \"username\": \"bite bay\",\n        \"email\": \"bitebay@gmail.com\",\n        \"password\": \"U2FsdGVkX1+oajDDDUZn0Mt4XNt7Dt6x5hNE0bxtfLI=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-15T13:14:19.057Z\",\n        \"updatedAt\": \"2022-08-15T13:14:19.057Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fa6cecfd9c1f037f710daf\",\n        \"username\": \"angel gervas\",\n        \"email\": \"angelgervas27@gmail.com\",\n        \"password\": \"U2FsdGVkX1/ZyeMcQDvi2ySTRNVcvx/hsi9MNUHl2tk=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-15T15:57:32.920Z\",\n        \"updatedAt\": \"2022-08-15T15:57:32.920Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fa7e25fd9c1f037f710db4\",\n        \"username\": \"loveness lyson\",\n        \"email\": \"loveness@gmail.com\",\n        \"password\": \"U2FsdGVkX18fPy2iNjKFeZ/VzZzLpQaIIXPQbFj6t3M=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-15T17:11:01.680Z\",\n        \"updatedAt\": \"2022-08-16T15:17:44.805Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fb5d5044bc75de6f3e7d4c\",\n        \"username\": \"mary01 eliya\",\n        \"email\": \"mary01@gmail.com\",\n        \"password\": \"U2FsdGVkX18NWaEz2zx7WqpWX0DKPXDDQguEOYYh8zw=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-16T09:03:12.026Z\",\n        \"updatedAt\": \"2022-08-16T09:03:12.026Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fb606fb6d156cc5e3e7971\",\n        \"username\": \"mary02 eliya\",\n        \"email\": \"mary02@gmail.com\",\n        \"password\": \"U2FsdGVkX1/f0kittTWloq0TMBvsBc941mZ4w3Nkrd8=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-16T09:16:31.475Z\",\n        \"updatedAt\": \"2022-08-16T09:16:31.475Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fb7f3225c4b97bf3d9d285\",\n        \"username\": \"mary05 eliya\",\n        \"email\": \"mary05@gmail.com\",\n        \"password\": \"U2FsdGVkX18mApKLz6zNhLbfUV6AADG+iEJsOxdxSwQ=\",\n        \"isAdmin\": true,\n        \"createdAt\": \"2022-08-16T11:27:46.407Z\",\n        \"updatedAt\": \"2022-08-16T11:27:46.407Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fb88e7e04a423feb5e9d17\",\n        \"username\": \"mary06 eliya\",\n        \"email\": \"mary06@gmail.com\",\n        \"password\": \"U2FsdGVkX181QuOeSPH/ICAdC3YEFpsoiKgax9Ktffs=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-16T12:09:11.238Z\",\n        \"updatedAt\": \"2022-08-16T12:09:11.238Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fcdd83f1739d37f3273245\",\n        \"username\": \"mary08 eliya\",\n        \"email\": \"mary08@gmail.com\",\n        \"password\": \"U2FsdGVkX18BrqHei5FCMXR1FMclCZ5D85TB1ZWLwzU=\",\n        \"isAdmin\": false,\n        \"createdAt\": \"2022-08-17T12:22:27.909Z\",\n        \"updatedAt\": \"2022-08-17T12:22:27.909Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"2ae0fb2f-d6d7-4074-b1a1-df1698cd24c5"},{"name":"Update user info","id":"0744a660-f4e6-4d93-a7e1-7c049664ceb1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"loveness lyson\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/update/62fa7e25fd9c1f037f710db4","description":"<p>Require provision of the <code>user id</code> to be able to update user info</p>\n<blockquote>\n<p>Require Admin or Any user with account</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","user","update","62fa7e25fd9c1f037f710db4"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"2bd09ac3-8ffa-4ef8-8d3e-15d686142a0b","name":"update user info (example)","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"loveness lyson\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/update/62fa7e25fd9c1f037f710db4"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"251"},{"key":"ETag","value":"W/\"fb-+CmP4B0cUSaLeeCSVK3h72NzbcQ\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:41:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"62fa7e25fd9c1f037f710db4\",\n    \"username\": \"loveness lyson\",\n    \"email\": \"loveness@gmail.com\",\n    \"password\": \"U2FsdGVkX18fPy2iNjKFeZ/VzZzLpQaIIXPQbFj6t3M=\",\n    \"isAdmin\": false,\n    \"createdAt\": \"2022-08-15T17:11:01.680Z\",\n    \"updatedAt\": \"2022-08-17T12:41:28.599Z\",\n    \"__v\": 0\n}"}],"_postman_id":"0744a660-f4e6-4d93-a7e1-7c049664ceb1"},{"name":"Delete user","id":"ace0bf95-0932-424f-b9a4-f2f7802338c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/delete/62fa7e25fd9c1f037f710db4","description":"<p>Require provision of the <code>user id</code> for user information to be deleted</p>\n<p><strong>Note</strong> this delete user completely from the system</p>\n<blockquote>\n<p>Require Admin or Any user with account</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","user","delete","62fa7e25fd9c1f037f710db4"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"dd3a70c4-bd8e-4212-a800-d4f69e0fd418","name":"Delete user (example)","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/delete/62fa7e25fd9c1f037f710db4"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"48"},{"key":"ETag","value":"W/\"30-YAsJzXsKepOLQ79nfIpjRYbWmgU\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:43:08 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"\"User with ID: 62fa7e25fd9c1f037f710db4 deleted\""}],"_postman_id":"ace0bf95-0932-424f-b9a4-f2f7802338c9"},{"name":"Get user statistics","id":"aec0e2e3-6fd2-4f7c-bbcf-9cdc1e320d88","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/stats","description":"<p>This endpoint generate number of new subscribers in the system per month in a year</p>\n<blockquote>\n<p>Require Admin access</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","user","stats"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"50d3fc04-c715-40ee-9522-7b4a6cc17086","name":"Get user statistics (example)","originalRequest":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/user/stats"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"41"},{"key":"ETag","value":"W/\"29-n0JFLN9MMGJJk3mg3YEpkrdhRPI\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:44:02 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": 7,\n        \"total\": 3\n    },\n    {\n        \"_id\": 8,\n        \"total\": 7\n    }\n]"}],"_postman_id":"aec0e2e3-6fd2-4f7c-bbcf-9cdc1e320d88"}],"id":"4d6922dc-cba3-412b-a107-8812818d218f","description":"<p>This collection contain endpoints to access system users(admins and customers) data</p>\n<p>Endpoints in this collection require <code>Admin access</code> permission</p>\n<p>Requests</p>\n<ul>\n<li>Get All users</li>\n<li>Update user Info</li>\n<li>Delete user</li>\n</ul>\n","_postman_id":"4d6922dc-cba3-412b-a107-8812818d218f"},{"name":"Products","item":[{"name":"Get specific product","id":"bcdaba71-c184-4130-b0c4-8c7c8b6cffa2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/find/62fb9163306c859306bfa595","urlObject":{"protocol":"https","path":["ecommerceAPI","api","product","find","62fb9163306c859306bfa595"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"1a2bb6f2-187a-4642-b5b8-9b86163eb170","name":"Get specific product (example)","originalRequest":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/find/62fb9163306c859306bfa595"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"279"},{"key":"ETag","value":"W/\"117-AO+yiLGLfeCxRIczqaFPC7en4aA\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:48:08 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"62fb9163306c859306bfa595\",\n    \"title\": \"Kenwoth Fridge\",\n    \"desc\": \"Useful big size fridge for family and business use\",\n    \"categories\": [\n        \"electronics\",\n        \"home\",\n        \"cold\"\n    ],\n    \"color\": \"white\",\n    \"price\": 500000,\n    \"createdAt\": \"2022-08-16T12:45:23.487Z\",\n    \"updatedAt\": \"2022-08-16T15:05:49.791Z\",\n    \"__v\": 0\n}"}],"_postman_id":"bcdaba71-c184-4130-b0c4-8c7c8b6cffa2"},{"name":"Get all products","id":"c24e47d3-ea4b-435f-95c5-6300a9635322","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?category=home&limit=1","description":"<p>This endpoint allow user to fetch data of all products currently available.</p>\n<h1 id=\"request-customization\">Request customization:</h1>\n<p>1.Get all products<br />Brings unlimited product data<br /><code>https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/</code><br />2.Get products based on category<br /><code>https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?category=home</code><br />3.Get products based on category and limited number<br /><code>https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?category=home&amp;limit=value</code><br />4.Get limited number of products<br /><code>https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?limit=3</code></p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","product"],"host":["ecommercesite","azurewebsites","net"],"query":[{"key":"category","value":"home"},{"key":"limit","value":"1"}],"variable":[]}},"response":[{"id":"68ab7afc-fb23-4335-bdbb-d55907d5c721","name":"Get all products (example)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?category=home&limit=1","protocol":"https","host":["ecommercesite","azurewebsites","net"],"path":["ecommerceAPI","api","product"],"query":[{"key":"category","value":"home"},{"key":"limit","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"281"},{"key":"ETag","value":"W/\"119-ctimoX8ZKqx7JdnN0ODtAhThuwE\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:49:59 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"62fb9163306c859306bfa595\",\n        \"title\": \"Kenwoth Fridge\",\n        \"desc\": \"Useful big size fridge for family and business use\",\n        \"categories\": [\n            \"electronics\",\n            \"home\",\n            \"cold\"\n        ],\n        \"color\": \"white\",\n        \"price\": 500000,\n        \"createdAt\": \"2022-08-16T12:45:23.487Z\",\n        \"updatedAt\": \"2022-08-16T15:05:49.791Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"c24e47d3-ea4b-435f-95c5-6300a9635322"},{"name":"Get New products","id":"659760c0-0cce-4077-b0c7-e7fc002389ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?new=true","description":"<p>Add query <code>new=true</code> on the URL to get the latest product posted</p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","product"],"host":["ecommercesite","azurewebsites","net"],"query":[{"key":"new","value":"true"}],"variable":[]}},"response":[{"id":"768842ce-88fc-4a0a-b66a-c591dbf4fc52","name":"Get New products (example)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product?new=true","protocol":"https","host":["ecommercesite","azurewebsites","net"],"path":["ecommerceAPI","api","product"],"query":[{"key":"new","value":"true"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"285"},{"key":"ETag","value":"W/\"11d-yWrNrp1b9HAkjdjgFIIfhkjsjE0\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:51:02 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"62fb995b9893615010231124\",\n        \"title\": \"Micro Wave\",\n        \"desc\": \"Useful big size fridge for family and business use\",\n        \"categories\": [\n            \"electronics\",\n            \"home\",\n            \"foodproducts\"\n        ],\n        \"color\": \"black\",\n        \"price\": 400000,\n        \"createdAt\": \"2022-08-16T13:19:23.728Z\",\n        \"updatedAt\": \"2022-08-16T13:19:23.728Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"659760c0-0cce-4077-b0c7-e7fc002389ce"},{"name":"Post New product","id":"155e6a0a-7dee-4c4b-9718-0098a956d683","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\":\"Sofa set\",\r\n    \"desc\":\"Useful big size fridge for family and business use\",\r\n    \"color\":\"white\",\r\n    \"categories\":[\"offices\", \"home\", \"furnitures\"],\r\n    \"price\":1500000\r\n    \r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/post","description":"<p>In this endpoint <strong>title, price and category</strong> are required value, consider the example below for demonstration</p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","product","post"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"ce3a7409-cf74-4f3c-bdda-3381afb96aa2","name":"Post New product","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\":\"Sofa set\",\r\n    \"desc\":\"Useful big size fridge for family and business use\",\r\n    \"color\":\"white\",\r\n    \"categories\":[\"offices\", \"home\", \"furnitures\"],\r\n    \"price\":1500000\r\n    \r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/post"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"276"},{"key":"ETag","value":"W/\"114-D9COuUqxjloc9KXezjTH0mbYDnU\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:53:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"Sofa set\",\n    \"desc\": \"Useful big size fridge for family and business use\",\n    \"categories\": [\n        \"offices\",\n        \"home\",\n        \"furnitures\"\n    ],\n    \"color\": \"white\",\n    \"price\": 1500000,\n    \"_id\": \"62fce4b102ce9802db541105\",\n    \"createdAt\": \"2022-08-17T12:53:05.849Z\",\n    \"updatedAt\": \"2022-08-17T12:53:05.849Z\",\n    \"__v\": 0\n}"}],"_postman_id":"155e6a0a-7dee-4c4b-9718-0098a956d683"},{"name":"Update Product info","id":"d740b4b5-38fe-4784-953b-ec94f29a0603","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"price\": 3500000\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/update/62fb9163306c859306bfa595","description":"<p>This endpoint require to provide <code>product id</code> to be able to update it<br /><code>https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/update/product_id</code></p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","product","update","62fb9163306c859306bfa595"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"ba4b5c98-049d-4b0e-a358-37e133eb6892","name":"Update Product info (example)","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"price\": 3500000\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/update/62fb9163306c859306bfa595"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"280"},{"key":"ETag","value":"W/\"118-F0Ks+1RWRaAHATTg9jeYxomcgQ0\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:54:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"62fb9163306c859306bfa595\",\n    \"title\": \"Kenwoth Fridge\",\n    \"desc\": \"Useful big size fridge for family and business use\",\n    \"categories\": [\n        \"electronics\",\n        \"home\",\n        \"cold\"\n    ],\n    \"color\": \"white\",\n    \"price\": 3500000,\n    \"createdAt\": \"2022-08-16T12:45:23.487Z\",\n    \"updatedAt\": \"2022-08-17T12:54:39.827Z\",\n    \"__v\": 0\n}"}],"_postman_id":"d740b4b5-38fe-4784-953b-ec94f29a0603"},{"name":"Delete Product","id":"2ae3bffb-d6e9-4449-8557-815e91abbce7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/delete/62fb9163306c859306bfa595","description":"<p>This endpoint require to provide product_id to be able to delete it<br /><code>https://ecommercesite.azurewebsites.net/ecommerceAPI/api/product/update/product_id</code></p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","product","delete","62fb9163306c859306bfa595"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"49a36ab7-8373-4bc5-a762-96e2df3d00fd","name":"Delete Product info","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:2000/mountainCake/api/product/delete/62fb9163306c859306bfa595"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"29"},{"key":"ETag","value":"W/\"1d-9NcBWrBlGkb48yZhf/NnCzNZLKg\""},{"key":"Date","value":"Wed, 17 Aug 2022 12:56:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"\"Product has been deleted...\""}],"_postman_id":"2ae3bffb-d6e9-4449-8557-815e91abbce7"}],"id":"a0e0bf81-e4de-4a0d-a4d7-30dbca7e3056","description":"<p>This collection contain endpoints related to products functionalities, some of the endpoints require user to be logged in or is the administrator to access them, because they require access token which hold user information to be verified for access</p>\n<p>Requests</p>\n<ul>\n<li>Get All products</li>\n<li>Get new product</li>\n<li>Update product</li>\n<li>Delete product</li>\n</ul>\n","_postman_id":"a0e0bf81-e4de-4a0d-a4d7-30dbca7e3056"},{"name":"Cart (Wishlist)","item":[{"name":"Add to cart","id":"01e7e72d-3032-4534-ac00-a3697c8f0772","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"userId\":\"62fa46abf276a7f54303e211\",\r\n  \"products\":[{\"productId\":\"Masai bracelets\",\"quantity\":1},{\"productId\":\"Tshirt\",\"quantity\":6}]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/post/","description":"<p>API endpoint to create cart (put product into wish-list)</p>\n<p>requires a user to be Logged In to be able to send data successfully in this endpoint</p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","cart","post",""],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"342856fa-b49b-4367-bb36-4661ae37a8bb","name":"Add to cart (example)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"userId\":\"62fa46abf276a7f54303e211\",\r\n  \"products\":[{\"productId\":\"Masai bracelets\",\"quantity\":1},{\"productId\":\"Tshirt\",\"quantity\":6}]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/post/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"316"},{"key":"ETag","value":"W/\"13c-var7sRWf8ofOCXnQsv7mzaJDjpE\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:18:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"userId\": \"62fa46abf276a7f54303e211\",\n    \"products\": [\n        {\n            \"productId\": \"Masai bracelets\",\n            \"quantity\": 1,\n            \"_id\": \"62fceac202ce9802db54110a\"\n        },\n        {\n            \"productId\": \"Tshirt\",\n            \"quantity\": 6,\n            \"_id\": \"62fceac202ce9802db54110b\"\n        }\n    ],\n    \"_id\": \"62fceac202ce9802db541109\",\n    \"createdAt\": \"2022-08-17T13:18:58.194Z\",\n    \"updatedAt\": \"2022-08-17T13:18:58.194Z\",\n    \"__v\": 0\n}"}],"_postman_id":"01e7e72d-3032-4534-ac00-a3697c8f0772"},{"name":"Update cart","id":"1d39fc73-ce62-4aec-ab18-b2c2e8ed4671","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"products\":[{\"productId\": \" Yeezy Boots\",\r\n                \"quantity\": 1}]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/update/62fceb7302ce9802db54110f","description":"<p>API endpoint to update cart <em>products</em></p>\n<p>requires a user to be Logged in to be able to access data in this endpoint</p>\n<p>Also the URL require <code>cart id</code></p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","cart","update","62fceb7302ce9802db54110f"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"6dc80386-979f-44ed-ae69-8834f56cb63f","name":"Update Cart (example)","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"products\":[{\"productId\": \" Yeezy Boots\",\r\n                \"quantity\": 1}]\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/update/62fceb7302ce9802db54110f"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"244"},{"key":"ETag","value":"W/\"f4-34yKcMCAwtu9D/YoWXDVrmXcEGE\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:22:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"62fceb7302ce9802db54110f\",\n    \"userId\": \"62fa46abf276a7f54303e211\",\n    \"products\": [\n        {\n            \"productId\": \" Yeezy Boots\",\n            \"quantity\": 1,\n            \"_id\": \"62fceb8802ce9802db541113\"\n        }\n    ],\n    \"createdAt\": \"2022-08-17T13:21:55.361Z\",\n    \"updatedAt\": \"2022-08-17T13:22:16.904Z\",\n    \"__v\": 0\n}"}],"_postman_id":"1d39fc73-ce62-4aec-ab18-b2c2e8ed4671"},{"name":"Delete Cart","id":"492a3d77-898c-4aeb-b398-38b472a9198b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/delete/62fceb7302ce9802db54110f","description":"<p>API endpoint to delete cart <em>products</em></p>\n<p>requires a user to be Logged in to be able to access data in this endpoint</p>\n<p>Also the URL require <code>cart id</code></p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","cart","delete","62fceb7302ce9802db54110f"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"af7b68b8-cbfa-4069-a48c-21a5587c1087","name":"Delete Cart (example)","originalRequest":{"method":"DELETE","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/delete/62fceb7302ce9802db54110f"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"48"},{"key":"ETag","value":"W/\"30-BMIioqi47Va9VKHHmaxE8PK8AQI\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:24:34 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"\"Cart with ID: 62fceb7302ce9802db54110f deleted\""}],"_postman_id":"492a3d77-898c-4aeb-b398-38b472a9198b"},{"name":"Get all Cart","id":"00c83867-8920-4967-a173-a1f3b3b98f36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/","description":"<p>API endpoint to get all products in wish-list</p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","cart",""],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"5b070adf-bf4b-4a79-bec8-a386fd98f71f","name":"Get all Cart (example)","originalRequest":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/cart/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1588"},{"key":"ETag","value":"W/\"634-B6WVyLpwZuCwUuGz1cd0jikmIP8\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:25:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"62fbbd4ad911a8e6ef955b3a\",\n        \"userId\": \"62fb606fb6d156cc5e3e7971\",\n        \"products\": [\n            {\n                \"productId\": \"Boss Fridge\",\n                \"quantity\": 2,\n                \"_id\": \"62fbbd4ad911a8e6ef955b3b\"\n            },\n            {\n                \"productId\": \"Philips Iron\",\n                \"quantity\": 1,\n                \"_id\": \"62fbbd4ad911a8e6ef955b3c\"\n            }\n        ],\n        \"createdAt\": \"2022-08-16T15:52:42.927Z\",\n        \"updatedAt\": \"2022-08-16T15:52:42.927Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fbbf18d911a8e6ef955b46\",\n        \"userId\": \"62fa6cecfd9c1f037f710daf\",\n        \"products\": [\n            {\n                \"productId\": \"Nike sandals\",\n                \"quantity\": 2,\n                \"_id\": \"62fbbf18d911a8e6ef955b47\"\n            },\n            {\n                \"productId\": \"Puma Tshirt\",\n                \"quantity\": 1,\n                \"_id\": \"62fbbf18d911a8e6ef955b48\"\n            }\n        ],\n        \"createdAt\": \"2022-08-16T16:00:24.648Z\",\n        \"updatedAt\": \"2022-08-16T16:00:24.648Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fbbf44d911a8e6ef955b4a\",\n        \"userId\": \"62fa46abf276a7f54303e211\",\n        \"products\": [\n            {\n                \"productId\": \"Nike sandals\",\n                \"quantity\": 2,\n                \"_id\": \"62fbbf44d911a8e6ef955b4b\"\n            },\n            {\n                \"productId\": \"Puma Tshirt\",\n                \"quantity\": 1,\n                \"_id\": \"62fbbf44d911a8e6ef955b4c\"\n            }\n        ],\n        \"createdAt\": \"2022-08-16T16:01:08.989Z\",\n        \"updatedAt\": \"2022-08-16T16:01:08.989Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fbbf6dd911a8e6ef955b4e\",\n        \"userId\": \"62fa46abf276a7f54303e211\",\n        \"products\": [\n            {\n                \"productId\": \"Masai boots\",\n                \"quantity\": 3,\n                \"_id\": \"62fbbf6dd911a8e6ef955b4f\"\n            },\n            {\n                \"productId\": \"Tshirt\",\n                \"quantity\": 6,\n                \"_id\": \"62fbbf6dd911a8e6ef955b50\"\n            }\n        ],\n        \"createdAt\": \"2022-08-16T16:01:49.574Z\",\n        \"updatedAt\": \"2022-08-16T16:01:49.574Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fceac202ce9802db541109\",\n        \"userId\": \"62fa46abf276a7f54303e211\",\n        \"products\": [\n            {\n                \"productId\": \"Masai bracelets\",\n                \"quantity\": 1,\n                \"_id\": \"62fceac202ce9802db54110a\"\n            },\n            {\n                \"productId\": \"Tshirt\",\n                \"quantity\": 6,\n                \"_id\": \"62fceac202ce9802db54110b\"\n            }\n        ],\n        \"createdAt\": \"2022-08-17T13:18:58.194Z\",\n        \"updatedAt\": \"2022-08-17T13:18:58.194Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"00c83867-8920-4967-a173-a1f3b3b98f36"}],"id":"2c7afeff-7dd6-42e0-8116-310ca9c19efe","description":"<p>This collection contain endpoints related to product added on wishlist(cart) , some of the endpoints require user to be logged in or is the administrator to access them, because they require <strong>access token</strong> which hold user information to be verified for access</p>\n<p>Requests</p>\n<ul>\n<li>Creating cart</li>\n<li>Update cart</li>\n<li>Delete cart</li>\n<li>Get All cart</li>\n</ul>\n","_postman_id":"2c7afeff-7dd6-42e0-8116-310ca9c19efe"},{"name":"Orders","item":[{"name":"Get all orders","id":"7219c5e4-0cf0-441d-8a1a-03de32202110","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/","description":"<p>API endpoint to obtain all <em>orders made to the system</em></p>\n<p>requires a user to be signed as Admin to be able to access data in this endpoint</p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","order",""],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"73822bc8-505a-49ee-be43-a21d166b3923","name":"Get all orders (example)","originalRequest":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1149"},{"key":"ETag","value":"W/\"47d-5O9jSPFgaB3mPNC8dgpjEb8qstI\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:32:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"62fbc2a5ed580e814e55e09f\",\n        \"userId\": \"62fb606fb6d156cc5e3e7971\",\n        \"products\": [\n            {\n                \"productId\": \"Boss Fridge\",\n                \"quantity\": 2,\n                \"_id\": \"62fbc2a5ed580e814e55e0a0\"\n            },\n            {\n                \"productId\": \"Philips Iron\",\n                \"quantity\": 1,\n                \"_id\": \"62fbc2a5ed580e814e55e0a1\"\n            }\n        ],\n        \"amount\": 360000,\n        \"address\": \"Mbagala, chamazi\",\n        \"status\": \"pending\",\n        \"createdAt\": \"2022-08-16T16:15:33.052Z\",\n        \"updatedAt\": \"2022-08-16T16:26:28.163Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fbc3aced580e814e55e0a7\",\n        \"userId\": \"62fa6cecfd9c1f037f710daf\",\n        \"products\": [\n            {\n                \"productId\": \"Nike sandals\",\n                \"quantity\": 2,\n                \"_id\": \"62fbc3aced580e814e55e0a8\"\n            },\n            {\n                \"productId\": \"Puma Tshirt\",\n                \"quantity\": 1,\n                \"_id\": \"62fbc3aced580e814e55e0a9\"\n            }\n        ],\n        \"amount\": 250000,\n        \"address\": \"Mbagala, chamazi\",\n        \"status\": \"pending\",\n        \"createdAt\": \"2022-08-16T16:19:56.972Z\",\n        \"updatedAt\": \"2022-08-16T16:19:56.972Z\",\n        \"__v\": 0\n    },\n    {\n        \"_id\": \"62fbc59f4b3b3dd820a98c5d\",\n        \"userId\": \"62fa6cecfd9c1f037f710daf\",\n        \"products\": [\n            {\n                \"productId\": \"Jacket Coat\",\n                \"quantity\": 2,\n                \"_id\": \"62fbc59f4b3b3dd820a98c5e\"\n            },\n            {\n                \"productId\": \"Yeezy Boats\",\n                \"quantity\": 1,\n                \"_id\": \"62fbc59f4b3b3dd820a98c5f\"\n            }\n        ],\n        \"amount\": 100000,\n        \"address\": \"Mbagala, chamazi\",\n        \"status\": \"pending\",\n        \"createdAt\": \"2022-08-16T16:28:15.235Z\",\n        \"updatedAt\": \"2022-08-16T16:28:15.235Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"7219c5e4-0cf0-441d-8a1a-03de32202110"},{"name":"Monthly revenue","id":"4ffe3030-9a45-43cc-8154-665420b86e4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/income","description":"<p>This endpoint generate monthly revenue due to the orders made by customers</p>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","order","income"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"5ca3195b-b3a2-491e-a2d1-1477e8114462","name":"Monthly revenue (example)","originalRequest":{"method":"GET","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/income"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"26"},{"key":"ETag","value":"W/\"1a-J0j/8vbCExKOkRYG8jNr03PcXMg\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:33:37 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": 8,\n        \"total\": 710000\n    }\n]"}],"_postman_id":"4ffe3030-9a45-43cc-8154-665420b86e4a"},{"name":"Create order","id":"ec4ea8da-3323-4cf6-98f1-8481a8e1fb8b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n        \"userId\": \"62fa6cecfd9c1f037f710daf\",\r\n        \"products\": [\r\n            {\r\n                \"productId\": \"Jacket Coat\",\r\n                \"quantity\": 2\r\n            },\r\n            {\r\n                \"productId\": \"Yeezy Boats\",\r\n                \"quantity\": 1\r\n            }\r\n        ],\r\n        \"amount\":100000,\r\n        \"address\":\"Mbagala, chamazi\"\r\n    }","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/post/","description":"<h2 id=\"create-order\"><strong>CREATE ORDER</strong></h2>\n<p>API endpoint for <em>new</em> <em>order</em> creation in the system</p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","order","post",""],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"397e33b3-a3c7-4923-8351-2b63bcb54d1f","name":"Create order (example)","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n        \"userId\": \"62fa6cecfd9c1f037f710daf\",\r\n        \"products\": [\r\n            {\r\n                \"productId\": \"Jacket Coat\",\r\n                \"quantity\": 2\r\n            },\r\n            {\r\n                \"productId\": \"Yeezy Boats\",\r\n                \"quantity\": 1\r\n            }\r\n        ],\r\n        \"amount\":100000,\r\n        \"address\":\"Mbagala, chamazi\"\r\n    }","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/post/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"381"},{"key":"ETag","value":"W/\"17d-nNr9MvNASLoA9S625zuOA6vMpeU\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:34:56 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"userId\": \"62fa6cecfd9c1f037f710daf\",\n    \"products\": [\n        {\n            \"productId\": \"Jacket Coat\",\n            \"quantity\": 2,\n            \"_id\": \"62fcee8002ce9802db54111a\"\n        },\n        {\n            \"productId\": \"Yeezy Boats\",\n            \"quantity\": 1,\n            \"_id\": \"62fcee8002ce9802db54111b\"\n        }\n    ],\n    \"amount\": 100000,\n    \"address\": \"Mbagala, chamazi\",\n    \"status\": \"pending\",\n    \"_id\": \"62fcee8002ce9802db541119\",\n    \"createdAt\": \"2022-08-17T13:34:56.350Z\",\n    \"updatedAt\": \"2022-08-17T13:34:56.350Z\",\n    \"__v\": 0\n}"}],"_postman_id":"ec4ea8da-3323-4cf6-98f1-8481a8e1fb8b"},{"name":"Update order","id":"a03f99ee-2501-41f4-8131-d7ac5468b217","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"amount\": 130000\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/update/62fbc2a5ed580e814e55e09f","description":"<h2 id=\"update-order\"><strong>UPDATE ORDER</strong></h2>\n<p>API endpoint for updating <em>orders</em> already in the system</p>\n<p>require Admin access</p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","order","update","62fbc2a5ed580e814e55e09f"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"03f20e1a-7c08-403f-a6b9-e6da99f8d979","name":"Update order(example)","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"amount\": 130000\r\n}","options":{"raw":{"language":"json"}}},"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/update/62fbc2a5ed580e814e55e09f"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"382"},{"key":"ETag","value":"W/\"17e-27zQ4V8neFXIcClvLdY2SoFgcTE\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:38:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"62fbc2a5ed580e814e55e09f\",\n    \"userId\": \"62fb606fb6d156cc5e3e7971\",\n    \"products\": [\n        {\n            \"productId\": \"Boss Fridge\",\n            \"quantity\": 2,\n            \"_id\": \"62fbc2a5ed580e814e55e0a0\"\n        },\n        {\n            \"productId\": \"Philips Iron\",\n            \"quantity\": 1,\n            \"_id\": \"62fbc2a5ed580e814e55e0a1\"\n        }\n    ],\n    \"amount\": 360000,\n    \"address\": \"Mbagala, chamazi\",\n    \"status\": \"pending\",\n    \"createdAt\": \"2022-08-16T16:15:33.052Z\",\n    \"updatedAt\": \"2022-08-17T13:38:10.378Z\",\n    \"__v\": 0\n}"}],"_postman_id":"a03f99ee-2501-41f4-8131-d7ac5468b217"},{"name":"Delete order","id":"5108e3fd-76c6-4f7d-9443-b08d774fcf24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/delete/62fbc59f4b3b3dd820a98c5d","description":"<h2 id=\"delete-order\"><strong>DELETE ORDER</strong></h2>\n<p>API endpoint for deleting <em>order</em> in the system</p>\n<p>require Admin access</p>\n<blockquote>\n<p>A successful request will result in a <strong>HTTP 200</strong> status code</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["ecommerceAPI","api","order","delete","62fbc59f4b3b3dd820a98c5d"],"host":["ecommercesite","azurewebsites","net"],"query":[],"variable":[]}},"response":[{"id":"bd75b847-af22-4372-a62f-6df07627605d","name":"Delete order (example)","originalRequest":{"method":"DELETE","header":[],"url":"https://ecommercesite.azurewebsites.net/ecommerceAPI/api/order/delete/62fbc59f4b3b3dd820a98c5d"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"58"},{"key":"ETag","value":"W/\"3a-5RzDPbGw6PZ1kdgIBQ94LCCQD0c\""},{"key":"Date","value":"Wed, 17 Aug 2022 13:39:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"\"Order with ID: 62fbc59f4b3b3dd820a98c5d has been deleted\""}],"_postman_id":"5108e3fd-76c6-4f7d-9443-b08d774fcf24"}],"id":"b79f3c6d-2248-41b2-858e-1ca01b304fe6","description":"<h2 id=\"order-endpoints\">Order Endpoints</h2>\n<p>This collection contain endpoints related to product ordered functionalities, some of the endpoints require user to be logged in or is the administrator to access them, because they require <strong>access token</strong> which hold user information to be verified for access</p>\n<p>Requests</p>\n<ul>\n<li>Creating order</li>\n<li>Update order</li>\n<li>Delete order</li>\n<li>Get All orders</li>\n<li>Get Income(revenue) generated monthly</li>\n</ul>\n","_postman_id":"b79f3c6d-2248-41b2-858e-1ca01b304fe6"}]}