{"info":{"_postman_id":"7f633a44-3018-2276-584f-8d05effa925a","name":"Natours","description":"<html><head></head><body><p>This API contains endpoints for Tours, Users, Reviews, and Bookings for a fictional tour company called Natours. Please note that {{ URL }} is just an environment variable, to use the actual API simply replace it with <a href=\"https://lgope-natours.onrender.com/\">https://lgope-natours.onrender.com/</a>.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8893042","collectionId":"7f633a44-3018-2276-584f-8d05effa925a","publishedId":"SW7c37V6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-11-23T16:32:13.000Z"},"item":[{"name":"Tours","item":[{"name":"Get All Tours","id":"a3728f07-14dc-1a00-4384-744a467b1a83","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours","description":"<p>Use this endpoint to get all tours list.</p>\n<p>Use this endpoint to get all the tours stored in the database. All tours include their reviews and guides by default.</p>\n<p>Query Features:</p>\n<h2 id=\"1-filtering\">1) FILTERING</h2>\n<p>You can query for any tour property. These are the available operators:</p>\n<p>For example: <code>api/v1/tours/?difficulty=easy&amp;duration[gte]=5</code></p>\n<p>This will return all the tours with a difficulty of easy and duration greater than or equal to 5.</p>\n<h2 id=\"2-sorting\">2) SORTING</h2>\n<p>Use 'sort' and add a comma between the properties you want to sort by. Everything is sorted in ascending order by default. Add a minus sign to sort in descending order.</p>\n<p>For example: <code>api/v1/tours/?sort=-price,ratingsAverage</code></p>\n<p>This will return all tours sorted by the largest price, and if there's a tie it'll display the tours with a lower ratingsAverage first.</p>\n<h2 id=\"3-limit-fields\">3) LIMIT FIELDS</h2>\n<p>You can also choose the tour properties you want to get back (or exclude) by using the 'fields' parameter.</p>\n<p>For example:</p>\n<ul>\n<li><p><code>api/v1/tours/?fields=-startLocation</code>,-ratingsAverage would return all tours without their start location and ratingsAverage.</p>\n</li>\n<li><p><code>api/v1/tours/?fields=name</code> would only return the tour names.</p>\n</li>\n</ul>\n<h2 id=\"4-paginate\">4) PAGINATE</h2>\n<p>This API allows you to organize the results you get from the queries into pages. To do so, just specify the 'page' and 'limit' parameters. Note how you can use 'limit' to set how many results you want to get back.</p>\n<ul>\n<li><p><code>api/v1/tours/?page=1&amp;limit=3</code> would return the first 3 tours.</p>\n</li>\n<li><p><code>api/v1/tours/?page=2&amp;limit=4</code> would only return tours 5-8.</p>\n</li>\n</ul>\n<p>REMEMBER THAT YOU CAN COMBINE ALL THESE FILTERS</p>\n<h3 id=\"all-of-these-features-allow-you-to-perform-really-specific-queries\">All of these features allow you to perform really specific queries.</h3>\n<p>This one, for example, returns the first two tours whose difficulty is easy and the price is less than or equal to 1500 sorted by the smaller price.</p>\n<p><code>api/v1/tours/?difficulty=easy&amp;price[lte]=1500&amp;sort=price&amp;page=1&amp;limit=2</code></p>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"disabled":true,"description":{"content":"<p>Query for tour duration. Supports gte, lte, gt, lt operators.</p>\n","type":"text/plain"},"key":"duration[gte]","value":"7"},{"disabled":true,"key":"sort","value":"price"}],"variable":[]}},"response":[],"_postman_id":"a3728f07-14dc-1a00-4384-744a467b1a83"},{"name":"GET Tour","id":"4b2bec4e-920e-d6ab-0307-86ddc54716ac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5dd9264a26b79670d0810353","urlObject":{"path":["v1","tours","5dd9264a26b79670d0810353"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4b2bec4e-920e-d6ab-0307-86ddc54716ac"},{"name":"Get Tours Within Radius","id":"8469286f-bd95-4961-bb28-fdfa269ae3cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tours-within/200/center/36.111745, -118.113491/unit/mi","description":"<p>Get tours whose <code>startLocation</code> is within a provided radius.</p>\n<p>Given the following route: <code>(/tours-within/:distance/center/:latlng/unit/:unit)</code></p>\n<ul>\n<li><p>Replace <code>:distance</code> with the distance that you want to cover, this will be the radius of your search.</p>\n</li>\n<li><p>Provide the latitude and longitude of your starting point in <code>:latlng</code>, separated by commas.</p>\n</li>\n<li><p>Finally, specify your unit in <code>:unit</code>. The default is km, but you can also say 'mi' for miles. This is the unit of the distance you specified in step 1.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","tours-within","200","center","36.111745, -118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8469286f-bd95-4961-bb28-fdfa269ae3cf"},{"name":"Create New Tours","id":"64e481a6-56e2-6d64-d5ae-a9586aeadcf7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n        \"name\": \"Test Tour Price Two\",\r\n        \"duration\": 1,\r\n        \"maxGroupSize\": 1,\r\n        \"difficulty\": \"easy\",\r\n        \"price\": 200,\r\n        \"summary\": \"Test tour\",\r\n        \"imageCover\": \"tour-3-cover.jpg\",\r\n        \"ratingsAverage\": 4\r\n}"},"url":"{{URL}}api/v1/tours","description":"<p>Create a new tour, these are the required fields that you must send in the body of the request:</p>\n<ul>\n<li><p><code>name</code>: A string with a length of 10-40 characters.</p>\n</li>\n<li><p><code>duration</code>: A number (the number of days the tour lasts).</p>\n</li>\n<li><p><code>maxGroupSize</code>: The maximum number of people that the tour can have.</p>\n</li>\n<li><p><code>difficulty</code>: A string that can be either 'easy', 'medium', or 'difficult'.</p>\n</li>\n<li><p><code>price</code>: The price (in USD).</p>\n</li>\n<li><p><code>summary</code>: A short description of the tour.</p>\n</li>\n<li><p><code>imageCover</code>: The main image of the tour, saved as the name of the file.</p>\n</li>\n<li><p><code>startLocation</code>: An object with many properties describing the location where the tour starts. The coordinates are mandatory.</p>\n</li>\n<li><p><code>locations</code>: An array of objects describing all the locations that you will visit during the tour. The coordinates are mandatory. Note: The coordinates array in both startLocation and locations must be expressed like this: [longitude, latidude]. When specifying latitude and longitude coordinates, the first field, regardless of the field name, must contain the longitude value and the second field, the latitude value.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"64e481a6-56e2-6d64-d5ae-a9586aeadcf7"},{"name":"Update Tour","id":"25f33663-f50e-65f5-1467-7dd9cfd05e3f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"formdata","formdata":[{"key":"imageCover","type":"file","src":"/I:/GitLab/travel-the-world/dev-data/img/new-tour-1.jpg"},{"key":"images","type":"file","src":"/I:/GitLab/travel-the-world/dev-data/img/new-tour-2.jpg"},{"key":"images","type":"file","src":"/I:/GitLab/travel-the-world/dev-data/img/new-tour-3.jpg"},{"key":"images","type":"file","src":"/I:/GitLab/travel-the-world/dev-data/img/new-tour-4.jpg"},{"key":"price","value":"997","type":"text"}]},"url":"{{URL}}api/v1/tours/5ddd6c9cbd0e4847d01c699c","description":"<p>Add the ID of the tour you want to update and pass the new data in the body (select 'raw' and 'JSON' in Postman).</p>\n<p>Note that if you want to update images and image cover, you need to use form data instead of raw in the body, please see this example. By the way, we only accept JPG, JPEG, and GIF images (these are converted to JPEG).</p>\n<p>Also, only users whose roles are admin or lead guide can update tours.</p>\n","urlObject":{"path":["v1","tours","5ddd6c9cbd0e4847d01c699c"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"25f33663-f50e-65f5-1467-7dd9cfd05e3f"},{"name":"Delete Tour","id":"cb159b85-5c43-cbdb-ef43-973f987e40bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c295a","description":"<p>Add the id of the tour that you wish to delete. Expect a 204 No Content status code back and no data.</p>\n<p>Note: Only users whose roles are admin or lead guide can delete tours.</p>\n","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c295a"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb159b85-5c43-cbdb-ef43-973f987e40bc"},{"name":"Get Top 5 Cheap Tours","id":"ba88453b-4207-6045-62e5-ecf4e9535e2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top-5-cheap","urlObject":{"path":["v1","tours","top-5-cheap"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ba88453b-4207-6045-62e5-ecf4e9535e2f"},{"name":"Get Monthly Plan","id":"73df9e70-fe99-0f28-247d-4067cc86dbaa","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{URL}}api/v1/tours/monthly-plan/2021","description":"<p>Get all the tours starting in a given year. You will also see in which month of that year they start, nicely organized.</p>\n<p>Only admins, guides, and lead guides have access to this route.</p>\n","urlObject":{"path":["v1","tours","monthly-plan","2021"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"73df9e70-fe99-0f28-247d-4067cc86dbaa"},{"name":"Get Tour Stats","id":"9a0b63e0-d8d7-e894-3e86-881e70de7877","request":{"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"{{URL}}api/v1/tours/tour-stats","description":"<p>Get tour stats based on their difficulty, like the average rating of all easy tours so you can compare them with the hard and medium ones.</p>\n<p>These are all the properties that you can see stats of:</p>\n<ul>\n<li><p>numTours</p>\n</li>\n<li><p>numRatings</p>\n</li>\n<li><p>avgRating</p>\n</li>\n<li><p>avgPrice</p>\n</li>\n<li><p>minPrice</p>\n</li>\n<li><p>maxPrice</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","tour-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a0b63e0-d8d7-e894-3e86-881e70de7877"},{"name":"Get Distances to Tours From Point","id":"2b9413e9-db57-421b-ab2e-462fd0ce6b29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/distances/36.111745, -118.113491/unit/mi","description":"<p>Get tours in order of nearest to farthest from a specified point. You will also get the distance between them and that specified point.</p>\n<p>Given the following route: <code>(/distances/:latlng/unit/:unit)</code></p>\n<ul>\n<li><p>Replace <code>:distances</code> with the latitude and longitude of the point where you want to start your search.</p>\n</li>\n<li><p>Specify the unit in which you want to get your results in <code>:unit</code>, it can be either 'mi' or 'km', which is the default.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","distances","36.111745, -118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b9413e9-db57-421b-ab2e-462fd0ce6b29"}],"id":"dd058cfa-e733-5a83-ec12-5ebfd0efdd98","description":"<p><strong>You can get all tours, create new ones, and edit and delete tours.</strong> There are also special endpoints for some special requirements.</p>\n<p>This folder contains routes that will allow you to get all tours, get a specific one, delete a tour, create your own (if your user role is admin or lead-guide), update a tour, get its stats and even geospatial data like getting a tour within a specified radius and the distances of all tours from a specific point.</p>\n","event":[{"listen":"prerequest","script":{"id":"8c8a5db7-7b77-4057-b102-32e43feb6b7e","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"66c239c4-639b-4774-b6f2-7af00bfd6632","type":"text/javascript","exec":[""]}}],"_postman_id":"dd058cfa-e733-5a83-ec12-5ebfd0efdd98"},{"name":"Reviews","item":[{"name":"Get All Reviews","id":"61430241-afd4-4bd6-a514-de9cc54659b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"61430241-afd4-4bd6-a514-de9cc54659b2"},{"name":"Get Review","id":"97c6ebe2-fb3a-4a92-a074-07e6ae251989","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/5dd8d2e92ca7cb4ae0e61885","urlObject":{"path":["v1","reviews","5dd8d2e92ca7cb4ae0e61885"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"97c6ebe2-fb3a-4a92-a074-07e6ae251989"},{"name":"Create New Reviews","id":"1521bea4-7845-4092-a818-f7fc8f6c8fa2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"review\": \"Love this tour!!!\",\n\t\"rating\": 5,\n\t\"tour\": \"5c88fa8cf4afda39709c2966\",\n\t\"user\": \"5dcefa873c95650f20a54a2d\"\n}"},"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"1521bea4-7845-4092-a818-f7fc8f6c8fa2"},{"name":"Update Review","id":"35688312-41b8-440b-bf07-7f2c2a4dc034","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"rating\": 5\n}"},"url":"{{URL}}api/v1/reviews/5dd942b83d9f756a5418d40f","urlObject":{"path":["v1","reviews","5dd942b83d9f756a5418d40f"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"35688312-41b8-440b-bf07-7f2c2a4dc034"},{"name":"Delete Review","id":"4416ab60-ec9a-4949-8480-1b4ac1acd42d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/5dd93f290f68966e6c37af71","urlObject":{"path":["v1","reviews","5dd93f290f68966e6c37af71"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4416ab60-ec9a-4949-8480-1b4ac1acd42d"}],"id":"55870844-38eb-4423-adcc-d2c22aa7d777","_postman_id":"55870844-38eb-4423-adcc-d2c22aa7d777","description":""},{"name":"Tours/Reviews","item":[{"name":"Create New Review on Tour","id":"16ebacd1-7a72-41ff-bce0-c66fdb27fb2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"rating\": 5,\n\t\"review\": \"Amazing!!!\"\n}"},"url":"{{URL}}api/v1/tours/5dd9264a26b79670d0810353/reviews","urlObject":{"path":["v1","tours","5dd9264a26b79670d0810353","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"16ebacd1-7a72-41ff-bce0-c66fdb27fb2f"},{"name":"Get All Reviews on Tour","id":"da13bc6d-75db-4300-a9fd-3778cc2f8831","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"rating\": 5,\n\t\"review\": \"Mind blowing\"\n}"},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c296c/reviews","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c296c","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"da13bc6d-75db-4300-a9fd-3778cc2f8831"}],"id":"b5f667b9-9a6a-46b7-b59b-304e216fb3c9","_postman_id":"b5f667b9-9a6a-46b7-b59b-304e216fb3c9","description":""},{"name":"Users","item":[{"name":"Get All Users","id":"fb47d1d3-4b08-28ac-eded-fee3f05e967f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users?role=user","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[{"key":"role","value":"user"}],"variable":[]}},"response":[],"_postman_id":"fb47d1d3-4b08-28ac-eded-fee3f05e967f"},{"name":"Get user","id":"11cfda15-4590-d357-3eb2-23e1bb049b6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/2","description":"<p>Use this endpoint to get all the users stored in the database. Only admins can get all users.</p>\n<h2 id=\"query-features\">Query Features:</h2>\n<h2 id=\"1-filtering\">1) FILTERING</h2>\n<p>You can query for any user property. These are the available operators: gte, ft, lte, lt.</p>\n<p>For example: <code>api/v1/users/?role=guide</code></p>\n<p>This will return all the users whose role is 'guide'.</p>\n<h2 id=\"2-sorting\">2) SORTING</h2>\n<p>Use 'sort' and add a comma between the properties you want to sort by. Everything is sorted in ascending order by default. Add a minus sign to sort in descending order.</p>\n<p>For example: <code>api/v1/users/?sort=name</code></p>\n<p>This will return all users sorted alphabetically by name (from A to Z, to go from Z to A use <code>api/v1/users/?sort=-name</code>).</p>\n<h2 id=\"3-limit-fields\">3) LIMIT FIELDS</h2>\n<p>You can also choose the user properties you want to get back (or exclude) by using the 'fields' parameter.</p>\n<p>For example: <code>api/v1/users/?fields=email</code> would return all users but only displaying their emails.</p>\n<h2 id=\"4-paginate\">4) PAGINATE</h2>\n<p>Organize the users into pages. Just specify the 'page' and 'limit' parameters to suit your taste.</p>\n<p>Note how you can use 'limit' to set how many results you want to get back. Suppose that we have 25 users in total.</p>\n<ul>\n<li><p><code>api/v1/users/?page=3&amp;limit=5</code> would return users 11-15.</p>\n</li>\n<li><p><code>api/v1/users/?page=2&amp;limit=10</code> would return users 11-20.</p>\n</li>\n</ul>\n<h3 id=\"remember-that-you-can-combine-all-these-filters\">REMEMBER THAT YOU CAN COMBINE ALL THESE FILTERS</h3>\n<p>Here's an example combining sorting and pagination. This query returns page 2 with a limit of 2 users alphabetically sorted by their name, so you can expect names starting with 'a' and 'b'.</p>\n<p><code>api/v1/users/?sort=name&amp;page=2&amp;limit=2</code></p>\n","urlObject":{"path":["v1","users","2"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"11cfda15-4590-d357-3eb2-23e1bb049b6b"},{"name":"Update User","id":"a72dda72-d647-4363-801a-0d2db37d48d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Administrator\"\n}"},"url":"{{URL}}api/v1/users/5dd82f0ada711e4f8415d5cd","urlObject":{"path":["v1","users","5dd82f0ada711e4f8415d5cd"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a72dda72-d647-4363-801a-0d2db37d48d5"},{"name":"Delete User","id":"e9aa6b56-bd85-441d-bea8-6ad5d038b7c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/5dd8db9ef0e23762c4f4b2a9","urlObject":{"path":["v1","users","5dd8db9ef0e23762c4f4b2a9"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9aa6b56-bd85-441d-bea8-6ad5d038b7c6"},{"name":"Get Current User","id":"61939700-4b88-4f2b-974c-a077ed2769f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/me","urlObject":{"path":["v1","users","me"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"61939700-4b88-4f2b-974c-a077ed2769f6"},{"name":"Update Current User","id":"47c43411-8dae-41f8-b5b8-e06e2b390597","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Lakshman\",\n\t\"role\": \"admin\"\n}"},"url":"{{URL}}api/v1/users/updateMe","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"47c43411-8dae-41f8-b5b8-e06e2b390597"},{"name":"Delete Current User","id":"417d92fa-185f-48d0-a355-7bf7b62ee02c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/deleteMe","urlObject":{"path":["v1","users","deleteMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"417d92fa-185f-48d0-a355-7bf7b62ee02c"}],"id":"2a094d53-6161-2234-7f11-d72f60fa0568","description":"<p>Users need to sign up in order to purchase tours. This folder will allow you to manage all operations related to users.</p>\n","_postman_id":"2a094d53-6161-2234-7f11-d72f60fa0568"},{"name":"Authentication","item":[{"name":"Sign UP","event":[{"listen":"test","script":{"id":"c8fc26b8-6547-483c-8f74-7c7db8467858","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"37899d81-d989-1e47-9289-9161a6574020","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"LGope1\",\n\t\"email\": \"anythingg@mailsac.com\",\n\t\"password\": \"pass1234\",\n\t\"passwordConfirm\": \"pass1234\"\n}"},"url":"{{URL}}api/v1/users/signup","description":"<p>Sign up providing your name, email, and password. You can set your profile picture later.</p>\n<p>The email must be unique (never used to create an account before). Also, you'll receive a welcome email.</p>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"37899d81-d989-1e47-9289-9161a6574020"},{"name":"Login","event":[{"listen":"test","script":{"id":"badfd0f4-ebfd-4e7a-9aa6-8fae634a9bb3","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"3319cd95-db34-b8a0-ae51-b9ca4547892f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"admin@natours.io\",\n\t\"password\": \"{{password}}\"\n}"},"url":"{{URL}}api/v1/users/login","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3319cd95-db34-b8a0-ae51-b9ca4547892f"},{"name":"Update Current User Password","event":[{"listen":"test","script":{"id":"8bff8996-c08e-421f-b81e-06013957b151","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"82c44ed9-92d1-45b8-aed5-0e60abc3a18e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"passwordCurrent\": \"pass1234\",\n\t\"password\": \"newpassword\",\n\t\"passwordConfirm\": \"newpassword\"\n}"},"url":"{{URL}}api/v1/users/updateMyPassword","description":"<p>Update your password when you still remember it. In order to use this route, you must be logged in.</p>\n<p>Send the following data in the body:</p>\n<ul>\n<li><p><code>passwordCurrent</code>: Your current password, the one you just used to log in.</p>\n</li>\n<li><p><code>password</code>: Your new password.</p>\n</li>\n<li><p><code>passwordConfirm</code>: Confirm your new password.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"82c44ed9-92d1-45b8-aed5-0e60abc3a18e"},{"name":"Forgot Password","id":"504b6474-e755-4716-8be6-9273d843f91f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"test2@natours.io\"\n}"},"url":"{{URL}}api/v1/users/forgotPassword","description":"<p>Send your email in the body of this request as 'raw' and 'JSON'. You'll immediately get an email with a link to reset your password, and it will expire in 10 minutes, so please be quick.</p>\n<p>In order for this one to work, the Postman environment must be set to Prod: Natours.</p>\n","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"504b6474-e755-4716-8be6-9273d843f91f"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"161c3f3e-903e-4127-b2a9-8c96e8e8f522","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"f56290cf-ab41-4ea4-81cb-e4715470bd2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"password\": \"newpassword\",\n\t\"passwordConfirm\": \"newpassword\"\n}"},"url":"{{URL}}api/v1/users/resetPassword/8538466c0894c94b00276fb441579896e8b59854dd42ca3cf74bcf2679f5d159","description":"<p>This is the link that was sent to your email (logically, it's different every time you request to reset your password).</p>\n<p>Submit password and passwordConfirm in the body of the request to reset your password and you'll be logged in automatically.</p>\n<p>If 10 minutes have passed since you requested to reset your password, this link won't work anymore and you'll have to request a new one.</p>\n","urlObject":{"path":["v1","users","resetPassword","8538466c0894c94b00276fb441579896e8b59854dd42ca3cf74bcf2679f5d159"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f56290cf-ab41-4ea4-81cb-e4715470bd2c"}],"id":"077d0bd0-ed61-4e4e-923d-da85c67e448e","_postman_id":"077d0bd0-ed61-4e4e-923d-da85c67e448e","description":""},{"name":"Booking","item":[{"name":"Bookings","id":"4f2c91a3-c6ad-42f1-bd33-48e82e4c74d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/bookings","urlObject":{"path":["v1","bookings"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4f2c91a3-c6ad-42f1-bd33-48e82e4c74d2"},{"name":"Get Booking","id":"ff981803-d1ce-4ed6-8868-af4877c7d737","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/bookings/5c88fa8cf4afda39709c2951","urlObject":{"path":["v1","bookings","5c88fa8cf4afda39709c2951"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ff981803-d1ce-4ed6-8868-af4877c7d737"}],"id":"3738aa6b-69b8-4ede-aeaf-1626110719bc","_postman_id":"3738aa6b-69b8-4ede-aeaf-1626110719bc","description":""}],"event":[{"listen":"prerequest","script":{"id":"3d7da695-7123-46c0-ac02-d8c08d3aef2d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"60429bda-9c35-467e-bada-a83d0b6bca32","type":"text/javascript","exec":[""]}}]}