{"info":{"_postman_id":"66911bfd-557a-4518-84b3-9c8bc55ccb67","name":"Natours","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"20551158","collectionId":"66911bfd-557a-4518-84b3-9c8bc55ccb67","publishedId":"UzQuNQQY","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B33"},"publishDate":"2022-07-14T04:22:52.000Z"},"item":[{"name":"Tours","item":[{"name":"get tour","id":"1299b084-9376-4b23-a134-aab847ad54f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2955"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"1299b084-9376-4b23-a134-aab847ad54f7"},{"name":"Update tour","id":"ae647581-cca0-4c1a-a37a-40e6f83ea99f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"maxGroupSize\":20\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2955"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ae647581-cca0-4c1a-a37a-40e6f83ea99f"},{"name":"get all tours","id":"3e38de38-511a-4bed-b72e-f124eb6594a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"{{URL}}api/v1/tours/","description":"<p>Use this EndPoint to get all Tours</p>\n","urlObject":{"path":["v1","tours",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e38de38-511a-4bed-b72e-f124eb6594a8"},{"name":"Create new Tour","id":"75c91090-72f2-431b-8072-6fe45f3ec477","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"test tour for ratings\",\r\n    \"duration\": 1,\r\n    \"maxGroupSize\": 30,\r\n    \"difficulty\": \"medium\",\r\n    \"price\": 250,\r\n    \"priceDiscount\": 205,\r\n    \"summary\": \"Test tour \",\r\n    \"imageCover\": \"tour-8-cover.jpg\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"75c91090-72f2-431b-8072-6fe45f3ec477"},{"name":"tour-stats","id":"6a52c2e3-9bde-4b7c-a364-d166d069d8fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tour-stats","urlObject":{"path":["v1","tours","tour-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a52c2e3-9bde-4b7c-a364-d166d069d8fc"},{"name":"filtering the tours","id":"6be83ef4-acf1-4a19-8f06-3c09d929aa97","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours?duration[gt]=5&sort=price,-duration&fields=name,duration,price&page=3&limit=3","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"key":"duration[gt]","value":"5"},{"key":"sort","value":"price,-duration"},{"key":"fields","value":"name,duration,price"},{"key":"page","value":"3"},{"key":"limit","value":"3"}],"variable":[]}},"response":[],"_postman_id":"6be83ef4-acf1-4a19-8f06-3c09d929aa97"},{"name":"delete Tour","id":"9dc8c72f-1ee1-4869-a5bf-3897a57e85c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c295a","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c295a"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9dc8c72f-1ee1-4869-a5bf-3897a57e85c9"},{"name":"Top 5 cheap tours","id":"6c7c1145-0c09-48e3-aed9-f076c96fbc96","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top5-cheap","urlObject":{"path":["v1","tours","top5-cheap"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c7c1145-0c09-48e3-aed9-f076c96fbc96"},{"name":"monthly-plans","id":"f059c1c0-6a10-42f0-b4cc-62ef155662d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/monthly-plan/2021","urlObject":{"path":["v1","tours","monthly-plan","2021"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f059c1c0-6a10-42f0-b4cc-62ef155662d0"},{"name":"get Tours Within range","id":"04319be1-b1e3-4d48-97a6-ef4dd20533a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tours-within/1000/center/39.11,-118.389/unit/mi","urlObject":{"path":["v1","tours","tours-within","1000","center","39.11,-118.389","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"04319be1-b1e3-4d48-97a6-ef4dd20533a7"},{"name":"get Distances from position","id":"23a91cb2-e375-4a42-90bf-5a183416ba5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/distances/34.11,-118.11/unit/km","urlObject":{"path":["v1","tours","distances","34.11,-118.11","unit","km"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"23a91cb2-e375-4a42-90bf-5a183416ba5e"}],"id":"a774c8b1-3abd-40b0-ab72-5fe241a6b1db","_postman_id":"a774c8b1-3abd-40b0-ab72-5fe241a6b1db","description":""},{"name":"Users","item":[{"name":"authentication","item":[{"name":"Sign Up","event":[{"listen":"test","script":{"id":"44497b51-c6ba-422c-ad9e-9a8e31b04365","exec":["const token = pm.response.json().token;\r","if (token) pm.environment.set(\"jwt\", token);"],"type":"text/javascript"}}],"id":"e5618343-e8d8-4f0b-9bf4-13c20fe73730","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"your-username\",\r\n    \"email\": \"your-email@example.com\",\r\n    \"password\": \"your-password-goes-here\",\r\n    \"passwordConfirm\": \"your-password-goes-here\",\r\n    \"role\": \"user\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5618343-e8d8-4f0b-9bf4-13c20fe73730"},{"name":"Login","event":[{"listen":"test","script":{"id":"c84a8af2-5a8f-4286-8518-9f7227d8346b","exec":["// const token = pm.response.json().token;\r","// if (token) pm.environment.set(\"jwt\", token);\r","\r","pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"40f909c6-1203-4690-9a5f-eb9b6c1a423c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@natours.io\",\r\n    \"password\": \"{{password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"40f909c6-1203-4690-9a5f-eb9b6c1a423c"},{"name":"forgot Password","id":"d2305974-7c09-4fce-a9bf-7555dbe796ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"your-email@example.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2305974-7c09-4fce-a9bf-7555dbe796ba"},{"name":"reset password","event":[{"listen":"test","script":{"id":"0740a594-c78a-4d09-8240-72ba8d5e561a","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"9174329c-6941-475f-9238-c8d5bd057a89","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"pranav2@email.com\",\r\n    \"password\": \"your-password-goes-here\",\r\n    \"passwordConfirm\": \"your-password-goes-here\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/f574d3b46f62201d022860d07a075389a74808a327fcf4f2498af75833a89977","urlObject":{"path":["v1","users","resetPassword","f574d3b46f62201d022860d07a075389a74808a327fcf4f2498af75833a89977"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9174329c-6941-475f-9238-c8d5bd057a89"},{"name":"update current password","event":[{"listen":"test","script":{"id":"bf2ca538-13f4-494f-926a-db97385f5290","exec":["const token = pm.response.json().token;\r","if (token) pm.environment.set(\"jwt\", token);"],"type":"text/javascript"}}],"id":"66989775-9b7f-48f7-b7fe-92285d3959cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"passwordCurrent\": \"{{password}}\",\r\n    \"password\": \"newPassword2\",\r\n    \"passwordConfirm\": \"newPassword2\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updatePassword","urlObject":{"path":["v1","users","updatePassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"66989775-9b7f-48f7-b7fe-92285d3959cf"}],"id":"68d527f9-884c-4012-a9e8-87ffcfd4b0e0","_postman_id":"68d527f9-884c-4012-a9e8-87ffcfd4b0e0","description":""},{"name":"update my Info","event":[{"listen":"test","script":{"id":"ed815852-3e9d-458d-bf8a-26124f5e8a05","exec":["const token = pm.response.json().token;\r","if (token) pm.environment.set(\"jwt\", token);"],"type":"text/javascript"}}],"id":"c01f7aad-33ac-4a32-a25f-e203e9b2ad67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"role\":\"user\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMyInfo","urlObject":{"path":["v1","users","updateMyInfo"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c01f7aad-33ac-4a32-a25f-e203e9b2ad67"},{"name":"get all users","id":"bdd26b89-4f49-4812-87a4-9308574ddeb4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"{{URL}}api/v1/users","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"bdd26b89-4f49-4812-87a4-9308574ddeb4"},{"name":"delete My Account","id":"f318870b-2185-4e2f-943a-98e1e385c749","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/deleteMyAccount","urlObject":{"path":["v1","users","deleteMyAccount"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f318870b-2185-4e2f-943a-98e1e385c749"},{"name":"delete User","id":"a7689462-49fe-4672-9443-86aefcfaad42","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/5c8a24a02f8fb814b56fa193","urlObject":{"path":["v1","users","5c8a24a02f8fb814b56fa193"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7689462-49fe-4672-9443-86aefcfaad42"},{"name":"update User","id":"098e7b44-b700-418b-ad08-4a7ec74f3aab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n     \"name\": \"Pranav Pratap Singh\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/62c81507b1cf8917e8297c60","urlObject":{"path":["v1","users","62c81507b1cf8917e8297c60"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"098e7b44-b700-418b-ad08-4a7ec74f3aab"},{"name":"get User","id":"a50eae41-e850-4c31-95f9-e3f228aa126e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/users/62c81507b1cf8917e8297c60","urlObject":{"path":["v1","users","62c81507b1cf8917e8297c60"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a50eae41-e850-4c31-95f9-e3f228aa126e"},{"name":"get current User data","id":"2ef05ad2-5bc5-4c7b-88af-bd717621fbbf","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":"2ef05ad2-5bc5-4c7b-88af-bd717621fbbf"}],"id":"8a8337be-5b5b-4143-a44d-081cc0098e59","_postman_id":"8a8337be-5b5b-4143-a44d-081cc0098e59","description":""},{"name":"Reviews","item":[{"name":"get All Reviews","id":"5fbd1c16-d424-49fd-9baf-f44fdb6c8686","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":"5fbd1c16-d424-49fd-9baf-f44fdb6c8686"},{"name":"Add new Review","id":"a6b3c12b-a499-4151-815e-0ea5ec887c3a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"review\": \"response for tour\",\r\n    \"rating\": \"1\",\r\n    \"tour\": \"62ca6519f4f5433e745a8efc\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a6b3c12b-a499-4151-815e-0ea5ec887c3a"},{"name":"get Review","id":"19533073-aae7-4275-87fa-e62dc886c539","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/62cc16037d2de05330c59339","urlObject":{"path":["v1","reviews","62cc16037d2de05330c59339"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"19533073-aae7-4275-87fa-e62dc886c539"},{"name":"delete Review","id":"e262ece6-0d81-4301-aedd-5e651449ac69","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/62cc0fdd674f8045384cd162","urlObject":{"path":["v1","reviews","62cc0fdd674f8045384cd162"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e262ece6-0d81-4301-aedd-5e651449ac69"},{"name":"update Review","id":"87aac445-e22b-4d6c-b608-a09d99bd5673","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"review\": \"OK\",\r\n    \"rating\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/62cc16037d2de05330c59339","urlObject":{"path":["v1","reviews","62cc16037d2de05330c59339"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"87aac445-e22b-4d6c-b608-a09d99bd5673"}],"id":"d87fae00-081e-49aa-ade5-676d9461238f","_postman_id":"d87fae00-081e-49aa-ade5-676d9461238f","description":""},{"name":"Tour/review","item":[{"name":"add review for given Tour","id":"c2585df1-245d-4886-82df-9de6e011e9a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"review\":\"COOL!!\",\r\n    \"rating\" :\"5\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/62cbf0870755b805d8dcecea/review","urlObject":{"path":["v1","tours","62cbf0870755b805d8dcecea","review"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c2585df1-245d-4886-82df-9de6e011e9a7"},{"name":"get all review with given Tour","id":"c2bc7d8c-cdcd-4247-8e55-eeffd9927e19","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955/review","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2955","review"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c2bc7d8c-cdcd-4247-8e55-eeffd9927e19"}],"id":"5629f4ba-0148-44e7-9b8d-4e67448c4a5b","_postman_id":"5629f4ba-0148-44e7-9b8d-4e67448c4a5b","description":""}]}