{"info":{"_postman_id":"3676696f-e107-4596-b27b-bb635e15c03b","name":"Natours","description":"<html><head></head><body><p>The <strong>Natours API</strong> collection contains endpoints for Tours, Users, Reviews and Bookings.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"34163254","collectionId":"3676696f-e107-4596-b27b-bb635e15c03b","publishedId":"2sA3QwdW8j","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-06-03T09:41:17.000Z"},"item":[{"name":"Tours","item":[{"name":"Create New Tour","id":"032600d5-f2e0-44fb-9917-a7ec2fb0db75","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 3\",\r\n                \"duration\": 10,\r\n                \"maxGroupSize\": 20,\r\n                \"difficulty\": \"medium\",\r\n                \"price\": 597,\r\n                \"priceDiscount\" : 200,\r\n                \"summary\": \"Test Tour\",\r\n                \"imageCover\": \"tour-1-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":"032600d5-f2e0-44fb-9917-a7ec2fb0db75"},{"name":"Get All Tours","id":"df1de176-b8b1-442b-8ba7-cee93f165595","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/tours","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"df1de176-b8b1-442b-8ba7-cee93f165595"},{"name":"Get Tour","id":"c5cbced9-c148-495e-8397-bbeef9b7c84f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/665c6f0d3a1e8ecf6cd5f536","urlObject":{"path":["v1","tours","665c6f0d3a1e8ecf6cd5f536"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5cbced9-c148-495e-8397-bbeef9b7c84f"},{"name":"Get Monthly Plan","id":"40bb99b5-7ada-4685-ba6a-3d10099d3f43","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/2025","description":"<p>Getting tours by starting date (months) in a particular year</p>\n","urlObject":{"path":["v1","tours","monthly-plan","2025"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"40bb99b5-7ada-4685-ba6a-3d10099d3f43"},{"name":"Top 5 cheap tours","id":"960fd01d-bc0f-48d6-a425-92aa5f36d446","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":"960fd01d-bc0f-48d6-a425-92aa5f36d446"},{"name":"Get Tour Stats (Aggregation)","id":"ebfad867-b4cd-4521-9567-2b5a3a1f0bfc","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":"ebfad867-b4cd-4521-9567-2b5a3a1f0bfc"},{"name":"Update Tour","id":"42425a0e-0e97-471e-bf02-9d85faab24f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"imageCover","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/User/Pictures/tourCover.jpg"],"src":"/C:/Users/User/Pictures/tourCover.jpg"},{"key":"images","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/User/Pictures/tour1.jpg"],"src":"/C:/Users/User/Pictures/tour1.jpg"},{"key":"images","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/User/Pictures/tour2.jpg"],"src":"/C:/Users/User/Pictures/tour2.jpg"},{"key":"images","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/User/Pictures/tour3.jpg"],"src":"/C:/Users/User/Pictures/tour3.jpg"},{"key":"price","value":"991","type":"text"}]},"url":"{{URL}}api/v1/tours/66635536cac57359935208ac","urlObject":{"path":["v1","tours","66635536cac57359935208ac"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"42425a0e-0e97-471e-bf02-9d85faab24f4"},{"name":"Delete Tour","id":"480bbf95-aa01-4bf9-bfc3-cf1d0deb1123","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/665af0c56340833648fea6da","urlObject":{"path":["v1","tours","665af0c56340833648fea6da"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"480bbf95-aa01-4bf9-bfc3-cf1d0deb1123"},{"name":"Get Tours Within Radius","id":"d6426a89-83fe-4888-892f-a6925a0f0393","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":"d6426a89-83fe-4888-892f-a6925a0f0393"},{"name":"Get Distances to Tour From Point","id":"a80a0c95-b3c3-4914-984d-7aeac398a208","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/distances/34.111745,-118.113491/unit/km","urlObject":{"path":["v1","tours","distances","34.111745,-118.113491","unit","km"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a80a0c95-b3c3-4914-984d-7aeac398a208"}],"id":"13e07a48-1a66-46d5-9607-01abf0b8db54","description":"<p>The Tours collection provides a comprehensive set of endpoints for managing and exploring tour data. Here’s an overview of the available functionalities:</p>\n<ul>\n<li><p><strong>Create a New Tour</strong>: Allows you to add a new tour to the collection with all necessary details.</p>\n</li>\n<li><p><strong>Retrieve Tours</strong>:</p>\n<ul>\n<li><p><strong>Get All Tours</strong>: Fetches a list of all tours available in the collection.</p>\n</li>\n<li><p><strong>Get a Single Tour</strong>: Retrieves detailed information about a specific tour using its ID.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Update a Tour</strong>: Modify the details of an existing tour by providing the tour ID and the updated data.</p>\n</li>\n<li><p><strong>Delete a Tour</strong>: Remove a tour from the collection using its ID.</p>\n</li>\n<li><p><strong>Search for Top 5 Tours</strong>: Provides a quick way to find the top 5 tours based on a predefined criterion such as ratings and price.</p>\n</li>\n<li><p><strong>Get Monthly Plans</strong>: Obtain a breakdown of tours scheduled for each month of a specified year, helping in planning and analysis.</p>\n</li>\n<li><p><strong>Get Tour Statistics</strong>: Generate statistics on tours categorized by their difficulty level, offering insights into the distribution of tours across different difficulty levels.</p>\n</li>\n<li><p><strong>Geospatial Queries</strong>:</p>\n<ul>\n<li><p><strong>Tours Within a Radius</strong>: Find tours located within a specified radius from a given geographical point, useful for proximity-based searches.</p>\n</li>\n<li><p><strong>Tours and Their Distances</strong>: List tours along with their distances from a specified starting point, aiding in distance-based tour selection.</p>\n</li>\n</ul>\n</li>\n</ul>\n<p>These endpoints provide a robust interface for creating, retrieving, updating, deleting, and analyzing tour data, making it easier to manage and utilize tour information effective.</p>\n","_postman_id":"13e07a48-1a66-46d5-9607-01abf0b8db54"},{"name":"Users","item":[{"name":"Get All Users","id":"e528eb5b-ad56-461d-9a2d-6985d48b4bf8","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":"e528eb5b-ad56-461d-9a2d-6985d48b4bf8"},{"name":"Get User","id":"3e4ee719-c446-48a1-950c-e766718b8095","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/6658b2635a71efa717d064de","urlObject":{"path":["v1","users","6658b2635a71efa717d064de"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3e4ee719-c446-48a1-950c-e766718b8095"},{"name":"Get Current User","id":"d7598a58-4a33-4300-a3a5-db59257ae8c4","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":"d7598a58-4a33-4300-a3a5-db59257ae8c4"},{"name":"Update User","id":"91e80a71-0346-4d61-b2d6-b08221ab1581","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\" : \"Joey Tribbiani\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/6659f472f687f744a8b2a9e1","urlObject":{"path":["v1","users","6659f472f687f744a8b2a9e1"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"91e80a71-0346-4d61-b2d6-b08221ab1581"},{"name":"Update Current User Password","event":[{"listen":"test","script":{"id":"62c2d333-34a9-402c-b557-263faac7e954","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"49e2829c-e2af-4818-ad59-c7a9487e58cf","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\" : \"{{password}}\",\r\n    \"passwordConfirm\" : \"####\"\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":"49e2829c-e2af-4818-ad59-c7a9487e58cf"},{"name":"Update Current User Data","id":"969b23f7-5248-4cc6-9507-f3ba46ddf27a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"Atish","value":"Atish","type":"text"},{"key":"photo","type":"file","src":"/C:/Users/User/Pictures/krishna.jpg"}]},"url":"{{URL}}api/v1/users/updateMe","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"969b23f7-5248-4cc6-9507-f3ba46ddf27a"},{"name":"Delete Current User","id":"9beb593d-ce1c-440d-ba0e-13db53626657","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":"9beb593d-ce1c-440d-ba0e-13db53626657"},{"name":"Delete User","id":"307bac13-3caa-4d2f-ba69-ab6ff7fc69cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/665b57a5b4affc9f9ee09968","urlObject":{"path":["v1","users","665b57a5b4affc9f9ee09968"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"307bac13-3caa-4d2f-ba69-ab6ff7fc69cb"}],"id":"ee3b39c8-c4ed-48dc-9656-9ede23c88ad7","description":"<p>The Users endpoints offer a range of functionalities to manage user data and handle user-specific operations. Below is a detailed overview of the available endpoints:</p>\n<ul>\n<li><p><strong>Retrieve Users</strong>:</p>\n<ul>\n<li><p><strong>Get All Users</strong>: Fetches a list of all registered users.</p>\n</li>\n<li><p><strong>Get a Single User</strong>: Retrieves detailed information about a specific user by their ID.</p>\n</li>\n<li><p><strong>Get Current Logged-in User</strong>: Provides information about the user currently authenticated in the session.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Update Users</strong>:</p>\n<ul>\n<li><p><strong>Update a User</strong>: Modify the details of a specific user by their ID.</p>\n</li>\n<li><p><strong>Update Current Logged-in User Data</strong>: Allows the currently authenticated user to update their own profile information.</p>\n</li>\n<li><p><strong>Update Current Logged-in User Password</strong>: Enables the currently authenticated user to change their password.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Delete Users</strong>:</p>\n<ul>\n<li><p><strong>Delete a User</strong>: Remove a specific user from the system by their ID. (Account permanently lost)</p>\n</li>\n<li><p><strong>Delete Current User</strong>: Allows the currently authenticated user to delete their own account. (Account deactivated)</p>\n</li>\n</ul>\n</li>\n</ul>\n","_postman_id":"ee3b39c8-c4ed-48dc-9656-9ede23c88ad7"},{"name":"Authentication","item":[{"name":"Sign Up","event":[{"listen":"test","script":{"id":"613e5b08-4f0b-4d6a-9e42-b8e6f775da30","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"e8e018d7-da23-417d-9d01-9fd8f94266ab","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"test-user\",\r\n    \"email\":\"test@gmail.com\",\r\n    \"password\": \"{{password}}\",\r\n    \"passwordConfirm\": \"{{password}}\",\r\n    \"role\" : \"guide\"\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":"e8e018d7-da23-417d-9d01-9fd8f94266ab"},{"name":"Login","event":[{"listen":"test","script":{"id":"20d9b18d-867f-4a0a-8b78-0f23116cb99f","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"729ae54d-22bf-4a60-8eeb-353f8ed48328","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"krishna@gmail.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":"729ae54d-22bf-4a60-8eeb-353f8ed48328"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"6a51a7ee-7904-4218-8316-83acd7622feb","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"cb110a4f-dec2-44ca-9ea4-48db20f67501","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\" : \"mark1234\",\r\n    \"passwordConfirm\" : \"mark1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/a3e99cec28dfd2828258e2347fa30589f6ea52d99c6c1fa9b3fafa5728e40e14","urlObject":{"path":["v1","users","resetPassword","a3e99cec28dfd2828258e2347fa30589f6ea52d99c6c1fa9b3fafa5728e40e14"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb110a4f-dec2-44ca-9ea4-48db20f67501"},{"name":"Forgot Password","id":"e77715c2-a3e7-41d8-95de-009f3ebf05d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\" : \"mark@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":"e77715c2-a3e7-41d8-95de-009f3ebf05d3"}],"id":"286e2a11-355f-4e72-9950-bb3221a3c36b","description":"<p>The Authentication endpoints provide essential functionalities for user registration, login, and password management. Below is a detailed overview of the available endpoints:</p>\n<ul>\n<li><p><strong>User Registration</strong>:</p>\n<ul>\n<li><strong>Sign Up a User</strong>: Allows new users to create an account by providing their necessary details such as name, email, and password.</li>\n</ul>\n</li>\n<li><p><strong>User Login</strong>:</p>\n<ul>\n<li><strong>Login a User</strong>: Authenticates a user by verifying their email and password, granting access to the system upon successful authentication.</li>\n</ul>\n</li>\n<li><p><strong>Password Management</strong>:</p>\n<ul>\n<li><p><strong>Forgot Password</strong>: Initiates the password recovery process by allowing users to request a password reset link sent to their registered email address.</p>\n</li>\n<li><p><strong>Reset Password</strong>: Enables users to set a new password using the password reset link they received in their email.</p>\n</li>\n</ul>\n</li>\n</ul>\n<p>These endpoints ensure secure and user-friendly processes for account creation, authentication, and password recovery, enhancing the overall user experience and security of the application.</p>\n","_postman_id":"286e2a11-355f-4e72-9950-bb3221a3c36b"},{"name":"Reviews","item":[{"name":"Create New Review","id":"69d32450-7d8d-473c-85e4-3c62611b1200","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\" : \"The Sea Explorer Tour was simply marvellous!\",\r\n    \"rating\" : 4.9,\r\n    \"tour\" : \"5c88fa8cf4afda39709c2955\",\r\n    \"user\" : \"6658b2a45a71efa717d064e0\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/","urlObject":{"path":["v1","reviews",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"69d32450-7d8d-473c-85e4-3c62611b1200"},{"name":"Get All Reviews","id":"966aaed5-ce3a-4a0d-9dd9-d6308b5b879e","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":"966aaed5-ce3a-4a0d-9dd9-d6308b5b879e"},{"name":"Get Review","id":"6f46fcdd-f484-4adf-b523-b05218ce77d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/665b0ade3ffe572b56668284","urlObject":{"path":["v1","reviews","665b0ade3ffe572b56668284"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f46fcdd-f484-4adf-b523-b05218ce77d8"},{"name":"Update Review","id":"5f13ac49-3aef-4e48-a697-df499fc77f3d","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\" : \"Test Tour 3 was so-and-so\",\r\n    \"rating\" : 3.123\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/665ca15efec6ed22a096a918","urlObject":{"path":["v1","reviews","665ca15efec6ed22a096a918"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f13ac49-3aef-4e48-a697-df499fc77f3d"},{"name":"Delete Review","id":"894b1eba-cea1-4d51-abef-eb9f19df650d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/665c9cd83955e25a552fecbe","urlObject":{"path":["v1","reviews","665c9cd83955e25a552fecbe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"894b1eba-cea1-4d51-abef-eb9f19df650d"}],"id":"0292e113-40ac-4d8a-b297-a50256c2b3cd","description":"<p>The Reviews endpoints offer functionalities for managing reviews related to tours. Below is a detailed overview of the available endpoints:</p>\n<ul>\n<li><p><strong>Create a New Review</strong>: Allows users to add a new review for a specific tour, providing their feedback and rating.</p>\n</li>\n<li><p><strong>Retrieve Reviews</strong>:</p>\n<ul>\n<li><p><strong>Get All Reviews</strong>: Fetches a list of all reviews available in the system.</p>\n</li>\n<li><p><strong>Get a Single Review</strong>: Retrieves detailed information about a specific review using its ID.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Update a Review</strong>: Modify the details of an existing review by providing the review ID and the updated information.</p>\n</li>\n<li><p><strong>Delete a Review</strong>: Remove a specific review from the system using its ID.</p>\n</li>\n</ul>\n<p>These endpoints facilitate the creation, retrieval, updating, and deletion of reviews, enabling users to share their experiences and feedback on tours, and allowing administrators to manage review content effectively.</p>\n","_postman_id":"0292e113-40ac-4d8a-b297-a50256c2b3cd"},{"name":"Tours/Reviews","item":[{"name":"Get All Reviews of a Tour","id":"f2615ae0-a619-4c10-b040-2d45d94cc57d","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":"f2615ae0-a619-4c10-b040-2d45d94cc57d"},{"name":"Posting reviews on Tour","id":"ff2bf532-9829-4d80-9262-b2be9f896e88","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\" : \"Test Tour 3 was so-and-sp!\",\r\n    \"rating\" : 3.123\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/665c6f0d3a1e8ecf6cd5f536/reviews","urlObject":{"path":["v1","tours","665c6f0d3a1e8ecf6cd5f536","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ff2bf532-9829-4d80-9262-b2be9f896e88"}],"id":"03598c8d-66e4-4e89-b462-90f1a41735b2","description":"<p>The Tours/Reviews endpoints provide functionalities for managing reviews associated with specific tours. Below is a detailed overview of the available endpoints:</p>\n<ul>\n<li><p><strong>Get All Reviews for a Specific Tour</strong>:</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>GET /tours/:tourID/reviews</code></p>\n</li>\n<li><p><strong>Description</strong>: Fetches a list of all reviews for a specific tour by specifying the tour ID in the URL. This allows users to see all feedback and ratings related to a particular tour.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Post a Review for a Specific Tour</strong>:</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>POST /tours/:tourID/reviews</code></p>\n</li>\n<li><p><strong>Description</strong>: Allows users to add a new review for a specific tour by specifying the tour ID in the URL. This enables users to provide their feedback and rating for the tour directly through the URL, e.g., <code>POST /tours/665c6f0d3a1e8ecfsdfsdfcd5f536/reviews</code>.</p>\n</li>\n</ul>\n</li>\n</ul>\n<p>These endpoints facilitate the retrieval and creation of reviews directly related to specific tours, enhancing the ability of users to share and access tour-specific feedback and experiences.</p>\n","_postman_id":"03598c8d-66e4-4e89-b462-90f1a41735b2"},{"name":"Bookings","item":[{"name":"Get All bookings","id":"c5f1b584-5153-45f0-b6b3-2dd272f8c208","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":"c5f1b584-5153-45f0-b6b3-2dd272f8c208"},{"name":"Get Booking","id":"be433d9e-c47b-4e1a-9edd-cf6a455e6e2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/bookings/6664856ff3e0cc3cc5b0cd2s","urlObject":{"path":["v1","bookings","6664856ff3e0cc3cc5b0cd2s"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"be433d9e-c47b-4e1a-9edd-cf6a455e6e2a"},{"name":"Create Booking","id":"8c76dc44-6d67-48f2-b657-aa50ba64b7e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"tour\" : \"5c88fa8cf4afda39709c295p\",\r\n    \"user\" : \"5c8a1d5b0190b214360dc051\",\r\n    \"price\" : 1197\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/bookings/","urlObject":{"path":["v1","bookings",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8c76dc44-6d67-48f2-b657-aa50ba64b7e6"},{"name":"Update Booking","id":"5a6c18b2-5a77-40d0-b590-b86699f99f9c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"price\" : 0\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/bookings/66656e2c799278c7f239ab0d","urlObject":{"path":["v1","bookings","66656e2c799278c7f239ab0d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"5a6c18b2-5a77-40d0-b590-b86699f99f9c"},{"name":"Delete Booking","id":"a6ed904d-071e-4c3e-b43e-2ffb0dcca297","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"{{URL}}api/v1/bookings/66656e2c799278c7f239ab0d","urlObject":{"path":["v1","bookings","66656e2c799278c7f239ab0d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a6ed904d-071e-4c3e-b43e-2ffb0dcca297"}],"id":"5027fbaf-80cc-40aa-805b-10491a3f6aec","description":"<p>The Bookings endpoints provide functionalities for managing bookings associated with tours. These endpoints require authenticated and authorized users (admin and lead-guide only) to view, create, delete, or update bookings. Below is a detailed overview of the available endpoints:</p>\n<h3 id=\"get-a-specific-booking\">Get a Specific Booking:</h3>\n<ul>\n<li><p><strong>Endpoint:</strong> GET /api/v1/bookings/</p>\n</li>\n<li><p><strong>Description:</strong> Fetches the details of a specific booking by specifying the booking ID in the URL. This allows users to view all information related to a particular booking.</p>\n</li>\n<li><p><strong>Example:</strong> <code>GET /api/v1/bookings/6664856ff3e0cc3cc5b0cd2s</code></p>\n</li>\n</ul>\n<h3 id=\"get-all-bookings\">Get All Bookings:</h3>\n<ul>\n<li><p><strong>Endpoint:</strong> GET /api/v1/bookings</p>\n</li>\n<li><p><strong>Description:</strong> Retrieves a list of all bookings. This allows users to see all bookings made across the platform.</p>\n</li>\n<li><p><strong>Example:</strong> <code>GET /api/v1/bookings</code></p>\n</li>\n</ul>\n<h3 id=\"create-a-booking\">Create a Booking:</h3>\n<ul>\n<li><p><strong>Endpoint:</strong> POST /api/v1/bookings</p>\n</li>\n<li><p><strong>Description:</strong> Allows users to create a new booking. Users need to provide the necessary details to create a booking for a tour.</p>\n</li>\n<li><p><strong>Example:</strong> <code>POST /api/v1/bookings</code></p>\n</li>\n</ul>\n<h3 id=\"update-a-specific-booking\">Update a Specific Booking:</h3>\n<ul>\n<li><p><strong>Endpoint:</strong> PATCH /api/v1/bookings/</p>\n</li>\n<li><p><strong>Description:</strong> Enables users to update an existing booking by specifying the booking ID in the URL. This allows users to modify details of a particular booking.</p>\n</li>\n<li><p><strong>Example:</strong> <code>PATCH /api/v1/bookings/66656e2c799278c7f239ab0d</code></p>\n</li>\n</ul>\n<h3 id=\"delete-a-specific-booking\">Delete a Specific Booking:</h3>\n<ul>\n<li><p><strong>Endpoint:</strong> DELETE /api/v1/bookings/</p>\n</li>\n<li><p><strong>Description:</strong> Allows users to delete a specific booking by specifying the booking ID in the URL. This enables users to remove a booking from the system.</p>\n</li>\n<li><p><strong>Example:</strong> <code>DELETE /api/v1/bookings/66656e2c799278c7f239ab0d</code></p>\n</li>\n</ul>\n<hr />\n<p>These endpoints facilitate the retrieval, creation, update, and deletion of bookings, enhancing the ability of users to manage their tour reservations effectively.</p>\n","_postman_id":"5027fbaf-80cc-40aa-805b-10491a3f6aec"}]}