{"info":{"_postman_id":"5a038e16-7a47-47cd-b2bb-28bb7dab4751","name":"Natours","description":"<html><head></head><body><p>Natours API contains endpoints for Tours, Users, Reviews.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19081492","collectionId":"5a038e16-7a47-47cd-b2bb-28bb7dab4751","publishedId":"UzJFudfi","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-07-03T11:56:02.000Z"},"item":[{"name":"Tours","item":[{"name":"Get all tours","id":"92e65df5-b774-4a62-a74b-0e64a501f4a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"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":[{"disabled":true,"key":"sort","value":"1"},{"disabled":true,"key":"limit","value":"10"},{"disabled":true,"key":"page","value":"2"}],"variable":[]}},"response":[],"_postman_id":"92e65df5-b774-4a62-a74b-0e64a501f4a2"},{"name":"Get tour","id":"7aff9431-3755-46a2-8be1-c898fd412887","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2974","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2974"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7aff9431-3755-46a2-8be1-c898fd412887"},{"name":"Create new tour","id":"08e9a1cb-f2eb-4af5-862b-92df59512b64","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\": \"yet another tour!!!\",\r\n    \"maxGroupSize\": 1,\r\n    \"duration\": 1,\r\n    \"difficulty\": \"easy\",\r\n    \"price\": 260,\r\n    \"summary\": \"Test tour pre\",\r\n    \"imageCover\": \"tour-3-cover.jpg\",\r\n    \"ratingsAverage\": 4,\r\n    \"guides\": [\r\n        \"62b4f12b1d208c92d2a63412\",\r\n        \"62b4f13b1d208c92d2a63414\"\r\n    ] \r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"08e9a1cb-f2eb-4af5-862b-92df59512b64"},{"name":"Update Tour","id":"d8317ef0-1604-4890-a785-7e3e62399b70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"duration\": 15,\r\n    \"price\": 2500\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/tours/62ab80b63173046a57a2af9e","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tours","62ab80b63173046a57a2af9e"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d8317ef0-1604-4890-a785-7e3e62399b70"},{"name":"Delete tour","id":"4579aaa3-ef90-435b-80ed-685a9df8a7f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":"{{URL}}api/v1/tours/62ba21c52373d9abaaf0edb7","urlObject":{"path":["v1","tours","62ba21c52373d9abaaf0edb7"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4579aaa3-ef90-435b-80ed-685a9df8a7f2"},{"name":"Get Top 5 cheap tours","id":"d201419f-fdf9-4a76-b0e7-df01fcda33c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"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":"d201419f-fdf9-4a76-b0e7-df01fcda33c5"},{"name":"Get Tour Stats","id":"35d0c2fe-a134-4fe5-8f6d-fbab05cf1862","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tours-stats","urlObject":{"path":["v1","tours","tours-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"35d0c2fe-a134-4fe5-8f6d-fbab05cf1862"},{"name":"Get Monthly Plan","id":"01eb9343-79bc-4010-a444-79460af3a9f5","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/2021","urlObject":{"path":["v1","tours","monthly-plan","2021"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"01eb9343-79bc-4010-a444-79460af3a9f5"},{"name":"Error routes","id":"b73d4b82-7e6a-45d0-9055-f207a1cc1b02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/tours","urlObject":{"path":["tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b73d4b82-7e6a-45d0-9055-f207a1cc1b02"},{"name":"Get Tours within a radius","id":"e95e8b5f-9c31-4492-ab2d-7b6612bc836f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tours-within/400/center/34.111745,-118.113491/unit/mi","urlObject":{"path":["v1","tours","tours-within","400","center","34.111745,-118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e95e8b5f-9c31-4492-ab2d-7b6612bc836f"},{"name":"Get Distances to Tours from Point","id":"c961e8a1-32f8-4b66-96f0-4b7640c13356","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/distances/34.111745,-118.113491/unit/mi","urlObject":{"path":["v1","tours","distances","34.111745,-118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c961e8a1-32f8-4b66-96f0-4b7640c13356"}],"id":"876ec7b3-3753-4d23-adbe-df11ac048779","_postman_id":"876ec7b3-3753-4d23-adbe-df11ac048779","description":""},{"name":"Users","item":[{"name":"Get All Users","id":"c75d9a46-b67e-4800-ab8a-2482002b24cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c75d9a46-b67e-4800-ab8a-2482002b24cd"},{"name":"Update Current User","id":"dc526717-9b0d-4d4c-ae89-235590b8fe08","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\": \"chaosmos\",\r\n    \"role\": \"admin\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMe","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"dc526717-9b0d-4d4c-ae89-235590b8fe08"},{"name":"Delete Current  User Himself","id":"c67ff6ee-64a3-4433-b9c9-d0985214c82d","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":"c67ff6ee-64a3-4433-b9c9-d0985214c82d"},{"name":"Delete User as ADMIN","id":"f8d93d32-7621-43ed-9d42-018c6a0f9732","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/62bb677b8b0a2f631a2e0efb","urlObject":{"path":["v1","users","62bb677b8b0a2f631a2e0efb"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f8d93d32-7621-43ed-9d42-018c6a0f9732"},{"name":"Get Single User","id":"4e95cbb4-60f5-4b73-b968-9120db52f9e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/62ba06b234efe509181e5a9d","urlObject":{"path":["v1","users","62ba06b234efe509181e5a9d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4e95cbb4-60f5-4b73-b968-9120db52f9e9"},{"name":"Get Current User","id":"b342b692-c10d-4075-a14a-f64af14daf5d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/me","urlObject":{"path":["v1","users","me"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b342b692-c10d-4075-a14a-f64af14daf5d"}],"id":"8b4df610-1810-46f1-b67f-434dd39eeae8","_postman_id":"8b4df610-1810-46f1-b67f-434dd39eeae8","description":""},{"name":"Authentication","item":[{"name":"User Sign Up","event":[{"listen":"test","script":{"id":"9951ed7a-f576-4931-a8c4-cc94708d755e","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"036c3daf-391f-45b8-af32-815d278bdeb2","protocolProfileBehavior":{"disableBodyPruning":true,"followAuthorizationHeader":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"TEST777\",\r\n    \"email\": \"test777@test.io\",\r\n    \"password\": \"test1234\",\r\n    \"passwordConfirm\": \"test1234\"\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":"036c3daf-391f-45b8-af32-815d278bdeb2"},{"name":"User Login","event":[{"listen":"test","script":{"id":"9e058b81-50ca-4b0f-ad99-36726d080274","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"308a3f0f-9467-442a-8e67-d0622b5d4d99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"ayls@example.com\",\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":"308a3f0f-9467-442a-8e67-d0622b5d4d99"},{"name":"Forgot Password","id":"5a991a5b-e581-43bc-b555-9e6188e829ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"vit@test.io\"\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":"5a991a5b-e581-43bc-b555-9e6188e829ed"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"d3c0385b-3f79-4fed-92b8-2d5ffe93eb92","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"e7d157c0-39cb-4b34-abe2-b9a7b9ae050f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\": \"newpass\",\r\n    \"passwordConfirm\": \"newpass\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/d4ea066bb6255feab7fba62fa156d909f74c948e31c7c191b744ed0667a1f44e","urlObject":{"path":["v1","users","resetPassword","d4ea066bb6255feab7fba62fa156d909f74c948e31c7c191b744ed0667a1f44e"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e7d157c0-39cb-4b34-abe2-b9a7b9ae050f"},{"name":"Update Password","event":[{"listen":"test","script":{"id":"a6aa8183-a9f7-45cb-ae9e-91722a73093c","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"02625071-4f98-4763-8a9e-2e3402f3ae75","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\": \"newpass\",\r\n    \"password\": \"newpass1\",\r\n    \"passwordConfirm\": \"newpass1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMyPassword","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"02625071-4f98-4763-8a9e-2e3402f3ae75"}],"id":"17d81a6e-5c40-4e26-bce9-8eecdf275ab2","_postman_id":"17d81a6e-5c40-4e26-bce9-8eecdf275ab2","description":""},{"name":"Reviews","item":[{"name":"Get All Reviews","id":"a6d9d539-e734-4dbd-85e1-2af74e3684f9","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":"a6d9d539-e734-4dbd-85e1-2af74e3684f9"},{"name":"Get Review","id":"6805d3d9-6856-4a53-b70e-79024d0548e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/62bb60aeafa0863e209980c8","urlObject":{"path":["v1","reviews","62bb60aeafa0863e209980c8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6805d3d9-6856-4a53-b70e-79024d0548e7"},{"name":"Create Review","id":"e11371b0-b765-44ac-b6fc-374963ce1079","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\": \"Love it! yeeee!\",\r\n    \"rating\": 5,\r\n    \"tour\": \"5c88fa8cf4afda39709c296c\",\r\n    \"user\": \"62ba06b234efe509181e5a9d\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e11371b0-b765-44ac-b6fc-374963ce1079"},{"name":"Update Review","id":"f2749622-0c20-4d97-9fb9-6b1708a9107e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"rating\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/62bb60aeafa0863e209980c8","urlObject":{"path":["v1","reviews","62bb60aeafa0863e209980c8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f2749622-0c20-4d97-9fb9-6b1708a9107e"},{"name":"Delete Review","id":"e78cea5b-a3e4-43cc-afa4-54c33ef11599","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/62bb335e7dd347dd928c47d3","urlObject":{"path":["v1","reviews","62bb335e7dd347dd928c47d3"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e78cea5b-a3e4-43cc-afa4-54c33ef11599"}],"id":"9f06413f-a97f-4753-9cfb-bd7ac81abf95","_postman_id":"9f06413f-a97f-4753-9cfb-bd7ac81abf95","description":""},{"name":"Tours/Reviews","item":[{"name":"Create New Review on Tour","id":"46b598d0-d92a-45b5-90b3-e12580806541","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"rating\": 3,\r\n    \"review\": \"not bad, but not good\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c296c/reviews","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c296c","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"46b598d0-d92a-45b5-90b3-e12580806541"},{"name":"Get All Reviews on Tour","id":"7024d3ed-add9-4897-927d-a85bcd160516","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c296c/reviews","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c296c","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7024d3ed-add9-4897-927d-a85bcd160516"}],"id":"a2e93534-fc88-40d5-b68b-ae2cecf60649","_postman_id":"a2e93534-fc88-40d5-b68b-ae2cecf60649","description":""},{"name":"Bookings","item":[{"name":"Get All Bookings","id":"22e6ca93-1244-40e0-92c6-321622747532","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":"22e6ca93-1244-40e0-92c6-321622747532"},{"name":"Get One Booking","id":"6a4def1c-3075-4f2f-be2c-9542758b2129","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/bookings/62cb135e3d9d5586cf6b8818","urlObject":{"path":["v1","bookings","62cb135e3d9d5586cf6b8818"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a4def1c-3075-4f2f-be2c-9542758b2129"}],"id":"1936b45c-d508-4782-a8df-e902876fd6bb","_postman_id":"1936b45c-d508-4782-a8df-e902876fd6bb","description":""}]}