{"info":{"_postman_id":"7c95616d-328a-4b5f-84e4-435c38aa0436","name":"Tours","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"5543095","collectionId":"7c95616d-328a-4b5f-84e4-435c38aa0436","publishedId":"SVYwLGNW","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-08-13T21:45:13.000Z"},"item":[{"name":"Tours","item":[{"name":"Get Tours","id":"0026c02e-0a0d-4452-abf1-be6ce568410f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours","description":"<p>Use this endpoint to retrieve all tours.</p>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"0026c02e-0a0d-4452-abf1-be6ce568410f"},{"name":"Create Tour","id":"77d3972a-11ba-4e49-8b57-69c9ef1d6618","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    \"name\": \"Test Tour12\",\n    \"duration\": 5,\n    \"maxGroupSize\": 25,\n    \"difficulty\": \"easy\",\n    \"price\": 397,\n    \"ratingsAvg\": 4.5,\n    \"summary\": \"Breathtaking hike through the Canadian Banff National Park\"\n}"},"url":"{{URL}}api/v1/tours","description":"<p>Endpoint to create a new tour.</p>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"77d3972a-11ba-4e49-8b57-69c9ef1d6618"},{"name":"Get Tour","id":"8a18d20d-a661-4e91-9750-fe4471bb29e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5d","description":"<p>Retrieve a tour based off a tour id.</p>\n","urlObject":{"path":["v1","tours","5d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8a18d20d-a661-4e91-9750-fe4471bb29e0"},{"name":"Update Tour","id":"2eee1fa5-66b4-44ef-a9d2-69373d3199b3","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\"rating\": \"3.9\"\n}"},"url":"{{URL}}api/v1/tours/5d470018e8ecc2972b56dd40","description":"<p>Update a tour based off of a tour id. </p>\n","urlObject":{"path":["v1","tours","5d470018e8ecc2972b56dd40"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2eee1fa5-66b4-44ef-a9d2-69373d3199b3"},{"name":"Delete Tour","id":"ddeb33e3-e4fb-4e76-b74c-a036f44004ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/","description":"<p>Delete tour based off of a tour id.</p>\n","urlObject":{"path":["v1","tours",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ddeb33e3-e4fb-4e76-b74c-a036f44004ad"},{"name":"Top 5 Cheap","id":"7f612d33-5466-4383-9776-08d7a6b12b19","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/","description":"<p>Retrieve the top 5 cheapest tours.</p>\n","urlObject":{"path":["v1","tours",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7f612d33-5466-4383-9776-08d7a6b12b19"},{"name":"Tour Stats","id":"c866001c-0713-4feb-b6cf-204b16c3a398","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":"<p>Retrieve the tour stats. </p>\n","urlObject":{"path":["v1","tours","tour-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c866001c-0713-4feb-b6cf-204b16c3a398"},{"name":"Monthly Plan","id":"8b832cae-febd-494a-923f-8a33de5cef39","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/","description":"<p>Retrieve the montly plan for upcoming tours. </p>\n","urlObject":{"path":["v1","tours","monthly-plan",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8b832cae-febd-494a-923f-8a33de5cef39"}],"id":"c125f197-65f8-4746-9c0d-dbd07ecdc08b","description":"<p>You can get all tours, create, update, delete, and retrieve all tours. </p>\n","event":[{"listen":"prerequest","script":{"id":"e02e4580-b0c5-4ef4-8d4b-ed5ec4bc918e","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5aef39bc-dd42-4f54-b212-d712647f98c3","type":"text/javascript","exec":[""]}}],"_postman_id":"c125f197-65f8-4746-9c0d-dbd07ecdc08b"},{"name":"Users","item":[{"name":"Update User","id":"6796f92f-c090-4e13-b182-8638cd3e5e4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"url":"{{URL}}api/v1/users/3","description":"<p>Update user based on user id.</p>\n","urlObject":{"path":["v1","users","3"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6796f92f-c090-4e13-b182-8638cd3e5e4a"},{"name":"Get User","id":"6228ff99-34a7-44d3-a41a-dfd449cc48b9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/","urlObject":{"path":["v1","users",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6228ff99-34a7-44d3-a41a-dfd449cc48b9"},{"name":"Get Users","id":"2895e7cb-59b1-4ec8-81d5-bd689a74e62c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users","description":"<p>Retrieve all users. </p>\n","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2895e7cb-59b1-4ec8-81d5-bd689a74e62c"},{"name":"Delete User","id":"2dfe1959-b962-4994-b548-8090d747398f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/3","description":"<p>Delete a speciffic user and set status to inactive. </p>\n","urlObject":{"path":["v1","users","3"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2dfe1959-b962-4994-b548-8090d747398f"},{"name":"Update Me","id":"424ac1de-f6f4-471e-b09e-5d0b09020f8e","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\"password\": \"jf\"\n}"},"url":"{{URL}}api/v1/users/updateMe","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"424ac1de-f6f4-471e-b09e-5d0b09020f8e"},{"name":"Delete Me","id":"760099ae-d0c7-4c26-a299-b7beaf182daf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/updateMe","description":"<p>Delete current user.</p>\n","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"760099ae-d0c7-4c26-a299-b7beaf182daf"},{"name":"Get Current User","id":"0d828150-3934-4f66-907b-fa250ab1cfdc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"","description":"<p>Retrieve current user information. </p>\n","urlObject":{"query":[],"variable":[]}},"response":[],"_postman_id":"0d828150-3934-4f66-907b-fa250ab1cfdc"}],"id":"a8870ff1-f025-4f59-9d4f-3d79e51d2887","description":"<p>Enpoints related to users.</p>\n","event":[{"listen":"prerequest","script":{"id":"c1274a41-649e-4cd8-9f01-dea0afed08c0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"032413ba-3be5-4889-907b-107c0f8695df","type":"text/javascript","exec":[""]}}],"_postman_id":"a8870ff1-f025-4f59-9d4f-3d79e51d2887"},{"name":"Authentication","item":[{"name":"Forgot Password","id":"87225790-8bc5-4063-9f5b-b0a62602afa4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{URL}}api/v1/users/forgotPassword","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"87225790-8bc5-4063-9f5b-b0a62602afa4"},{"name":"Update Password","event":[{"listen":"test","script":{"id":"fec59463-6a0e-43aa-9825-bf0e47da889f","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"8ae58904-5759-4626-80b6-030be46f7140","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"{{URL}}api/v1/users/updateMyPassword","description":"<p>Update a users password.</p>\n","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8ae58904-5759-4626-80b6-030be46f7140"},{"name":"Login","event":[{"listen":"test","script":{"id":"93247b03-6395-4bb9-a066-26fbdeebec3c","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"e3500c97-fa2c-4f2d-b622-3bf1f8f744b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\t\"email\": \"admin@natours.io\",\n\t\t\"password\" : \"{{pass}}\"\n}"},"url":"{{URL}}api/v1/users/login","description":"<p>Login with username and password</p>\n","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e3500c97-fa2c-4f2d-b622-3bf1f8f744b5"},{"name":"Signup","event":[{"listen":"test","script":{"id":"519a5cb0-f930-462b-b1b6-81219cc6bd25","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"90bd0ecb-f8d6-4bdf-b9e1-b7a9fde58419","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"andrew\",\n\t\"email\": \"andrew@gmail.com\",\n\t\"password\": \"hello12345\",\n\t\"passwordConfirm\": \"hello12345\",\n\t\"role\": \"guide\"\n\t\n}"},"url":"{{URL}}api/v1/users/signup","description":"<p>Signup a user.</p>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"90bd0ecb-f8d6-4bdf-b9e1-b7a9fde58419"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"4de5d2e0-4939-4571-9afd-e8772af8cf18","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"05ca8b2b-7963-4672-88a1-de7845415502","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"password\": \"newpass123\",\n    \"passwordConfirm\":\"newpass123\"\n}"},"url":"{{URL}}api/v1/users/resetPassword/2b2a075c18383959ff349b6b27f9cbf8291b9956d125e185a59069814982b83b","description":"<p>Reset a user's password.</p>\n","urlObject":{"path":["v1","users","resetPassword","2b2a075c18383959ff349b6b27f9cbf8291b9956d125e185a59069814982b83b"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"05ca8b2b-7963-4672-88a1-de7845415502"}],"id":"899cd181-d4ee-41a6-95e5-b4f3b33507f4","_postman_id":"899cd181-d4ee-41a6-95e5-b4f3b33507f4","description":""},{"name":"Reviews","item":[{"name":"Get Reviews","id":"289c8fd5-7b4a-4a7f-acc4-334d1fdc1f93","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews","description":"<p>Get all reviews.</p>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"289c8fd5-7b4a-4a7f-acc4-334d1fdc1f93"},{"name":"Create Review","id":"d671da8f-6804-4a07-9456-cf92622f24b7","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\": \"Amazing Tour!!!\",\n\t\"rating\": 3,\n\t\"tour\": \"5c88fa8cf4afda39709c2957\",\n\t\"user\": \"5d50ce8c9d374237e03244b5\"\n}"},"url":"{{URL}}api/v1/reviews","description":"<p>Create a revview</p>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d671da8f-6804-4a07-9456-cf92622f24b7"},{"name":"Create New Review on Tour","id":"ce62db1d-738c-4783-a83f-201cad33ee56","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\": \"Best tour in the world\"\n}"},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2951/reviews","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2951","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ce62db1d-738c-4783-a83f-201cad33ee56"},{"name":"Delete Review","id":"a8fc61db-c65b-4032-923d-072db99822ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/","urlObject":{"path":["v1","reviews",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a8fc61db-c65b-4032-923d-072db99822ce"},{"name":"Update Review","id":"d7d954cc-c0c9-47ac-a4eb-7d372c3fbc4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"url":"{{URL}}api/v1/reviews/","urlObject":{"path":["v1","reviews",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7d954cc-c0c9-47ac-a4eb-7d372c3fbc4f"}],"id":"77ac7b02-d7c6-4523-a830-876ae42e08b0","_postman_id":"77ac7b02-d7c6-4523-a830-876ae42e08b0","description":""}],"event":[{"listen":"prerequest","script":{"id":"9639bf1b-2309-445e-87c2-bf43dd76a487","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"87d8f285-f4fa-476d-b1f4-3921b95d0dfa","type":"text/javascript","exec":[""]}}]}