{"info":{"_postman_id":"647d0e04-c9a1-4120-a7ed-06ab7829575e","name":"Natours","description":"<html><head></head><body><p>The Natours APi contains endpoint for Tours, Users, and Reviews.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"13868151","collectionId":"647d0e04-c9a1-4120-a7ed-06ab7829575e","publishedId":"2s9Y5YSN63","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-08-27T09:14:02.000Z"},"item":[{"name":"Tours","item":[{"name":"Get All Tours","id":"28d1b295-8a45-450e-967d-b0fc20ca65f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours?duration[gte]=7","description":"<p>Use this endpoint to get all tours</p>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"sort","value":"-price,-ratingsAverage"},{"disabled":true,"key":"fields","value":"-name,-duration"},{"disabled":true,"key":"sort","value":"1"},{"disabled":true,"key":"sort","value":"price"},{"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":"price[lt]","value":"1000"},{"disabled":true,"key":"ratingsAverage[gte]","value":"4.7"}],"variable":[]}},"response":[],"_postman_id":"28d1b295-8a45-450e-967d-b0fc20ca65f3"},{"name":"Get Tour","id":"c71b4547-e29d-4122-82a0-f375e929abec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/64ea9ded51bb034c67287e43","description":"<p>Use this endpoint to get a single tour by id</p>\n","urlObject":{"path":["v1","tours","64ea9ded51bb034c67287e43"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c71b4547-e29d-4122-82a0-f375e929abec"},{"name":"Create New Tour","id":"deb28859-5249-488a-82cc-30d6de768939","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"New Test Tour\",\n    \"duration\": 4,\n    \"maxGroupSize\": 10,\n    \"difficulty\": \"difficult\",\n    \"price\": 997,\n    \"summary\": \"Test\",\n    \"imageCover\": \"tour-3-cover.jpg\"\n  }","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours","description":"<p>Use this endpoint to create a new tour</p>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"deb28859-5249-488a-82cc-30d6de768939"},{"name":"Update Tour","id":"9e310ec6-3cec-4821-bde2-8dae72e13f8a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"price\": 500\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/64d10595ae8102a6a2d40f5a","description":"<p>Use this endpoint to update a tour</p>\n","urlObject":{"path":["v1","tours","64d10595ae8102a6a2d40f5a"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9e310ec6-3cec-4821-bde2-8dae72e13f8a"},{"name":"Delete Tour","id":"95e8ed1f-07ad-4c67-8c83-d1460535d3bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/64db0120a5aff74b411d5fb6","description":"<p>Use this endpoint to delete a tour by id</p>\n","urlObject":{"path":["v1","tours","64db0120a5aff74b411d5fb6"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"95e8ed1f-07ad-4c67-8c83-d1460535d3bf"},{"name":"Get Top 5 Cheap Tours","id":"b7002ead-ec3b-4155-a3e4-253f9cadc4d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top-5-cheap","description":"<p>Use this endpoint to get top 5 cheapest tours</p>\n","urlObject":{"path":["v1","tours","top-5-cheap"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b7002ead-ec3b-4155-a3e4-253f9cadc4d1"},{"name":"Get Tour Stats","id":"98d22a9d-add3-4bfd-8de2-9267e38d3091","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":"98d22a9d-add3-4bfd-8de2-9267e38d3091"},{"name":"Get Monthly Plan","id":"092916e4-9ece-46e2-acec-db9a33d8fa7c","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":"092916e4-9ece-46e2-acec-db9a33d8fa7c"},{"name":"Get Tours Within Radius","id":"6a47605a-612a-47b0-834f-27df42bae042","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tours-within/200/center/34.111745,-118.113491/unit/mi","urlObject":{"path":["v1","tours","tours-within","200","center","34.111745,-118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a47605a-612a-47b0-834f-27df42bae042"},{"name":"Get Distances to Tours From Point","id":"b1e16bd3-665f-4199-accd-5ce0062ddf74","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":"b1e16bd3-665f-4199-accd-5ce0062ddf74"}],"id":"f3b2eb72-2b7b-42bc-ad2a-15c42fd72ea9","description":"<p><strong>You can get all tours, create new ones, and edit and delete tours.</strong> There are also special endpoint for some special requirements</p>\n","_postman_id":"f3b2eb72-2b7b-42bc-ad2a-15c42fd72ea9"},{"name":"Users","item":[{"name":"Get All Users","id":"6559227b-dd2d-4999-a601-4736ddcfeae6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/users","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6559227b-dd2d-4999-a601-4736ddcfeae6"},{"name":"Get Current User","id":"c062e9b2-f809-4d15-8c23-e567e95fa5dd","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":"c062e9b2-f809-4d15-8c23-e567e95fa5dd"},{"name":"Update Current User Data","id":"c6ff9568-310a-4ddd-97d0-bb655d818b67","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 J. Gillespie","type":"text","disabled":true},{"key":"photo","type":"file","src":"/Users/omariip/Desktop/Learn/NodeJS/complete-node-bootcamp-master/4-natours/starter/dev-data/img/aarav.jpg"}]},"url":"{{URL}}api/v1/users/updateMe","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c6ff9568-310a-4ddd-97d0-bb655d818b67"},{"name":"Delete Current User","id":"17edb2ff-9f8f-4e5e-b2aa-ae1f62319c33","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":"17edb2ff-9f8f-4e5e-b2aa-ae1f62319c33"},{"name":"Delete User","id":"e1e23f5c-e291-4f31-9404-517def70062d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"jwt","jwt":{"basicConfig":[{"key":"algorithm","value":"<algorithm>"},{"key":"isSecretBase64Encoded","value":"<is-secret-base64encoded>"},{"key":"payload","value":"<payload>"},{"key":"addTokenTo","value":"<add-token-to>"},{"key":"headerPrefix","value":"<header-prefix>"},{"key":"queryParamKey","value":"<query-param-key>"},{"key":"header","value":"<header>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/64e1b911ae6b000d4a09fd38","urlObject":{"path":["v1","users","64e1b911ae6b000d4a09fd38"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e1e23f5c-e291-4f31-9404-517def70062d"},{"name":"Update User","id":"505563df-b306-4aa4-ba56-2deff7ebfb48","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Omar\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/64d8d8cd8b5e288458fc17d4","urlObject":{"path":["v1","users","64d8d8cd8b5e288458fc17d4"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"505563df-b306-4aa4-ba56-2deff7ebfb48"},{"name":"Get User","id":"352759eb-ab14-4e75-9e52-45396795c355","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/2","urlObject":{"path":["v1","users","2"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"352759eb-ab14-4e75-9e52-45396795c355"}],"id":"329b5c65-d273-41db-8375-4d97b1a80692","_postman_id":"329b5c65-d273-41db-8375-4d97b1a80692","description":""},{"name":"Authentication","item":[{"name":"Update Current Password","event":[{"listen":"test","script":{"id":"090c485e-8403-4ebd-85ee-f75a6294b9f9","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"cc1e05ed-3c5b-4524-b9a6-a4509cab2a8b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"passwordCurrent\": \"password2\",\n    \"password\": \"password\",\n    \"passwordConfirm\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMyPassword","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc1e05ed-3c5b-4524-b9a6-a4509cab2a8b"},{"name":"Forgot Password","id":"708a1227-4991-41ec-aee9-6edf2d299713","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"user@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"708a1227-4991-41ec-aee9-6edf2d299713"},{"name":"Signup","event":[{"listen":"test","script":{"id":"cc7bcc29-24e7-48ff-b044-eb58c553ba1a","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"08e4e5dd-5d26-4c9a-a7da-b49c0e29c342","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"monica@example.com\",\n    \"password\": \"test1234\",\n    \"passwordConfirm\": \"test1234\",\n    \"name\": \"Monica\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"08e4e5dd-5d26-4c9a-a7da-b49c0e29c342"},{"name":"Login","event":[{"listen":"test","script":{"id":"d3bcc496-95bd-41f1-a0bd-c79448c0257e","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"5408d6bd-a50f-4dc3-859f-835f1d48c5d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"admin@natours.io\",\n    \"password\": \"{{password}}\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"5408d6bd-a50f-4dc3-859f-835f1d48c5d9"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"a9f3111f-afc4-44c2-8f41-4e0dd296beea","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript"}}],"id":"ee48e761-0da1-4cc8-a8c9-0665ba748ea8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"password\": \"password2\",\n    \"passwordConfirm\": \"password2\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/fc2239bfd974555234e533ce7454626b578ef3a1ae588360d6328b7b6a3be10a","urlObject":{"path":["v1","users","resetPassword","fc2239bfd974555234e533ce7454626b578ef3a1ae588360d6328b7b6a3be10a"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ee48e761-0da1-4cc8-a8c9-0665ba748ea8"}],"id":"5ef4bf2e-2b89-43c0-bcd2-b5258a24cf0a","_postman_id":"5ef4bf2e-2b89-43c0-bcd2-b5258a24cf0a","description":""},{"name":"Reviews","item":[{"name":"Create New Review","id":"e5771e5b-dcec-4c8c-b529-11a6d7c07ed6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"reviews\": \"Good tour!\",\n    \"rating\": 4,\n    \"tour\": \"5c88fa8cf4afda39709c2951\",\n    \"user\": \"64d8d8cd8b5e288458fc17d4\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5771e5b-dcec-4c8c-b529-11a6d7c07ed6"},{"name":"Get Review","id":"a9692a4e-a57a-40d3-9c0d-f4da039dc05d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/64db21a7eca6c255e64bad2b","urlObject":{"path":["v1","reviews","64db21a7eca6c255e64bad2b"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a9692a4e-a57a-40d3-9c0d-f4da039dc05d"},{"name":"Get All Reviews","id":"93587563-68ac-4a35-b2fd-eebfdc743db5","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":"93587563-68ac-4a35-b2fd-eebfdc743db5"},{"name":"Delete Review","id":"868122fc-a8e0-43b3-b96b-314e12db7039","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/64ead89d8b194d56897b3305","urlObject":{"path":["v1","reviews","64ead89d8b194d56897b3305"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"868122fc-a8e0-43b3-b96b-314e12db7039"},{"name":"Update Review","id":"b94e2b0b-0b10-4395-9511-5288dff38075","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\": 1\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/64eacca05f74ed5389b9525a","urlObject":{"path":["v1","reviews","64eacca05f74ed5389b9525a"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b94e2b0b-0b10-4395-9511-5288dff38075"}],"id":"3ca19d53-91a5-403b-aa72-05618ad25479","_postman_id":"3ca19d53-91a5-403b-aa72-05618ad25479","description":""},{"name":"Tours/Reviews","item":[{"name":"Create New Review on Tour","id":"54c9743e-a980-47e8-b351-40cfdce1b967","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"rating\": 4,\n    \"review\": \"not good\"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/64ea9ded51bb034c67287e43/reviews","urlObject":{"path":["v1","tours","64ea9ded51bb034c67287e43","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"54c9743e-a980-47e8-b351-40cfdce1b967"},{"name":"Get All Reviews on Tour","id":"8bf404fb-b265-4174-8001-94cef49322bb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2951/reviews","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2951","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8bf404fb-b265-4174-8001-94cef49322bb"}],"id":"9c67369d-2029-462a-b393-54f6ffa12f90","_postman_id":"9c67369d-2029-462a-b393-54f6ffa12f90","description":""},{"name":"Bookings","item":[{"name":"Get All Bookings","id":"4352f9c1-cd07-4c22-86ea-eb455cff82dd","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":"4352f9c1-cd07-4c22-86ea-eb455cff82dd"},{"name":"Get Booking","id":"abb5c4f6-aa0f-42ab-9039-f57486724238","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/bookings/64f6cbb85b93786d219f3200","urlObject":{"path":["v1","bookings","64f6cbb85b93786d219f3200"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"abb5c4f6-aa0f-42ab-9039-f57486724238"}],"id":"8402b89c-ea6f-4cd1-bef5-9f12fb2e98d6","_postman_id":"8402b89c-ea6f-4cd1-bef5-9f12fb2e98d6","description":""}]}