{"info":{"_postman_id":"d5942fe4-0790-4f49-829c-91b29e0ec326","name":"E-commerce microservice","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"11352997","collectionId":"d5942fe4-0790-4f49-829c-91b29e0ec326","publishedId":"UzBtnPbv","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-06-28T18:40:43.000Z"},"item":[{"name":"Product","item":[{"name":"Get all products","id":"6b6b2e16-3b83-4508-b6a9-5e51aac73157","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/products","urlObject":{"protocol":"http","port":"3000","path":["api","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"5e095136-0069-4d72-aa40-3d423483bf40","name":"Get all products","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/products"},"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":"991"},{"key":"ETag","value":"W/\"3df-YzSyioYiCmpa7Jav1MV4BEyzoFo\""},{"key":"Date","value":"Wed, 29 Jun 2022 13:29:57 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Product retrieved successfully\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"name\": \"Strawberry\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Coconut\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Mango\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        },\n        {\n            \"id\": 4,\n            \"name\": \"Fruit\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        }\n    ]\n}"}],"_postman_id":"6b6b2e16-3b83-4508-b6a9-5e51aac73157"},{"name":"Get a product","id":"08a56abb-e599-4e2b-99c3-5522e350c95f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/products/1","urlObject":{"protocol":"http","port":"3000","path":["api","products","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"388c30f5-853f-4ac7-966d-203e0a4d2261","name":"Get a product","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/products/1"},"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":"300"},{"key":"ETag","value":"W/\"12c-lWCUTBYsVMpeW9t0VxooGtHZzes\""},{"key":"Date","value":"Wed, 29 Jun 2022 13:37:05 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Product retrieved successfully\",\n    \"data\": {\n        \"id\": 1,\n        \"name\": \"Strawberry\",\n        \"categoryId\": 1,\n        \"sku\": 2001,\n        \"availableQuantity\": 10,\n        \"costPrice\": 200,\n        \"sellingPrice\": 200,\n        \"description\": \"Some stuff\",\n        \"isActive\": true,\n        \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n        \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n    }\n}"}],"_postman_id":"08a56abb-e599-4e2b-99c3-5522e350c95f"},{"name":"Get products by category","id":"256e136a-19b1-42d8-9120-e12a017d870f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/products/1/products","urlObject":{"protocol":"http","port":"3000","path":["api","products","1","products"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f1912c92-b733-4021-a181-32c6cb839d44","name":"Get products by category","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/products/1/products"},"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":"991"},{"key":"ETag","value":"W/\"3df-YzSyioYiCmpa7Jav1MV4BEyzoFo\""},{"key":"Date","value":"Wed, 29 Jun 2022 14:10:21 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Product retrieved successfully\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"name\": \"Strawberry\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Coconut\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Mango\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        },\n        {\n            \"id\": 4,\n            \"name\": \"Fruit\",\n            \"categoryId\": 1,\n            \"sku\": 2001,\n            \"availableQuantity\": 10,\n            \"costPrice\": 200,\n            \"sellingPrice\": 200,\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.892Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.892Z\"\n        }\n    ]\n}"}],"_postman_id":"256e136a-19b1-42d8-9120-e12a017d870f"}],"id":"67b189b8-eb9b-4f8d-bab7-78ec035644ee","_postman_id":"67b189b8-eb9b-4f8d-bab7-78ec035644ee","description":""},{"name":"Category","item":[{"name":"Get all categories","id":"2414813a-4921-4b1a-877c-042ad887500b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/categories","urlObject":{"protocol":"http","port":"3000","path":["api","categories"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2c36b5ac-a1bb-4e79-b1ad-7282acf0c039","name":"Get all categories","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/categories"},"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":"505"},{"key":"ETag","value":"W/\"1f9-ZMXW6nObumTfJFSwWSoJIHp+e1k\""},{"key":"Date","value":"Wed, 29 Jun 2022 13:38:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Category retrieved successfully\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"name\": \"Cloths\",\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.843Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.843Z\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Fruits\",\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.843Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.843Z\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Food\",\n            \"description\": \"Some stuff\",\n            \"isActive\": true,\n            \"createdAt\": \"2022-06-29T13:20:34.843Z\",\n            \"updatedAt\": \"2022-06-29T13:20:34.843Z\"\n        }\n    ]\n}"}],"_postman_id":"2414813a-4921-4b1a-877c-042ad887500b"},{"name":"Get a category","id":"36056c95-da3b-4d4f-9202-92e52ae86695","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/categories/1","urlObject":{"protocol":"http","port":"3000","path":["api","categories","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"cdf610a6-b019-4bf1-8cb0-5ca19a4b80c8","name":"Get a category","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/api/categories/1"},"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":"213"},{"key":"ETag","value":"W/\"d5-OJ6QqOfySevGDNY41EK7twx68F0\""},{"key":"Date","value":"Wed, 29 Jun 2022 13:45:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Category retrieved successfully\",\n    \"data\": {\n        \"id\": 1,\n        \"name\": \"Cloths\",\n        \"description\": \"Some stuff\",\n        \"isActive\": true,\n        \"createdAt\": \"2022-06-29T13:20:34.843Z\",\n        \"updatedAt\": \"2022-06-29T13:20:34.843Z\"\n    }\n}"}],"_postman_id":"36056c95-da3b-4d4f-9202-92e52ae86695"}],"id":"dbafd07a-2d66-44a5-a228-a87d6dd15039","_postman_id":"dbafd07a-2d66-44a5-a228-a87d6dd15039","description":""},{"name":"Order","item":[{"name":"Get all orders","id":"3975a2eb-5629-4fd6-b44c-bd1ab08e450b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3002/api/orders/","urlObject":{"protocol":"http","port":"3002","path":["api","orders",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0b74bc7d-485e-44b0-b79f-6730de5a8a01","name":"Get all orders","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3002/api/orders/"},"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":"295"},{"key":"ETag","value":"W/\"127-34CGvE6lyuwKX2YovAQTZnrKEK4\""},{"key":"Date","value":"Wed, 29 Jun 2022 15:57:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Orders retrieved successfully\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"userId\": 2,\n            \"paid\": false,\n            \"address\": \"10, fasanya alago street\",\n            \"phoneNumber\": \"09051053101\",\n            \"amount\": 1000,\n            \"status\": \"pending\",\n            \"reference\": null,\n            \"created_at\": \"2022-06-29T15:52:41.117Z\",\n            \"updated_at\": \"2022-06-29T15:52:41.117Z\"\n        }\n    ]\n}"}],"_postman_id":"3975a2eb-5629-4fd6-b44c-bd1ab08e450b"},{"name":"Get a single order","id":"8c40b1f0-7a4f-4264-8510-e983570e0f18","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"8c40b1f0-7a4f-4264-8510-e983570e0f18"},{"name":"Create an order","id":"f383645c-e1e6-48a4-abda-ec4b61e104bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"cart\": [{\r\n        \"productId\":\"1\",\r\n        \"price\": \"500\",\r\n        \"quantity\": \"2\"\r\n\r\n    }],\r\n    \"address\": \"10, fasanya alago street\",\r\n    \"phoneNumber\": \"09051053101\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3002/api/orders/","urlObject":{"protocol":"http","port":"3002","path":["api","orders",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"55df6c29-eaa7-44a2-a6f7-c1c9e299edaf","name":"Create an order","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"cart\": [{\r\n        \"productId\":\"1\",\r\n        \"price\": \"500\",\r\n        \"quantity\": \"2\"\r\n\r\n    }],\r\n    \"address\": \"10, fasanya alago street\",\r\n    \"phoneNumber\": \"09051053101\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3002/api/orders/"},"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":"309"},{"key":"ETag","value":"W/\"135-W/b7c8SZUswXW/6BwCu0p+2sFa4\""},{"key":"Date","value":"Wed, 29 Jun 2022 15:52:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Order created successfully\",\n    \"data\": {\n        \"id\": 1,\n        \"userId\": 2,\n        \"paid\": false,\n        \"address\": \"10, fasanya alago street\",\n        \"phoneNumber\": \"09051053101\",\n        \"amount\": 1000,\n        \"status\": \"pending\",\n        \"reference\": null,\n        \"created_at\": \"2022-06-29T15:52:41.117Z\",\n        \"updated_at\": \"2022-06-29T15:52:41.117Z\",\n        \"order_details\": []\n    }\n}"}],"_postman_id":"f383645c-e1e6-48a4-abda-ec4b61e104bf"},{"name":"Get user's orders","id":"dc21a816-af09-4822-8642-e0c038ba85a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"dc21a816-af09-4822-8642-e0c038ba85a2"}],"id":"e187dca5-9aad-4771-9e3e-647909678112","_postman_id":"e187dca5-9aad-4771-9e3e-647909678112","description":""},{"name":"Authentication","item":[{"name":"Register","id":"8667ebc3-52e3-4f29-bd17-f89528cb9684","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\":\"Samson\",\r\n    \"lastName\":\"Adejoro\",\r\n    \"email\":\"sam@gmail.com\",\r\n    \"password\":\"samson1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3004/api/auth/register","urlObject":{"protocol":"http","port":"3004","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e43c8f4d-0f09-424e-900f-d4ceaaec285b","name":"Register","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"firstName\":\"Samson\",\r\n    \"lastName\":\"Adejoro\",\r\n    \"email\":\"sam@gmail.com\",\r\n    \"password\":\"samson1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3004/api/auth/register"},"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":"267"},{"key":"ETag","value":"W/\"10b-gGCxyeV8wwNwBkY8EqQkuyMjTPg\""},{"key":"Date","value":"Wed, 06 Jul 2022 16:55:33 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"User\",\n    \"data\": {\n        \"id\": 1,\n        \"firstName\": \"Samson\",\n        \"lastName\": \"Adejoro\",\n        \"email\": \"sam@gmail.com\",\n        \"password\": \"$2a$10$oOf5kB55.WFVT5mDyjyJ7OwTOzAWZe0vLXXpRYak6iipb7t3bgo7e\",\n        \"updatedAt\": \"2022-07-06T16:55:33.264Z\",\n        \"createdAt\": \"2022-07-06T16:55:33.264Z\"\n    }\n}"}],"_postman_id":"8667ebc3-52e3-4f29-bd17-f89528cb9684"},{"name":"Login","id":"e009643e-8dfe-4fb8-a0b7-fe569b13681c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n     \"email\":\"sam@gmail.com\",\r\n    \"password\":\"samson1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3004/api/auth/login","urlObject":{"protocol":"http","port":"3004","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2c871bbf-13ed-4614-a6c1-d420caf910a2","name":"Login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n     \"email\":\"sam@gmail.com\",\r\n    \"password\":\"samson1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3004/api/auth/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":"202"},{"key":"ETag","value":"W/\"ca-xwPgn1AZRiVNIU/ugLPtX5C9wqs\""},{"key":"Date","value":"Wed, 06 Jul 2022 17:02:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Login successful\",\n    \"data\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZW1haWwiOiJzYW1AZ21haWwuY29tIiwiaWF0IjoxNjU3MTI2OTQ5fQ.u5J6aAzJcsQeHO-odmZ7s2mZxtzvMu0k2Gmc49EN6Ow\"\n}"}],"_postman_id":"e009643e-8dfe-4fb8-a0b7-fe569b13681c"}],"id":"0e466b31-dfa7-465c-a3fb-563e9969248a","_postman_id":"0e466b31-dfa7-465c-a3fb-563e9969248a","description":""}]}