{"info":{"_postman_id":"9b5b8147-84e4-4aac-8e78-853919129baa","name":"Trip Zip","description":"<html><head></head><body><p>This API requires authorization for all user specific routes. During testing, a pre-script is used to set a testing cookie for authorization.</p>\n<h4 id=\"authorization-requirements\">Authorization Requirements</h4>\n<p>- All routes, except those under `/user/`, require valid authorization.</p>\n<h4 id=\"testing-with-pre-script\">Testing with Pre-Script</h4>\n<p>To facilitate testing, a pre-script is used to set a testing cookie. This allows testers to access authorized routes without the need for explicit authorization. Token can be generated in the browser and can be accessed in the environment variable.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">const tokenValue = pm.environment.get(\"token_value\");\nconst cookieString = `access_token=${tokenValue}; path=/;`;\npm.request.headers.add({\n    key: 'Cookie',\n    value: cookieString\n});\n\n</code></pre>\n<p>Request Status Codes</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>204 No Content</code></td>\n<td>Success</td>\n<td>No Data Sent</td>\n</tr>\n<tr>\n<td><code>200 OK</code></td>\n<td>Success</td>\n<td>Contains Data</td>\n</tr>\n<tr>\n<td><code>201 Created</code></td>\n<td>Success</td>\n<td>Data Created</td>\n</tr>\n<tr>\n<td><code>401 Unauthorized</code></td>\n<td>Error</td>\n<td>Unauthorized</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>Error</td>\n<td>Data Not Found</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Error</td>\n<td>Internal Server Error</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"16660574","collectionId":"9b5b8147-84e4-4aac-8e78-853919129baa","publishedId":"2s9YR57axm","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-10-14T11:54:08.000Z"},"item":[{"name":"Users","item":[{"name":"signup","event":[{"listen":"test","script":{"id":"7042c4e2-3c57-4a74-81b3-e3e9dc824fc2","exec":["if (pm.response.code === 400) {","    pm.test(\"Status code is 400\", function () {","    pm.expect(pm.response.code).to.satisfy(function (code) {","        return code === 400","        });","    });","    console.log(pm.response.json().message);","} else if (pm.response.code === 201) {","pm.test(\"Status code is 201\", function () {","    pm.response.to.have.status(201);","});","","pm.test(\"Response is JSON\", function () {","    pm.response.to.be.json;","});","","pm.test(\"Response contains 'userId'\", function () {","    pm.expect(pm.response.json()).to.have.property('uid');","    pm.expect(pm.response.json()).to.have.property('name');","});","","pm.test(\"userId is a string\", function () {","    pm.expect(pm.response.json().uid).to.be.a('string');","    pm.expect(pm.response.json().name).to.be.a('string');","});","","}",""],"type":"text/javascript"}}],"id":"eba1cfe7-5c40-4466-8a67-ec986700b33c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"aadijain@gmail.com\",\r\n    \"password\": \"aadijain7\",\r\n    \"name\": \"Aadi Jain\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/users/signup","description":"<p>This endpoint handles user registration.</p>\n<p>Errors:</p>\n<ul>\n<li>400 Bad Request: If any required fields are missing or invalid.</li>\n<li>500 Internal Server Error: If there's a server-side error during registration.</li>\n</ul>\n<blockquote>\n<p>This route doesn't require user authorization</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"8000","path":["users","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"eba1cfe7-5c40-4466-8a67-ec986700b33c"},{"name":"signin","id":"c5af9bfe-821a-4a6f-b9f9-1a299c124d09","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"aadijain@gmail.com\",\n    \"password\": \"aadijain7\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/users/signin","description":"<p>This endpoint handles user login.</p>\n<p>Errors:</p>\n<ul>\n<li>400 Bad Request: If any required fields are missing or invalid.</li>\n<li>401 Unauthorized: If the provided credentials are incorrect.</li>\n<li>500 Internal Server Error: If there's a server-side error during login.</li>\n</ul>\n<blockquote>\n<p>This route doesn't require user authorization</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"8000","path":["users","signin"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5af9bfe-821a-4a6f-b9f9-1a299c124d09"},{"name":"signout","id":"82b594b0-25e9-4903-a75a-fd1262356d6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8000/users/signout","description":"<p>This endpoint handles user logout.</p>\n<p>Errors:</p>\n<ul>\n<li>500 Internal Server Error: If there's a server-side error during logout.</li>\n</ul>\n<blockquote>\n<p>This route doesn't require user authorization</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"8000","path":["users","signout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"82b594b0-25e9-4903-a75a-fd1262356d6b"},{"name":"User Data","id":"f6ca8e06-89cb-42fd-9927-4a51a2942a25","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/users/userdata/6549b47b4717a8e976d580d9","urlObject":{"protocol":"http","port":"8000","path":["users","userdata","6549b47b4717a8e976d580d9"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f6ca8e06-89cb-42fd-9927-4a51a2942a25"}],"id":"6a8150ea-a95c-4d8b-aaa7-834b9f119ccb","_postman_id":"6a8150ea-a95c-4d8b-aaa7-834b9f119ccb","description":""},{"name":"User Details","item":[{"name":"Account","event":[{"listen":"prerequest","script":{"id":"66210611-b533-4b52-83e9-b9e2f5209d06","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"9abce0c6-2c09-4f83-aa9a-f0a354c4efb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/account","description":"<p>This endpoint retrieves user account details based on the provided UID.</p>\n<p>Errors:</p>\n<ul>\n<li>404 Not Found: If user details are not found for the provided UID.</li>\n<li>500 Internal Server Error: If there's a server-side error during the request.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8000","path":["account"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"67f4a28f-81ba-442f-9f27-c3a85891e3e2","name":"Account","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8000/account"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"263"},{"key":"ETag","value":"W/\"107-LPkZrnJZL9h6wH2YxWPQlCEq/0s\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:44:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"User Details Fetched\",\n    \"data\": {\n        \"_id\": \"65507d91b5ae7d5131cb645f\",\n        \"tripsCreated\": [],\n        \"tripsInterested\": [\n            \"655c47af227da2c155be6118\"\n        ],\n        \"status\": \"active\",\n        \"updatedAt\": \"2023-11-12T07:24:01.512Z\",\n        \"__v\": 15,\n        \"hobbies\": [],\n        \"language_speak\": [],\n        \"stars\": 0\n    }\n}"}],"_postman_id":"9abce0c6-2c09-4f83-aa9a-f0a354c4efb3"},{"name":"Account by UID","event":[{"listen":"prerequest","script":{"id":"66210611-b533-4b52-83e9-b9e2f5209d06","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"5844d82d-0c89-49dc-a790-d70b6d030783","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/account/658ea2784a11097976658b56","description":"<p>This endpoint retrieves user account details based on the provided UID.</p>\n<p>Errors:</p>\n<ul>\n<li>404 Not Found: If user details are not found for the provided UID.</li>\n<li>500 Internal Server Error: If there's a server-side error during the request.</li>\n</ul>\n<blockquote>\n<p>This route doesn't require user authorization</p>\n</blockquote>\n","urlObject":{"protocol":"http","port":"8000","path":["account","658ea2784a11097976658b56"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7169faec-a13e-4d4f-8424-3cd9bbbd140b","name":"Account by UID","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8000/account/6549b47b4717a8e976d580d9"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"799"},{"key":"ETag","value":"W/\"31f-p0TLow40aoYceODhGO7066kb7hU\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:48:24 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"User Details Fetched\",\n    \"data\": {\n        \"_id\": \"6549b47a4717a8e976d580d7\",\n        \"tripsCreated\": [],\n        \"tripsInterested\": [],\n        \"status\": \"active\",\n        \"updatedAt\": \"2023-11-18T08:09:27.460Z\",\n        \"__v\": 0,\n        \"address\": \"Old school road, Javascript Nagar\",\n        \"age\": 10,\n        \"city\": \"MongoDB\",\n        \"country\": \"Web Dev\",\n        \"gender\": \"male\",\n        \"pincode\": 151009,\n        \"state\": \"React\",\n        \"about_yourself\": \"I am a young and passionate developer who loves to explore new technologies and build innovative solutions. Coding is not just my profession; it's my passion. I enjoy reading about the latest trends in web development and spend my free time gaming and experimenting with new coding projects.\",\n        \"birth_place\": \"Coder's Land\",\n        \"hobbies\": [\n            \"coding\",\n            \"reading\",\n            \"gaming\"\n        ],\n        \"language_speak\": [\n            \"JavaScript\",\n            \"Python\",\n            \"HTML\",\n            \"CSS\"\n        ],\n        \"stars\": 5,\n        \"year_of_birth\": 1990\n    }\n}"}],"_postman_id":"5844d82d-0c89-49dc-a790-d70b6d030783"},{"name":"Account","event":[{"listen":"prerequest","script":{"id":"9d790d33-72f7-48e6-8ddb-f245c453ea98","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"9cf196c6-2252-4718-912e-4e5a38d93ba9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"address\": \"Old school road, Javascript Nagar\",\n    \"pincode\": 151009,\n    \"city\": \"MongoDB\",\n    \"state\": \"React\",\n    \"country\": \"Web Dev\",\n    \"age\": 10,\n    \"gender\": \"male\",\n    \"year_of_birth\": 1990,\n    \"language_speak\": [\"JavaScript\", \"Python\", \"HTML\", \"CSS\"],\n    \"birth_place\": \"Coder's Land\",\n    \"hobbies\": [\"coding\", \"reading\", \"gaming\"],\n    \"about_yourself\": \"I am a young and passionate developer who loves to explore new technologies and build innovative solutions. Coding is not just my profession; it's my passion. I enjoy reading about the latest trends in web development and spend my free time gaming and experimenting with new coding projects.\",\n    \"stars\": 5\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/account","description":"<p>This endpoint either creates a new user's account details or updates existing details based on the provided UID.</p>\n<p>Errors:</p>\n<ul>\n<li>500 Internal Server Error: If there's a server-side error during the request.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8000","path":["account"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"49a09aa2-719a-4052-8187-6c361946025e","name":"Account","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"address\": \"Old school road, Javascript Nagar\",\n    \"pincode\": 151009,\n    \"city\": \"MongoDB\",\n    \"state\": \"React\",\n    \"country\": \"Web Dev\",\n    \"age\": 10,\n    \"gender\": \"male\",\n    \"year_of_birth\": 1990,\n    \"language_speak\": [\"JavaScript\", \"Python\", \"HTML\", \"CSS\"],\n    \"birth_place\": \"Coder's Land\",\n    \"hobbies\": [\"coding\", \"reading\", \"gaming\"],\n    \"about_yourself\": \"I am a young and passionate developer who loves to explore new technologies and build innovative solutions. Coding is not just my profession; it's my passion. I enjoy reading about the latest trends in web development and spend my free time gaming and experimenting with new coding projects.\",\n    \"stars\": 5\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/account"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"122"},{"key":"ETag","value":"W/\"7a-u/q0cgcr3GzkvKgg+xSp46uSvU0\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:48:53 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"User Details overwritten\",\n    \"_id\": \"65507d91b5ae7d5131cb6461\",\n    \"detailId\": \"65507d91b5ae7d5131cb645f\"\n}"}],"_postman_id":"9cf196c6-2252-4718-912e-4e5a38d93ba9"},{"name":"Fetch Ongoing Trips","id":"87ff083a-bf0e-4a45-a977-57619fa84877","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/account/658ea2784a11097976658b56/trips/ongoing","urlObject":{"protocol":"http","port":"8000","path":["account","658ea2784a11097976658b56","trips","ongoing"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"87ff083a-bf0e-4a45-a977-57619fa84877"},{"name":"Fetch Interested Trips","id":"3872edf2-feb4-4a56-8723-41b7114ac694","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/account/658ea2784a11097976658b56/trips/interested","urlObject":{"protocol":"http","port":"8000","path":["account","658ea2784a11097976658b56","trips","interested"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3872edf2-feb4-4a56-8723-41b7114ac694"}],"id":"ed9fec07-3b0e-4bde-80df-9bd8c8725ab4","_postman_id":"ed9fec07-3b0e-4bde-80df-9bd8c8725ab4","description":""},{"name":"Trips","item":[{"name":"Create Trip","event":[{"listen":"prerequest","script":{"id":"6313a2bd-ff1e-4268-8ec7-d6ed8e188d5b","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"bc6b10c6-e3e9-4456-825a-278496f82bae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"title\": \"New York City Trip\",\n  \"startDate\": \"2023-01-01\",\n  \"endDate\": \"2023-01-07\",\n  \"description\": \"Exploring the Big Apple\",\n  \"city\": \"New York\",\n  \"state\": \"New York\",\n  \"pincode\": \"10001\",\n  \"itinerary\": [\n    {\n      \"description\": \"Day 1: Times Square\"\n    },\n    {\n      \"description\": \"Day 2: Central Park\",\n      \"amount\": 20\n    },\n    {\n      \"description\": \"Day 3: Statue of Liberty\",\n      \"amount\": 30\n    }\n  ],\n  \"cost\": {\n    \"stay\": 500,\n    \"travel\": 200,\n    \"food\": 150,\n    \"miscellaneous\": 50\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/trips/","urlObject":{"protocol":"http","port":"8000","path":["trips",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"bfe34079-4c98-4db0-ae9e-9aae938ba95e","name":"Create Trip","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"title\": \"New York City Trip\",\n  \"startDate\": \"2023-01-01\",\n  \"endDate\": \"2023-01-07\",\n  \"description\": \"Exploring the Big Apple\",\n  \"city\": \"New York\",\n  \"state\": \"New York\",\n  \"pincode\": \"10001\",\n  \"itinerary\": [\n    {\n      \"description\": \"Day 1: Times Square\",\n      \"amount\": 0\n    },\n    {\n      \"description\": \"Day 2: Central Park\",\n      \"amount\": 20\n    },\n    {\n      \"description\": \"Day 3: Statue of Liberty\",\n      \"amount\": 30\n    }\n  ],\n  \"cost\": {\n    \"stay\": 500,\n    \"travel\": 200,\n    \"food\": 150,\n    \"miscellaneous\": 50\n  }\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/trips/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"110"},{"key":"ETag","value":"W/\"6e-s/s5NqdBw2orGEaLHyKnnP7uHH0\""},{"key":"Date","value":"Thu, 23 Nov 2023 16:03:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"Trip created\",\n    \"_id\": \"655f77c110c3c93b51992f1e\",\n    \"detailId\": \"655f77c110c3c93b51992f1c\"\n}"}],"_postman_id":"bc6b10c6-e3e9-4456-825a-278496f82bae"},{"name":"Delete Trip","event":[{"listen":"prerequest","script":{"id":"ec866861-0d45-470d-b3bb-10ac43d1806c","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"2bbc5e10-a218-49a4-bcc8-2b3f693715a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8000/trips/655f784210c3c93b51992f25","urlObject":{"protocol":"http","port":"8000","path":["trips","655f784210c3c93b51992f25"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"30c75a03-e6d6-4edd-8727-08f0264cda3c","name":"Delete Trip","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:8000/trips/655f784210c3c93b51992f25"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"39"},{"key":"ETag","value":"W/\"27-8smojaWT1FWAXCRq+Scj6xHRqbE\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:49:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 204,\n    \"message\": \"Trip deleted\"\n}"}],"_postman_id":"2bbc5e10-a218-49a4-bcc8-2b3f693715a3"},{"name":"Count Results","id":"834e485e-a853-40c8-a0d5-c2d82e638db3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/trips/results","urlObject":{"protocol":"http","port":"8000","path":["trips","results"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1c51bfb7-ffef-41ef-bd39-8a8f1c4fcb0d","name":"Count Results","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8000/trips/results"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"85"},{"key":"ETag","value":"W/\"55-+pSOFj3GFQ8DJHwOWKSXYMn8q40\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:50:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Trips Results Fetched successfully\",\n    \"data\": {\n        \"tripsCount\": 1\n    }\n}"}],"_postman_id":"834e485e-a853-40c8-a0d5-c2d82e638db3"},{"name":"Fetch Trips","id":"4f76339d-4c1a-4a2b-b4ba-f80036162ccc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"limit","value":"4","description":"<p>Limit per request</p>\n","type":"text","disabled":true},{"key":"page","value":"1","description":"<p>Page of results</p>\n","type":"text"}]},"url":"http://localhost:8000/trips","urlObject":{"protocol":"http","port":"8000","path":["trips"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"291c209a-e1d8-484c-bb78-85bdade1afdf","name":"Fetch Trips","originalRequest":{"method":"GET","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"limit","value":"4","description":"Limit per request","type":"text","disabled":true},{"key":"page","value":"1","description":"Page of results","type":"text"}]},"url":"http://localhost:8000/trips"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"701"},{"key":"ETag","value":"W/\"2bd-kHPCrBsjF3yWYZB8XZwo9yX1/Gc\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:50:57 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Trips fetched successfully\",\n    \"data\": {\n        \"trips\": [\n            {\n                \"_id\": \"655c47af227da2c155be6118\",\n                \"tripDetails\": {\n                    \"_id\": \"655c47af227da2c155be6116\",\n                    \"title\": \"Trip to somewhere\",\n                    \"startDate\": \"2023-10-25T08:00:00.000Z\",\n                    \"endDate\": \"2023-10-30T18:00:00.000Z\",\n                    \"description\": \"Something\",\n                    \"city\": \"New York\",\n                    \"state\": \"NY\",\n                    \"pincode\": \"10001\",\n                    \"itinerary\": \"Day 1: Visit Central Park...\",\n                    \"created_at\": \"2023-11-21T06:01:19.420Z\",\n                    \"updated_at\": \"2023-11-21T06:01:19.420Z\",\n                    \"__v\": 0\n                },\n                \"createdBy\": \"65507d91b5ae7d5131cb6461\",\n                \"tripsInterested\": [\n                    \"65507d91b5ae7d5131cb6461\"\n                ],\n                \"groupSize\": -1,\n                \"peopleGoing\": [],\n                \"views\": 21,\n                \"status\": \"active\",\n                \"created_at\": \"2023-11-21T06:01:19.469Z\",\n                \"updated_at\": \"2023-11-21T06:01:19.469Z\",\n                \"__v\": 0\n            }\n        ]\n    }\n}"}],"_postman_id":"4f76339d-4c1a-4a2b-b4ba-f80036162ccc"},{"name":"Fetch Trip By ID","id":"36ec7407-56a3-4b31-96ef-95d1475b1a95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/trips/655f77c110c3c93b51992f1e","urlObject":{"protocol":"http","port":"8000","path":["trips","655f77c110c3c93b51992f1e"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"ab5bf29d-d3d1-4852-9654-fddfc56c0235","name":"Fetch Trip By ID","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8000/trips/655c47af227da2c155be6118"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"689"},{"key":"ETag","value":"W/\"2b1-wzRKfFrhwOVYI37pkLkhHl5Dc+4\""},{"key":"Date","value":"Thu, 23 Nov 2023 10:51:23 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"Trips fetched successfully\",\n    \"data\": {\n        \"_id\": \"655c47af227da2c155be6118\",\n        \"tripDetails\": {\n            \"_id\": \"655c47af227da2c155be6116\",\n            \"title\": \"Trip to somewhere\",\n            \"startDate\": \"2023-10-25T08:00:00.000Z\",\n            \"endDate\": \"2023-10-30T18:00:00.000Z\",\n            \"description\": \"Something\",\n            \"city\": \"New York\",\n            \"state\": \"NY\",\n            \"pincode\": \"10001\",\n            \"itinerary\": \"Day 1: Visit Central Park...\",\n            \"created_at\": \"2023-11-21T06:01:19.420Z\",\n            \"updated_at\": \"2023-11-21T06:01:19.420Z\",\n            \"__v\": 0\n        },\n        \"createdBy\": \"65507d91b5ae7d5131cb6461\",\n        \"tripsInterested\": [\n            \"65507d91b5ae7d5131cb6461\"\n        ],\n        \"groupSize\": -1,\n        \"peopleGoing\": [],\n        \"views\": 22,\n        \"status\": \"active\",\n        \"created_at\": \"2023-11-21T06:01:19.469Z\",\n        \"updated_at\": \"2023-11-21T06:01:19.469Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"36ec7407-56a3-4b31-96ef-95d1475b1a95"},{"name":"Fetch Trending","id":"20b2eb1e-d615-4bdd-9afc-3cddfeaf175e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/trips/trendingTrips","urlObject":{"protocol":"http","port":"8000","path":["trips","trendingTrips"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"20b2eb1e-d615-4bdd-9afc-3cddfeaf175e"},{"name":"Request Trip","event":[{"listen":"prerequest","script":{"id":"6495800f-a706-4167-9317-3b21e5fda542","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript","packages":{}}}],"id":"fde66d50-9032-44bf-abfe-388d219980f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8000/trips/request-trip/615f3c250c82a6656baf8d48","urlObject":{"protocol":"http","port":"8000","path":["trips","request-trip","615f3c250c82a6656baf8d48"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"aeb8e85f-06c7-452a-9f90-f7adf00545a2","name":"Request Trip Example","originalRequest":{"method":"POST","header":[],"url":"http://localhost:8000/trips/request-trip/615f3c250c82a6656baf8d48"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"122"},{"key":"ETag","value":"W/\"7a-kx6zmek7k7hTxfiVdEWu/IHoioc\""},{"key":"Date","value":"Sun, 31 Mar 2024 16:19:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"Trip requested\",\n    \"requestorId\": \"660900eb9f581b0979ab2c4c\",\n    \"approvorId\": \"615f3c250c82a6656baf8d32\"\n}"}],"_postman_id":"fde66d50-9032-44bf-abfe-388d219980f9"},{"name":"Trip Request Response","event":[{"listen":"prerequest","script":{"id":"6495800f-a706-4167-9317-3b21e5fda542","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript","packages":{}}}],"id":"e3ef59e7-afbc-44c2-9262-adff4148b7f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8000/trips/response-trip-request?tripID=615f3c250c82a6656baf8d48&uid=660900eb9f581b0979ab2c4c&approved=true","urlObject":{"protocol":"http","port":"8000","path":["trips","response-trip-request"],"host":["localhost"],"query":[{"key":"tripID","value":"615f3c250c82a6656baf8d48"},{"key":"uid","value":"660900eb9f581b0979ab2c4c"},{"key":"approved","value":"true"}],"variable":[]}},"response":[{"id":"8297aa1f-d043-4413-9cfc-e4b974472078","name":"Accept Trip Example","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://localhost:8000/trips/accept-trip?tripID=615f3c250c82a6656baf8d48&uid=660900eb9f581b0979ab2c4c&approved=true","protocol":"http","host":["localhost"],"port":"8000","path":["trips","accept-trip"],"query":[{"key":"tripID","value":"615f3c250c82a6656baf8d48"},{"key":"uid","value":"660900eb9f581b0979ab2c4c"},{"key":"approved","value":"true"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"220"},{"key":"ETag","value":"W/\"dc-7lijpi00kxPmFLGiP3kUpcw+z78\""},{"key":"Date","value":"Sun, 31 Mar 2024 16:20:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"615f3c250c82a6656baf8d32 has responded to 660900eb9f581b0979ab2c4c where approved = true\",\n    \"requestorId\": \"660900eb9f581b0979ab2c4c\",\n    \"approvorId\": \"615f3c250c82a6656baf8d32\",\n    \"approvalStatus\": \"true\"\n}"},{"id":"08cb7a35-2bf6-41eb-ba0c-a05763722913","name":"Decline Trip Example","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://localhost:8000/trips/accept-trip?tripID=615f3c250c82a6656baf8d48&uid=660900eb9f581b0979ab2c4c&approved=false","protocol":"http","host":["localhost"],"port":"8000","path":["trips","accept-trip"],"query":[{"key":"tripID","value":"615f3c250c82a6656baf8d48"},{"key":"uid","value":"660900eb9f581b0979ab2c4c"},{"key":"approved","value":"false"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"222"},{"key":"ETag","value":"W/\"de-TuGCSS+CZ8Z2ddR0JfS9/20LwPg\""},{"key":"Date","value":"Sun, 31 Mar 2024 16:21:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"615f3c250c82a6656baf8d32 has responded to 660900eb9f581b0979ab2c4c where approved = false\",\n    \"requestorId\": \"660900eb9f581b0979ab2c4c\",\n    \"approvorId\": \"615f3c250c82a6656baf8d32\",\n    \"approvalStatus\": \"false\"\n}"}],"_postman_id":"e3ef59e7-afbc-44c2-9262-adff4148b7f1"},{"name":"Cancel Trip Request","event":[{"listen":"prerequest","script":{"id":"c23e88ad-f453-4e70-a198-fdcfb649f86c","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript","packages":{}}}],"id":"06c62b2a-4671-4571-b8c9-b08c216a0af8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8000/trips/cancel-trip-request/615f3c250c82a6656baf8d48","urlObject":{"protocol":"http","port":"8000","path":["trips","cancel-trip-request","615f3c250c82a6656baf8d48"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"3d133f6f-f9c1-4a1f-a0ab-7091c16d3c60","name":"Cancel Trip Request Example","originalRequest":{"method":"POST","header":[],"url":"http://localhost:8000/trips/cancel-trip-request/615f3c250c82a6656baf8d48"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"166"},{"key":"ETag","value":"W/\"a6-dl//UN4VEwtwrg4eqp4yKm6/Zgw\""},{"key":"Date","value":"Sat, 06 Apr 2024 06:58:45 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"Trip Request Cancelled\",\n    \"tripId\": \"615f3c250c82a6656baf8d48\",\n    \"requestorId\": \"660900eb9f581b0979ab2c4c\",\n    \"approvorId\": \"615f3c250c82a6656baf8d32\"\n}"}],"_postman_id":"06c62b2a-4671-4571-b8c9-b08c216a0af8"},{"name":"Leave Trip","event":[{"listen":"prerequest","script":{"id":"c23e88ad-f453-4e70-a198-fdcfb649f86c","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript","packages":{}}}],"id":"91f7a4b9-4b95-424a-8d80-10c3337f314f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8000/trips/leave-trip/615f3c250c82a6656baf8d48","urlObject":{"protocol":"http","port":"8000","path":["trips","leave-trip","615f3c250c82a6656baf8d48"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"162dea7b-fbc3-4989-8fe7-1bb73495eba3","name":"Leave Trip Example","originalRequest":{"method":"POST","header":[],"url":"http://localhost:8000/trips/leave-trip/615f3c250c82a6656baf8d48"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"153"},{"key":"ETag","value":"W/\"99-a9cBuA5/CBX5bjM/vOME6j1zG5s\""},{"key":"Date","value":"Sat, 06 Apr 2024 07:00:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 201,\n    \"message\": \"Trip left\",\n    \"tripId\": \"615f3c250c82a6656baf8d48\",\n    \"requestorId\": \"660900eb9f581b0979ab2c4c\",\n    \"approvorId\": \"615f3c250c82a6656baf8d32\"\n}"}],"_postman_id":"91f7a4b9-4b95-424a-8d80-10c3337f314f"}],"id":"4803ee5e-5e36-4e32-b63e-327900e44382","_postman_id":"4803ee5e-5e36-4e32-b63e-327900e44382","description":""},{"name":"Account Image","item":[{"name":"Post Image","event":[{"listen":"prerequest","script":{"id":"e3e4c3c2-be81-40ee-a2e6-6e994d00d9c6","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"b56fe5c5-4d9d-4eab-b67b-ffe78919cd47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/Users/kanavarora/Downloads/WhatsApp Image 2022-05-24 at 4.34.18 PM.jpeg"],"src":"postman-cloud:///1eeaebfe-4abe-4080-9bf6-2683758ba756"}]},"url":"http://localhost:8000/account-image/","urlObject":{"protocol":"http","port":"8000","path":["account-image",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b56fe5c5-4d9d-4eab-b67b-ffe78919cd47"},{"name":"Get Image","id":"5eabc5ce-485a-45ad-98a0-98fbee324187","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/account-image/6549b47b4717a8e976d580d9","urlObject":{"protocol":"http","port":"8000","path":["account-image","6549b47b4717a8e976d580d9"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5eabc5ce-485a-45ad-98a0-98fbee324187"},{"name":"Replace Image","event":[{"listen":"prerequest","script":{"id":"92bab229-ab2c-4215-b02d-12e2110c06d5","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"57d56bd3-b103-4528-826b-9abb27aaf820","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","type":"file","value":null}]},"url":"http://localhost:8000/account-image/","urlObject":{"protocol":"http","port":"8000","path":["account-image",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"57d56bd3-b103-4528-826b-9abb27aaf820"},{"name":"Remove Image","event":[{"listen":"prerequest","script":{"id":"9c155b08-5db8-4160-b398-820079d68aad","exec":["const tokenValue = pm.environment.get(\"token_value\");","const cookieString = `access_token=${tokenValue}; path=/;`;","pm.request.headers.add({","    key: 'Cookie',","    value: cookieString","});"],"type":"text/javascript"}}],"id":"44c3bb0c-4147-429b-8144-9e84b3744d3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8000/account-image/","urlObject":{"protocol":"http","port":"8000","path":["account-image",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"44c3bb0c-4147-429b-8144-9e84b3744d3b"}],"id":"c8f3b4a2-87d0-41fd-8d64-2fbc4060e83c","description":"<p>These routes interact with AWS S3 bucket to store profile images</p>\n","_postman_id":"c8f3b4a2-87d0-41fd-8d64-2fbc4060e83c"}]}