{"info":{"_postman_id":"1e6174e0-d2f2-4469-847e-3d19c0f9a079","name":"Natours","description":"<html><head></head><body><p>Welcome to the Natours API. Here, you will find endpoints for all the resources which are provided by this API, including Authentication, Tours, Reviews, Users &amp; Bookings.</p>\n<ul>\n<li>Make sure to Select the \"Prod Natours\" Environment, before using the API. </li>\n<li>The API is live on Heroku, and using \"Prod Natours\" env, you can get the links to the live API.</li>\n</ul>\n<h1 id=\"support\">Support</h1>\n<ul>\n<li>The Source Code for the API is present on <a href=\"https://github.com/Elemento24/Natours\">Github</a></li>\n<li>For any further queries, feel free to reach me on <a href=\"mailto:mittalvishesh021@gmail.com\">G-Mail</a></li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Support","slug":"support"}],"owner":"10118730","collectionId":"1e6174e0-d2f2-4469-847e-3d19c0f9a079","publishedId":"TVYDdeFM","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-10-22T12:48:57.000Z"},"item":[{"name":"Authentication","item":[{"name":"Sign-Up","event":[{"listen":"test","script":{"id":"9fd2121f-e807-4004-a0f1-23dbd4c38b7a","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"e64c662c-189f-4225-b652-80143409393d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"David Millman\",\n    \"email\": \"david@gmail.com\",\n    \"password\": \"password\",\n    \"passwordConfirm\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/users/signup","description":"<ul>\n<li>Route for Sign-Up</li>\n<li>For Registering a new user into the Database</li>\n<li>The role can only be defined in the DB itself, by default every will be assigned the role of User</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","users","signup"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e64c662c-189f-4225-b652-80143409393d"},{"name":"Login","event":[{"listen":"test","script":{"id":"e0f8d093-2f77-4e8a-8374-dd05e150b7be","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"11d54a83-5e6f-448d-9b29-a1828b8efc4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"david@gamil.com\",\n    \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/users/login","description":"<ul>\n<li>Route For Login</li>\n<li>For allowing a Registered User to access Protected Resources.</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","users","login"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"11d54a83-5e6f-448d-9b29-a1828b8efc4d"},{"name":"Forgot Password","id":"5ce5a6ff-9d0b-47fc-8b3d-41e0337c17eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"david@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/users/forgotPassword","description":"<ul>\n<li>Route for Forgot Password</li>\n<li>User can request for a New Password</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","users","forgotPassword"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5ce5a6ff-9d0b-47fc-8b3d-41e0337c17eb"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"e1cd6fa0-8134-49cd-a3db-691a0edd903b","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"3531dd8f-6303-4012-a3ce-03f7faac8f51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"password\",\n    \"passwordConfirm\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/users/resetPassword/<resetToken>","description":"<ul>\n<li>Route for Reset Password</li>\n<li>User can reset his/her password</li>\n<li>The reset token, will be provided through mail, when the user will hit the Forgot Password route.</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","users","resetPassword","<resetToken>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3531dd8f-6303-4012-a3ce-03f7faac8f51"},{"name":"Update Current User Password","event":[{"listen":"test","script":{"id":"36da67b3-4d2b-4ccd-82ec-134e1a961f45","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"b136e08b-3a7c-4579-a5a2-cabc1cd0be88","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"passwordCurrent\": \"password\",\n    \"password\": \"newPassword\",\n    \"passwordConfirm\": \"newPassword\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/users/updateMyPassword","description":"<ul>\n<li>Route for Updating the Current User's Password</li>\n<li>User can update the password, without having to hit the Forgot Password Route, if he/she remembers the Password</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","updateMyPassword"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b136e08b-3a7c-4579-a5a2-cabc1cd0be88"}],"id":"137f6401-ea1a-42d9-a73d-99363aed9205","description":"<p>This section contains all the API endpoints, regarding Authentication, which includes Sign-Up, Login, Forgot Password, Reset Password &amp; Update Current User Password.</p>\n","_postman_id":"137f6401-ea1a-42d9-a73d-99363aed9205"},{"name":"Tours","item":[{"name":"Get All Tours","id":"dbd725d7-b135-47c2-acd3-1298890728ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/tours","description":"<ul>\n<li>Route for Getting All Tours</li>\n<li>User can get all the tours in the Database</li>\n<li>One can Paginate, Sort as well as Limit the number of results</li>\n<li>One can also query for some particular fields only</li>\n<li>For all the fields, whose values can be compared, comparisons such as GREATER THAN, GREATER THAN/EQUAL TO, LESS THAN, LESS THAN/EQUAL To are supported.</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tours"],"host":["{{URL}}"],"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":"ratingsAverage[gte]","value":"4.7"},{"disabled":true,"key":"price[lt]","value":"1000"},{"disabled":true,"key":"difficulty","value":"easy"},{"disabled":true,"key":"page","value":"1"},{"disabled":true,"key":"sort","value":"-ratingsAverage,price"},{"disabled":true,"key":"fields","value":"name,duration"},{"disabled":true,"key":"limit","value":"5"}],"variable":[]}},"response":[],"_postman_id":"dbd725d7-b135-47c2-acd3-1298890728ff"},{"name":"Get Tour","id":"8d1760f1-3daf-48eb-9828-3279c2111884","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/<tourID>","description":"<ul>\n<li>Route for Getting a Particular Tour</li>\n<li>User can get all the info about a Particular Tour</li>\n<li>The tour ID, needs to be passed as a Query Param</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","<tourID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"8d1760f1-3daf-48eb-9828-3279c2111884"},{"name":"Create New Tour","id":"871b67ea-0902-4621-bff2-d5ea1ff940dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"startLocation\": {\n      \"description\": \"Miami, USA\",\n      \"type\": \"Point\",\n      \"coordinates\": [-80.185942, 25.774772],\n      \"address\": \"301 Biscayne Blvd, Miami, FL 33132, USA\"\n    },\n    \"images\": [\"tour-2-1.jpg\", \"tour-2-2.jpg\", \"tour-2-3.jpg\"],\n    \"startDates\": [\n      \"2021-06-19T09:00:00.000Z\",\n      \"2021-07-20T09:00:00.000Z\",\n      \"2021-08-18T09:00:00.000Z\"\n    ],\n    \"name\": \"The Sea Explorer\",\n    \"duration\": 7,\n    \"maxGroupSize\": 15,\n    \"difficulty\": \"medium\",\n    \"guides\": [\"5c8a22c62f8fb814b56fa18b\", \"5c8a1f4e2f8fb814b56fa185\"],\n    \"price\": 497,\n    \"summary\": \"Exploring the jaw-dropping US east coast by foot and by boat\",\n    \"description\": \"Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\n    \"imageCover\": \"tour-2-cover.jpg\",\n    \"locations\": [\n      {\n        \"_id\": \"5c88fa8cf4afda39709c2959\",\n        \"description\": \"Lummus Park Beach\",\n        \"type\": \"Point\",\n        \"coordinates\": [-80.128473, 25.781842],\n        \"day\": 1\n      },\n      {\n        \"_id\": \"5c88fa8cf4afda39709c2958\",\n        \"description\": \"Islamorada\",\n        \"type\": \"Point\",\n        \"coordinates\": [-80.647885, 24.909047],\n        \"day\": 2\n      }\n    ]\n  }","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/tours","description":"<ul>\n<li>Route for Creating a New Tour, in the DB</li>\n<li>Information such as Start Location, Images, Start Dates, Name, Duration, Max Group Size, Difficulty, Guides IDs, Price, Summary, Description, Cover Image, Locations need to be passed</li>\n<li>For Admins &amp; Lead Guides</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","tours"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"871b67ea-0902-4621-bff2-d5ea1ff940dd"},{"name":"Update Tour","id":"f7bc8669-c2bb-4fc0-ad3a-824d035bdaca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"price","type":"text","value":"997"}]},"url":"{{URL}}/api/v1/tours/<tourID>","description":"<ul>\n<li>Route for Updating a Tour</li>\n<li>One can update a tour, by passing the Updated Information only</li>\n<li>The tour ID needs to be passed as a Query Param</li>\n<li>For Admins &amp; Lead Guides</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","<tourID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f7bc8669-c2bb-4fc0-ad3a-824d035bdaca"},{"name":"Delete Tour","id":"d7fc77b2-43cd-4aad-8520-bc2db44d71f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/v1/tours/<tourID>","description":"<ul>\n<li>Route for Deleting a Tour</li>\n<li>One can delete a Tour</li>\n<li>The tour ID needs to be passed as a Query Param</li>\n<li>For Admins &amp; Lead Guides</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","<tourID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7fc77b2-43cd-4aad-8520-bc2db44d71f6"},{"name":"Get Top 5 Cheap Tours","id":"468d2a5a-672f-40f3-8aff-ec47ad7a670a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/top-5-cheap","description":"<ul>\n<li>A Special Route, for a Specific Purpose, that is for Getting top 5 Cheap Tours</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","top-5-cheap"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"468d2a5a-672f-40f3-8aff-ec47ad7a670a"},{"name":"Get Tour Stats","id":"7bc47709-1b11-4468-9dba-d9160c918bc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/tour-stats","description":"<ul>\n<li>A Special Route, for a Specific Purpose, that is for Getting Tour Stats</li>\n<li>The User can get certain info like, number of Tours, number of Ratings, average Rating and much more</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","tour-stats"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7bc47709-1b11-4468-9dba-d9160c918bc6"},{"name":"Get Monthly Plan","id":"da9117d1-4f3c-45bd-8687-64885d64c28b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/monthly-plan/<year>","description":"<ul>\n<li>A Special Route, for a Specific Purpose, that is for Getting Monthly Plan for a Year</li>\n<li>The User can get info like which is the busiest month of the year, least busiest and much more</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","monthly-plan","<year>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"da9117d1-4f3c-45bd-8687-64885d64c28b"},{"name":"Get Tours Within Radius","id":"892bcd98-e482-4e7b-861f-8f78bcfab9f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/tours-within/<distance>/center/<lat>,<lng>/unit/<unit>","description":"<ul>\n<li>A Special Route, for a Specific Purpose, that is for Getting all the Tours within a Certain Radius</li>\n<li>The User can get all tours, within a certain radius. Accepted Units are Mile and Kilometers</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","tours-within","<distance>","center","<lat>,<lng>","unit","<unit>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"892bcd98-e482-4e7b-861f-8f78bcfab9f3"},{"name":"Get Distances to Tours from Point","id":"94abe8b5-1d0b-43b4-a80f-bc32939c307b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/distances/<lat>,<lng>/unit/<unit>","description":"<ul>\n<li>A Special Route, for a Specific Purpose, that is for Getting all the Tours' Distances from a Point</li>\n<li>The User can get distances of all the Tours, from a Particular Point</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","distances","<lat>,<lng>","unit","<unit>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"94abe8b5-1d0b-43b4-a80f-bc32939c307b"}],"id":"26b59910-0bc0-45fc-93d0-0f589e6015f9","description":"<p>This section contains all the API endpoints, regarding Tours, which includes Get All Tours, Get Tour, Create New Tour, Update Tour, Delete Tour, Get Top 5 Cheap Tours, Get Tour Stats, Get Monthly Plan, Get Tours Within Radius, Get Distances to Tours from Point.</p>\n","event":[{"listen":"prerequest","script":{"id":"c548e0e0-0dc9-4154-b91c-b67ff5b16a46","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"55002221-df2e-4c31-b101-2ef8faff9b41","type":"text/javascript","exec":[""]}}],"_postman_id":"26b59910-0bc0-45fc-93d0-0f589e6015f9"},{"name":"Reviews","item":[{"name":"Get All Reviews","id":"5c2663a9-c6e7-4518-81e3-0ee3f2c7b302","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/reviews/?rating=4","description":"<ul>\n<li>Route for Getting All Reviews</li>\n<li>User can get all the reviews in the Database</li>\n<li>One can query the Reviews, just like All Tours</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","reviews",""],"host":["{{URL}}"],"query":[{"key":"rating","value":"4"}],"variable":[]}},"response":[],"_postman_id":"5c2663a9-c6e7-4518-81e3-0ee3f2c7b302"},{"name":"Get Review","id":"4a2e89b6-9850-4b0b-96de-065a677701cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/reviews/<reviewID>","description":"<ul>\n<li>Route for Getting a particular Review</li>\n<li>User can get any Review from the Database</li>\n<li>The review ID needs to be passed as a Query Param</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","reviews","<reviewID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4a2e89b6-9850-4b0b-96de-065a677701cf"},{"name":"Create New Review","id":"bf60767a-f2c8-48b9-8cb5-af48addc5897","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"Awesome Tour\",\n    \"rating\": 4\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/reviews/<reviewID>","description":"<ul>\n<li>Route for Creating a New Review</li>\n<li>Information such as Review &amp; Rating needs to be passed</li>\n<li>For Users only</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","reviews","<reviewID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bf60767a-f2c8-48b9-8cb5-af48addc5897"},{"name":"Update Review","id":"30d4a6ff-8342-43d2-a0cc-65012d5a4599","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\": 3\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/reviews/<reviewID>","description":"<ul>\n<li>Route for Updating a Review</li>\n<li>One can update a review, by passing the Updated Information only</li>\n<li>The review ID needs to be passed as a Query Param</li>\n<li>For Admins &amp; Users</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","reviews","<reviewID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"30d4a6ff-8342-43d2-a0cc-65012d5a4599"},{"name":"Delete Review","id":"dfd243eb-a15d-4138-829c-69a9da5883f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/v1/reviews/<reviewID>","description":"<ul>\n<li>Route for Deleting a Review</li>\n<li>One can delete a Review</li>\n<li>The review ID needs to be passed as a Query Param</li>\n<li>For Admins &amp; Lead Guides</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","reviews","<reviewID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"dfd243eb-a15d-4138-829c-69a9da5883f6"}],"id":"22f529a2-9046-425a-9e2b-332dc2a90c25","description":"<p>This section contains all the API endpoints, regarding Reviews, which includes Get All Reviews, Get Review, Create New Review, Update Review, Delete Review</p>\n","_postman_id":"22f529a2-9046-425a-9e2b-332dc2a90c25"},{"name":"Tours/Reviews","item":[{"name":"Create New Review on Tour","id":"34160530-529f-4bb5-8382-b88271c91b8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"review\": \"Wonderful\",\n    \"rating\": 4\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/tours/<tourID>/reviews","description":"<ul>\n<li>Route for Creating a New Review on a Tour</li>\n<li>Information such as Review &amp; Rating needs to be passed</li>\n<li>For Users only</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","<tourID>","reviews"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"34160530-529f-4bb5-8382-b88271c91b8d"},{"name":"Get All Reviews on Tour","id":"4c950a6d-e206-4589-8336-a0ea1612748c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/tours/<tourID>/reviews","description":"<ul>\n<li>Route for Getting All Reviews on a Tour</li>\n<li>One can query the Reviews, just like All Tours</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","tours","<tourID>","reviews"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c950a6d-e206-4589-8336-a0ea1612748c"}],"id":"46167466-407f-4a8c-90b1-6d583a1d9b96","description":"<p>This section contains all the API endpoints, regarding Reviews for a particular Tour, which includes Create a New Review on a Tour and Get All Reviews on a Tour</p>\n","_postman_id":"46167466-407f-4a8c-90b1-6d583a1d9b96"},{"name":"Users","item":[{"name":"Get All Users","id":"ea444f22-f151-4772-9d3c-7d5ad88e0bcb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/users","description":"<ul>\n<li>Route for Getting All Users</li>\n<li>User can get all the users in the Database</li>\n<li>One can query the Users, just like All Tours</li>\n<li>For Admins only</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users"],"host":["{{URL}}"],"query":[{"disabled":true,"key":"role","value":"user"}],"variable":[]}},"response":[],"_postman_id":"ea444f22-f151-4772-9d3c-7d5ad88e0bcb"},{"name":"Get User","id":"a21984f7-c06f-4283-bc95-2b522483a41f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/users/<userID>","description":"<ul>\n<li>Route for Getting a particular User</li>\n<li>User can get info about a particular User from the Database</li>\n<li>The user ID needs to be passed as a Query Param</li>\n<li>For Admins only</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","<userID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a21984f7-c06f-4283-bc95-2b522483a41f"},{"name":"Update User","id":"d0e772d3-a9d6-458e-a7c6-ff6a9f02bad0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Jonas\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/users/<userID>","description":"<ul>\n<li>Route for Updating a User</li>\n<li>One can update a user, by passing the Updated Information only</li>\n<li>The user ID needs to be passed as a Query Param</li>\n<li>Not to be used for Updating the Password</li>\n<li>For Admins only</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","<userID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0e772d3-a9d6-458e-a7c6-ff6a9f02bad0"},{"name":"Delete User (Admin)","id":"130128ce-40ad-404c-b66a-1cf9279bdf0c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/v1/users/<userID>","description":"<ul>\n<li>Route for Deleting a User</li>\n<li>One can delete a User</li>\n<li>The user ID needs to be passed as a Query Param</li>\n<li>For Admins only</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","<userID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"130128ce-40ad-404c-b66a-1cf9279bdf0c"},{"name":"Get Current User","id":"cee6a6bc-eb33-4eb7-98d7-c4d9f0bc2166","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/users/me","description":"<ul>\n<li>Route for Getting the current User</li>\n<li>User can get info about him/her</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","me"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cee6a6bc-eb33-4eb7-98d7-c4d9f0bc2166"},{"name":"Update Current User","id":"bc02590c-7873-4546-8a72-addbc742576a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"name","value":"Leo P. Gillespie","type":"text","disabled":true},{"key":"photo","type":"file","src":"/home/elemento/Elemento/WebDev/Udemy/NodeJS/(13)Adv/dev-data/img/aarav.jpg"}]},"url":"{{URL}}/api/v1/users/updateMe","description":"<ul>\n<li>Route for Updating the current User</li>\n<li>User can update his/her info</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","updateMe"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc02590c-7873-4546-8a72-addbc742576a"},{"name":"Delete Current User","id":"66a68bab-d61b-41e3-9738-a816f1dbb318","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/v1/users/deleteMe","description":"<ul>\n<li>Route for Deleting the current User</li>\n<li>User can delete his/her account</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","users","deleteMe"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"66a68bab-d61b-41e3-9738-a816f1dbb318"}],"id":"2523eb02-6ec6-47a4-91da-35b15623063a","description":"<p>This section contains all the API endpoints, regarding Users, which includes Get All Users, Get User, Update User, Delete User, Get Current User, Update Current User, Delete Current User</p>\n","_postman_id":"2523eb02-6ec6-47a4-91da-35b15623063a"},{"name":"Bookings","item":[{"name":"Get All Bookings","id":"13fc1077-7b51-4568-bcfd-31c31e02be4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/bookings","description":"<ul>\n<li>Route for Getting All Bookings</li>\n<li>User can get all the bookings in the Database</li>\n<li>One can query the Bookings, just like All Tours</li>\n<li>For Admins &amp; Lead guides</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","bookings"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"13fc1077-7b51-4568-bcfd-31c31e02be4e"},{"name":"Get Checkout Session","id":"e661af6c-8329-4cd7-b322-945b8f375328","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/bookings/checkout-session/<tourID>","description":"<ul>\n<li>Route for Getting a Stripe Checkout Session</li>\n<li>User can get a Checkout Session, using which the payment is completed</li>\n<li>The tour ID needs to be passed as a Query Param</li>\n<li>For Users, Guides, Lead Guides, Admins</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","bookings","checkout-session","<tourID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e661af6c-8329-4cd7-b322-945b8f375328"},{"name":"Get One Booking","id":"9ca5a912-55d4-4f90-9739-b2bcc14f0161","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/bookings/<bookingID>","description":"<ul>\n<li>Route for Getting a particular Booking</li>\n<li>User can get info about a particular Booking from the Database</li>\n<li>The booking ID needs to be passed as a Query Param</li>\n<li>For Admins &amp; Lead Guides</li>\n<li>Private Route, Need to be Logged In</li>\n</ul>\n","urlObject":{"path":["api","v1","bookings","<bookingID>"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9ca5a912-55d4-4f90-9739-b2bcc14f0161"}],"id":"3848e061-b562-4520-9db0-7f6bb1b032c3","description":"<p>This section contains all the API endpoints, regarding Bookings, which includes Get All Bookings, Get Checkout Session, Get One Booking</p>\n","_postman_id":"3848e061-b562-4520-9db0-7f6bb1b032c3"},{"name":"Error Handling for Undefined Routes","id":"1777d2a3-18e2-4d66-ae42-dd33667d137c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/tour","description":"<ul>\n<li>Route for Error Handling</li>\n<li>Public Route, Accessible to All</li>\n</ul>\n","urlObject":{"path":["api","v1","tour"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1777d2a3-18e2-4d66-ae42-dd33667d137c"}],"event":[{"listen":"prerequest","script":{"id":"18613cd9-e8f5-4737-aa3d-dc936a73db16","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"db037db7-9e34-4722-8725-840f74367b9f","type":"text/javascript","exec":[""]}}]}