{"info":{"_postman_id":"7aa36c99-ceec-4c08-b4a9-c5243ff12398","name":"Tour Booking App","description":"<html><head></head><body><h1 id=\"tour-booking-app-api-documentation\">Tour Booking App API Documentation</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Natours is a RESTful API for managing tours, users, reviews, and authentication.<br>It supports role-based access control (User / Admin) and JWT authentication.</p>\n<hr>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{URL}}/api/v1\n\n</code></pre><hr>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Natours uses <strong>JWT (Bearer Token)</strong> authentication.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><ul>\n<li><p>Token is returned on <strong>login / signup</strong></p>\n</li>\n<li><p>Required for protected routes</p>\n</li>\n<li><p>Admin-only routes require <code>role: admin</code></p>\n</li>\n</ul>\n<hr>\n<h2 id=\"api-modules\">API Modules</h2>\n<h3 id=\"1️⃣-authentication\">1️⃣ Authentication</h3>\n<ul>\n<li><p><strong>POST</strong> <code>/users/signup</code> – Create new user</p>\n</li>\n<li><p><strong>POST</strong> <code>/users/login</code> – Login user</p>\n</li>\n<li><p><strong>POST</strong> <code>/users/forgotPassword</code></p>\n</li>\n<li><p><strong>PATCH</strong> <code>/users/resetPassword/:token</code></p>\n</li>\n<li><p><strong>PATCH</strong> <code>/users/updateMyPassword</code></p>\n</li>\n</ul>\n<hr>\n<h3 id=\"2️⃣-users\">2️⃣ Users</h3>\n<h4 id=\"user-authenticated\">User (Authenticated)</h4>\n<ul>\n<li><p><strong>GET</strong> <code>/users/me</code> – Get current user</p>\n</li>\n<li><p><strong>PATCH</strong> <code>/users/updateMe</code> – Update own data</p>\n</li>\n<li><p><strong>DELETE</strong> <code>/users/deleteMe</code> – Deactivate own account</p>\n</li>\n</ul>\n<h4 id=\"admin-only\">Admin Only</h4>\n<ul>\n<li><p><strong>GET</strong> <code>/users</code> – Get all users</p>\n</li>\n<li><p><strong>GET</strong> <code>/users/:id</code> – Get user by ID</p>\n</li>\n<li><p><strong>PATCH</strong> <code>/users/:id</code> – Update user</p>\n</li>\n<li><p><strong>DELETE</strong> <code>/users/:id</code> – Delete user</p>\n</li>\n</ul>\n<hr>\n<h3 id=\"3️⃣-tours\">3️⃣ Tours</h3>\n<h4 id=\"public\">Public</h4>\n<ul>\n<li><p><strong>GET</strong> <code>/tours</code> – Get all tours</p>\n</li>\n<li><p><strong>GET</strong> <code>/tours/:id</code> – Get tour by ID</p>\n</li>\n</ul>\n<h4 id=\"admin--lead-guide\">Admin / Lead-Guide</h4>\n<ul>\n<li><p><strong>POST</strong> <code>/tours</code> – Create tour</p>\n</li>\n<li><p><strong>PATCH</strong> <code>/tours/:id</code> – Update tour</p>\n</li>\n<li><p><strong>DELETE</strong> <code>/tours/:id</code> – Delete tour</p>\n</li>\n</ul>\n<h4 id=\"advanced\">Advanced</h4>\n<ul>\n<li><p><strong>GET</strong> <code>/tours/top-5-cheap</code></p>\n</li>\n<li><p><strong>GET</strong> <code>/tours/tour-stats</code></p>\n</li>\n<li><p><strong>GET</strong> <code>/tours/monthly-plan/:year</code></p>\n</li>\n<li><p><strong>GET</strong> <code>/tours-within/:distance/center/:latlng/unit/:unit</code></p>\n</li>\n<li><p><strong>GET</strong> <code>/tours/distances/:latlng/unit/:unit</code></p>\n</li>\n</ul>\n<hr>\n<h3 id=\"4️⃣-reviews\">4️⃣ Reviews</h3>\n<p>Reviews are <strong>nested under tours</strong>.</p>\n<ul>\n<li><p><strong>GET</strong> <code>/tours/:tourId/reviews</code> – Get tour reviews</p>\n</li>\n<li><p><strong>POST</strong> <code>/tours/:tourId/reviews</code> – Create review (User)</p>\n</li>\n</ul>\n<p>Admin:</p>\n<ul>\n<li><p><strong>GET</strong> <code>/reviews</code></p>\n</li>\n<li><p><strong>DELETE</strong> <code>/reviews/:id</code></p>\n</li>\n</ul>\n<hr>\n<h2 id=\"roles--permissions\">Roles &amp; Permissions</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Role</th>\n<th>Permissions</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>user</td>\n<td>Book tours, write reviews, manage own profile</td>\n</tr>\n<tr>\n<td>admin</td>\n<td>Full access to users, tours, and reviews</td>\n</tr>\n<tr>\n<td>lead-guide</td>\n<td>Manage tours</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<h2 id=\"common-response-format\">Common Response Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {}\n  }\n}\n\n</code></pre>\n<hr>\n<h2 id=\"error-response-format\">Error Response Format</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"fail\",\n  \"message\": \"Error description\"\n}\n\n</code></pre>\n<hr>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Uses MongoDB with Mongoose</p>\n</li>\n<li><p>Uses REST best practices</p>\n</li>\n<li><p>Supports filtering, sorting, pagination, and field limiting</p>\n</li>\n<li><p>Designed for learning real-world backend architecture</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"project-use-case\">Project Use Case</h2>\n<p>Natours is a learning-focused backend project demonstrating:</p>\n<ul>\n<li><p>Authentication &amp; Authorization</p>\n</li>\n<li><p>REST API design</p>\n</li>\n<li><p>Role-based access control</p>\n</li>\n<li><p>Real-world data modeling</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"maintainer\">Maintainer</h2>\n<p>Natours API – Backend Project</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Tour Booking App API Documentation","slug":"tour-booking-app-api-documentation"}],"owner":"46789817","collectionId":"7aa36c99-ceec-4c08-b4a9-c5243ff12398","publishedId":"2sBXVifpK4","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-01-17T22:50:59.000Z"},"item":[{"name":"Authetntication","item":[{"name":"Sign Up","id":"23808b45-185c-4469-a7fe-a20c0ba04a87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"defulalt\",\r\n  \"email\": \"defulalt@example.com\",\r\n  \"password\": \"{{password}}\",\r\n  \"passwordConfirm\": \"{{password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","description":"<h1 id=\"sign-up\">Sign Up</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint allows new users to register and create an account in the Natours application. Upon successful registration, the user receives a JWT token for authentication in subsequent requests.</p>\n<h2 id=\"request-details\">Request Details</h2>\n<ul>\n<li><p><strong>Method:</strong> <code>POST</code></p>\n</li>\n<li><p><strong>Endpoint:</strong> <code>{{URL}}api/v1/users/signup</code></p>\n</li>\n</ul>\n<h2 id=\"request-body\">Request Body</h2>\n<p>The request body must be sent as raw JSON with the following required fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user's full name</td>\n</tr>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user's email address (must be unique)</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user's password</td>\n</tr>\n<tr>\n<td><code>passwordConfirm</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Password confirmation (must match password)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"tester\",\n  \"email\": \"tester@test.com\",\n  \"password\": \"{{password}}\",\n  \"passwordConfirm\": \"{{password}}\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p>Upon successful registration, the endpoint returns a <code>201 Created</code> status code with the following response structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"data\": {\n    \"user\": {\n      \"name\": \"tester\",\n      \"email\": \"tester@test.com\",\n      \"role\": \"user\",\n      \"active\": true,\n      \"_id\": \"696c0662b4e8fa3998f39ade\",\n      \"__v\": 0\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<ul>\n<li><p><strong>status:</strong> Indicates the success or failure of the request</p>\n</li>\n<li><p><strong>token:</strong> JWT authentication token to be used for protected routes</p>\n</li>\n<li><p><strong>data.user:</strong> The newly created user object containing:</p>\n<ul>\n<li><p><code>name</code>: User's name</p>\n</li>\n<li><p><code>email</code>: User's email</p>\n</li>\n<li><p><code>role</code>: User role (default: \"user\")</p>\n</li>\n<li><p><code>active</code>: Account status</p>\n</li>\n<li><p><code>_id</code>: Unique user identifier</p>\n</li>\n<li><p><code>__v</code>: Version key</p>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"variables-used\">Variables Used</h2>\n<ul>\n<li><p><strong>{{URL}}</strong>: Base URL for the API (defined in environment)</p>\n</li>\n<li><p><strong>{{password}}</strong>: Password value (defined in environment for testing purposes)</p>\n</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The JWT token returned in the response should be saved and used for authentication in subsequent API requests</p>\n</li>\n<li><p>Passwords must match between <code>password</code> and <code>passwordConfirm</code> fields</p>\n</li>\n<li><p>Email addresses must be unique across the system</p>\n</li>\n<li><p>The token can be stored in an environment variable for use in other requests</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"23808b45-185c-4469-a7fe-a20c0ba04a87"},{"name":"login","event":[{"listen":"test","script":{"id":"4dbe6872-3733-484c-a45f-5390e6876a59","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"prerequest","script":{"id":"4f854270-89d2-4d22-a7fe-baddcd04d7bb","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"e191a6b3-2c7f-4a84-83ef-dc9e995a1c17","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"admin@tourbooking.io\",\r\n  \"password\": \"{{password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","description":"<h1 id=\"login-user\">Login User</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint authenticates a user by validating their email and password credentials. Upon successful authentication, it returns a JWT (JSON Web Token) that can be used for subsequent authenticated requests throughout the application.</p>\n<h2 id=\"request-details\">Request Details</h2>\n<h3 id=\"method\">Method</h3>\n<p><code>POST</code></p>\n<h3 id=\"url\">URL</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{URL}}api/v1/users/login\n\n</code></pre><h3 id=\"body-parameters\">Body Parameters</h3>\n<p>The request requires a JSON payload with the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user's registered email address</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user's password</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example Request Body:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"tester@test.com\",\n  \"password\": \"{{password}}\"\n}\n\n</code></pre>\n<h2 id=\"authentication-requirements\">Authentication Requirements</h2>\n<p>This endpoint does <strong>not</strong> require authentication. It is a public endpoint used to obtain authentication credentials (JWT token) for subsequent API calls.</p>\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"data\": {\n    \"user\": {\n      \"_id\": \"696c0662b4e8fa3998f39ade\",\n      \"name\": \"tester\",\n      \"email\": \"tester@test.com\",\n      \"role\": \"user\",\n      \"__v\": 0\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>Indicates the success or failure of the request</td>\n</tr>\n<tr>\n<td><code>token</code></td>\n<td>String</td>\n<td>JWT token for authenticated requests</td>\n</tr>\n<tr>\n<td><code>data.user._id</code></td>\n<td>String</td>\n<td>Unique identifier for the user</td>\n</tr>\n<tr>\n<td><code>data.user.name</code></td>\n<td>String</td>\n<td>User's display name</td>\n</tr>\n<tr>\n<td><code>data.user.email</code></td>\n<td>String</td>\n<td>User's email address</td>\n</tr>\n<tr>\n<td><code>data.user.role</code></td>\n<td>String</td>\n<td>User's role in the system (e.g., \"user\", \"admin\")</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"post-response-script-behavior\">Post-Response Script Behavior</h2>\n<p>This request includes an automated post-response script that extracts the JWT token from the response and stores it in the environment variable <code>jwt</code>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">pm.environment.set(\"jwt\", pm.response.json().token);\n\n</code></pre>\n<p><strong>What this means:</strong></p>\n<ul>\n<li><p>After a successful login, the JWT token is automatically saved to your active environment</p>\n</li>\n<li><p>The <code>{{jwt}}</code> variable can be used in subsequent requests for authentication</p>\n</li>\n<li><p>No manual copying of the token is required</p>\n</li>\n</ul>\n<h2 id=\"example-usage-notes\">Example Usage Notes</h2>\n<ol>\n<li><p><strong>Environment Variables</strong>: This request uses two environment variables:</p>\n<ul>\n<li><p><code>{{URL}}</code> - Base API URL (e.g., <code>http://localhost:3000/</code> or <code>https://api.natours.com/</code>)</p>\n</li>\n<li><p><code>{{password}}</code> - User password (stored securely in environment)</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Workflow</strong>:</p>\n<ul>\n<li><p>Send this request with valid credentials</p>\n</li>\n<li><p>The JWT token is automatically saved to the environment</p>\n</li>\n<li><p>Use the saved token in the Authorization header of protected endpoints</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Token Expiration</strong>: JWT tokens typically have an expiration time. If you receive authentication errors on other endpoints, try logging in again to refresh the token.</p>\n</li>\n<li><p><strong>Security Best Practice</strong>: Store sensitive data like passwords in environment variables rather than hardcoding them in the request body.</p>\n</li>\n</ol>\n","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e191a6b3-2c7f-4a84-83ef-dc9e995a1c17"},{"name":"Forgot Password","id":"cb321365-651d-4a29-9cbb-6ba449b530e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"tester@test.com\" \r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","description":"<h2 id=\"forgot-password\">Forgot Password</h2>\n<p>This endpoint initiates the password reset process by sending a reset token to the user's registered email address.</p>\n<h3 id=\"endpoint-details\">Endpoint Details</h3>\n<ul>\n<li><strong>Method:</strong> POST</li>\n<li><strong>URL:</strong> <code>{{URL}}api/v1/users/forgotPassword</code></li>\n</ul>\n<h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>email</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The email address of the user who forgot their password</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example Request Body:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"tester@test.com\"\n}\n</code></pre>\n<h3 id=\"response-format\">Response Format</h3>\n<p><strong>Success Response (200 OK):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"message\": \"token sent to email\"\n}\n</code></pre>\n<h3 id=\"status-codes\">Status Codes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Password reset token successfully sent to the provided email</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Invalid email format or missing email parameter</td>\n</tr>\n<tr>\n<td>404</td>\n<td>No user found with the provided email address</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Server error while processing the request</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"usage-notes\">Usage Notes</h3>\n<ul>\n<li>This endpoint does not require authentication</li>\n<li>The reset token is typically sent via email and has a limited validity period</li>\n<li>After receiving the token, users should use the reset password endpoint to complete the password reset process</li>\n<li>For security reasons, the response does not indicate whether the email exists in the system</li>\n</ul>\n","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb321365-651d-4a29-9cbb-6ba449b530e2"},{"name":"Update Current User Password","event":[{"listen":"test","script":{"id":"866e2d3e-36e5-475d-a7d0-19d716191b5c","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"e74acb6c-d99f-463b-87a2-ed4ccc59015b","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\":\"{{password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMyPassword","description":"<h1 id=\"update-my-password\">Update My Password</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint allows authenticated users to update their own password. After a successful password change, a new JWT token is issued and the user's <code>passwordChangedAt</code> timestamp is updated.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p><strong>Required:</strong> Yes<br />This endpoint requires a valid JWT token. Include the token in the Authorization header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>passowrdCurrent</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user's current password for verification. <strong>Note:</strong> There is a typo in the field name (missing 'w').</td>\n</tr>\n<tr>\n<td><code>password</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The new password the user wants to set.</td>\n</tr>\n<tr>\n<td><code>passwordConfirm</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Confirmation of the new password. Must match the <code>password</code> field.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"passowrdCurrent\": \"{{password}}\",\n  \"password\": \"newSecurePassword123\",\n  \"passwordConfirm\": \"newSecurePassword123\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>Returns a new JWT token and the updated user data.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"data\": {\n    \"user\": {\n      \"_id\": \"696d42f6036855cb4a45d77c\",\n      \"name\": \"tester\",\n      \"email\": \"tester@test.com\",\n      \"role\": \"user\",\n      \"__v\": 0,\n      \"passwordChangedAt\": \"2026-01-18T20:31:55.104Z\"\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>Operation status (success/fail)</td>\n</tr>\n<tr>\n<td><code>token</code></td>\n<td>New JWT token - use this for subsequent authenticated requests</td>\n</tr>\n<tr>\n<td><code>data.user</code></td>\n<td>Updated user object with new <code>passwordChangedAt</code> timestamp</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"important-notes\">Important Notes</h2>\n<ul>\n<li><p>⚠️ <strong>Field Name Typo:</strong> The request body uses <code>passowrdCurrent</code> (missing 'w') instead of <code>passwordCurrent</code>. Ensure you use the exact spelling when making requests.</p>\n</li>\n<li><p>🔄 <strong>Token Update:</strong> A new JWT token is automatically generated and saved to the environment variable <code>jwt</code> via the post-response script.</p>\n</li>\n<li><p>🔒 <strong>Security:</strong> The current password must be provided to verify the user's identity before allowing the password change.</p>\n</li>\n<li><p>✅ <strong>Password Matching:</strong> The <code>password</code> and <code>passwordConfirm</code> fields must match, or the request will fail.</p>\n</li>\n<li><p>📅 <strong>Timestamp:</strong> The <code>passwordChangedAt</code> field is automatically updated to the current timestamp upon successful password change.</p>\n</li>\n</ul>\n<h2 id=\"common-use-cases\">Common Use Cases</h2>\n<ul>\n<li><p>User-initiated password changes from account settings</p>\n</li>\n<li><p>Periodic password rotation for security compliance</p>\n</li>\n<li><p>Password updates after a security incident</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e74acb6c-d99f-463b-87a2-ed4ccc59015b"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"654b5d75-0b33-4a55-9d19-38febd1434f4","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"c44e7840-0862-4807-b4f0-a8e41a94d4a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n  \"password\": \"{{password}}\",\r\n  \"passwordConfirm\": \"{{password}}\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/1cf05f0c9797e95d087d392bb5a11b6e1c8a6b59bc8fee3e244397a1cdd93699","description":"<h1 id=\"reset-password\">Reset Password</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint allows users to reset their password using a valid reset token. The reset token is obtained by first calling the <strong>Forgot Password</strong> endpoint, which sends a password reset email containing the token.</p>\n<h2 id=\"url-structure\">URL Structure</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PATCH {{URL}}api/v1/users/resetPassword/:token\n\n</code></pre><h3 id=\"path-parameters\">Path Parameters</h3>\n<ul>\n<li><strong>token</strong> (required): The password reset token received via email after calling the Forgot Password endpoint. This token is a cryptographically secure string that validates the password reset request.<ul>\n<li>Example: <code>1cf05f0c9797e95d087d392bb5a11b6e1c8a6b59bc8fee3e244397a1cdd93699</code></li>\n</ul>\n</li>\n</ul>\n<h2 id=\"request-body\">Request Body</h2>\n<p>The request body must be in JSON format and include the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>password</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>The new password for the user account</td>\n</tr>\n<tr>\n<td><code>passwordConfirm</code></td>\n<td>string</td>\n<td>Yes</td>\n<td>Confirmation of the new password (must match <code>password</code>)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"password\": \"newSecurePassword123\",\n  \"passwordConfirm\": \"newSecurePassword123\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p>Upon successful password reset, the endpoint returns:</p>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"data\": {\n    \"user\": {\n      \"_id\": \"696d42f6036855cb4a45d77c\",\n      \"name\": \"tester\",\n      \"email\": \"tester@test.com\",\n      \"role\": \"user\",\n      \"__v\": 0,\n      \"passwordChangedAt\": \"2026-01-18T20:40:25.959Z\"\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<ul>\n<li><p><strong>status</strong>: Indicates the success of the operation</p>\n</li>\n<li><p><strong>token</strong>: A new JWT (JSON Web Token) for authenticating subsequent requests</p>\n</li>\n<li><p><strong>data.user</strong>: The updated user object including:</p>\n<ul>\n<li><p><code>_id</code>: User's unique identifier</p>\n</li>\n<li><p><code>name</code>: User's name</p>\n</li>\n<li><p><code>email</code>: User's email address</p>\n</li>\n<li><p><code>role</code>: User's role in the system</p>\n</li>\n<li><p><code>passwordChangedAt</code>: Timestamp of when the password was last changed</p>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"post-response-script\">Post-Response Script</h2>\n<p>This request includes an automated script that runs after receiving a successful response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">pm.environment.set(\"jwt\", pm.response.json().token);\n\n</code></pre>\n<p><strong>What it does</strong>: Automatically extracts the JWT token from the response and saves it to the active environment variable <code>jwt</code>. This allows subsequent authenticated requests to use the new token without manual copying.</p>\n<h2 id=\"prerequisites\">Prerequisites</h2>\n<ol>\n<li><p><strong>Call Forgot Password first</strong>: Before using this endpoint, you must call the \"Forgot Password\" endpoint with the user's email address</p>\n</li>\n<li><p><strong>Check email</strong>: Retrieve the reset token from the password reset email</p>\n</li>\n<li><p><strong>Token validity</strong>: Reset tokens typically expire after a certain period (e.g., 10 minutes). Ensure you use the token before it expires</p>\n</li>\n</ol>\n<h2 id=\"usage-notes\">Usage Notes</h2>\n<ul>\n<li><p>The <code>password</code> and <code>passwordConfirm</code> fields must match exactly, or the request will fail</p>\n</li>\n<li><p>After a successful password reset, the user is automatically logged in (JWT token is provided)</p>\n</li>\n<li><p>The reset token can only be used once. After a successful reset, the token becomes invalid</p>\n</li>\n<li><p>If the token is invalid or expired, you'll need to request a new one via the Forgot Password endpoint</p>\n</li>\n</ul>\n<h2 id=\"error-responses\">Error Responses</h2>\n<p>Common error scenarios:</p>\n<ul>\n<li><p><strong>400 Bad Request</strong>: Password and passwordConfirm don't match, or password doesn't meet requirements</p>\n</li>\n<li><p><strong>400 Bad Request</strong>: Token is invalid or has expired</p>\n</li>\n<li><p><strong>404 Not Found</strong>: No user found with the provided token</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","resetPassword","1cf05f0c9797e95d087d392bb5a11b6e1c8a6b59bc8fee3e244397a1cdd93699"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"c44e7840-0862-4807-b4f0-a8e41a94d4a3"},{"name":"Soft Delete User","id":"bdc90f50-556e-447b-8559-277376111989","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/deleteMe","description":"<h1 id=\"soft-delete-user\">Soft Delete User</h1>\n<h2 id=\"purpose\">Purpose</h2>\n<p>This endpoint performs a <strong>soft delete</strong> operation on the currently authenticated user's account. Instead of permanently removing the user and their data from the database, it marks the account as inactive, preserving all user data for potential recovery or audit purposes.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p><strong>Required:</strong> JWT Bearer Token</p>\n<p>This endpoint requires authentication via a valid JWT token. The token must be included in the request headers:</p>\n<ul>\n<li><p><strong>Header:</strong> <code>Authorization</code></p>\n</li>\n<li><p><strong>Value:</strong> <code>Bearer {{jwt}}</code></p>\n</li>\n</ul>\n<p>The user to be deactivated is identified from the JWT token payload.</p>\n<h2 id=\"endpoint-details\">Endpoint Details</h2>\n<ul>\n<li><p><strong>Method:</strong> <code>DELETE</code></p>\n</li>\n<li><p><strong>URL:</strong> <code>{{URL}}api/v1/users/deleteMe</code></p>\n</li>\n<li><p><strong>Full URL Example:</strong> <code>https://api.example.com/api/v1/users/deleteMe</code></p>\n</li>\n</ul>\n<h2 id=\"expected-behavior\">Expected Behavior</h2>\n<p>When this endpoint is called:</p>\n<ol>\n<li><p>The system identifies the user from the provided JWT token</p>\n</li>\n<li><p>The user's account is marked as inactive/deleted in the database</p>\n</li>\n<li><p>The user's data is <strong>preserved</strong> in the system</p>\n</li>\n<li><p>The user will no longer be able to log in or access protected resources</p>\n</li>\n<li><p>The account can potentially be reactivated by an administrator</p>\n</li>\n</ol>\n<h2 id=\"success-response\">Success Response</h2>\n<ul>\n<li><p><strong>Status Code:</strong> <code>204 No Content</code> (typical for successful DELETE operations)</p>\n</li>\n<li><p><strong>Response Body:</strong> Empty or minimal success message</p>\n</li>\n</ul>\n<h2 id=\"important-notes\">Important Notes</h2>\n<p>⚠️ <strong>This is a SOFT DELETE operation:</strong></p>\n<ul>\n<li><p>User data is NOT permanently removed from the database</p>\n</li>\n<li><p>The account is marked as inactive but remains in the system</p>\n</li>\n<li><p>This approach allows for data recovery and maintains referential integrity</p>\n</li>\n<li><p>User-generated content (reviews, bookings, etc.) remains associated with the account</p>\n</li>\n<li><p>An administrator may be able to reactivate the account if needed</p>\n</li>\n</ul>\n<p>🔒 <strong>Security Considerations:</strong></p>\n<ul>\n<li><p>Only the authenticated user can delete their own account</p>\n</li>\n<li><p>The JWT token determines which account will be deactivated</p>\n</li>\n<li><p>Once deactivated, the same JWT token will no longer grant access to protected resources</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","deleteMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"bdc90f50-556e-447b-8559-277376111989"}],"id":"71aa383b-6238-4674-92ea-9f355109ffab","_postman_id":"71aa383b-6238-4674-92ea-9f355109ffab","description":""},{"name":"Tours","item":[{"name":"Get All Tours","id":"e57f1aaf-40e4-49a1-b786-9d322ced8f1f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"  {\r\n    \"name\": \"New Test Tour\",\r\n    \"duration\": 5,\r\n    \"maxGroupSize\": 25,\r\n    \"difficulty\": \"easy\",\r\n    \"price\": 397,\r\n    \"secrateTour\": false,\r\n    \"summary\": \"Test doc\",\r\n    \"imageCover\": \"tour-1-cover.jpg\",\r\n    \"guides\": [\r\n        \"693f1c789487b970d00c2d9b\",\r\n        \"6937bb35462890109caf6d8d\"\r\n    ]\r\n  }"},"url":"{{URL}}api/v1/tours?price[lt]=1000&ratingsAverage[gte]=4.7","description":"<h1 id=\"get-all-tours\">Get All Tours</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint retrieves all tours from the database that match the specified filter criteria. It allows you to query tours based on price ranges and minimum rating requirements.</p>\n<h2 id=\"query-parameters\">Query Parameters</h2>\n<p>The following query parameters are used to filter the tour results:</p>\n<h3 id=\"pricelt\"><code>price[lt]</code></h3>\n<ul>\n<li><p><strong>Type:</strong> Number</p>\n</li>\n<li><p><strong>Value:</strong> <code>1000</code></p>\n</li>\n<li><p><strong>Description:</strong> Filters tours with a price <strong>less than</strong> 1000 (currency units)</p>\n</li>\n<li><p><strong>Operator:</strong> <code>lt</code> (less than)</p>\n</li>\n</ul>\n<h3 id=\"ratingsaveragegte\"><code>ratingsAverage[gte]</code></h3>\n<ul>\n<li><p><strong>Type:</strong> Number</p>\n</li>\n<li><p><strong>Value:</strong> <code>4.7</code></p>\n</li>\n<li><p><strong>Description:</strong> Filters tours with an average rating <strong>greater than or equal to</strong> 4.7</p>\n</li>\n<li><p><strong>Operator:</strong> <code>gte</code> (greater than or equal)</p>\n</li>\n</ul>\n<h2 id=\"expected-response\">Expected Response</h2>\n<p>The API returns a list of tour objects that satisfy both filter conditions:</p>\n<ul>\n<li><p>Tours with price &lt; 1000</p>\n</li>\n<li><p>Tours with ratingsAverage ≥ 4.7</p>\n</li>\n</ul>\n<p><strong>Response Format:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"results\": &lt;number of tours&gt;,\n  \"data\": {\n    \"tours\": [\n      {\n        \"id\": \"...\",\n        \"name\": \"...\",\n        \"price\": &lt;number less than 1000&gt;,\n        \"ratingsAverage\": &lt;number &gt;= 4.7&gt;,\n        \"duration\": \"...\",\n        \"maxGroupSize\": \"...\",\n        \"difficulty\": \"...\",\n        ...\n      }\n    ]\n  }\n}\n\n</code></pre>\n<h2 id=\"filtering-mechanism\">Filtering Mechanism</h2>\n<p>This endpoint uses MongoDB-style query operators for advanced filtering:</p>\n<ul>\n<li><p><strong>Comparison Operators:</strong></p>\n<ul>\n<li><p><code>[lt]</code> - Less than</p>\n</li>\n<li><p><code>[lte]</code> - Less than or equal</p>\n</li>\n<li><p><code>[gt]</code> - Greater than</p>\n</li>\n<li><p><code>[gte]</code> - Greater than or equal</p>\n</li>\n<li><p><code>[eq]</code> - Equal to</p>\n</li>\n<li><p><code>[ne]</code> - Not equal to</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Multiple Filters:</strong> When multiple query parameters are provided, they are combined with an AND logic (all conditions must be met)</p>\n</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>All filters are applied server-side for optimal performance</p>\n</li>\n<li><p>The filtering mechanism supports any numeric or comparable field in the tour schema</p>\n</li>\n<li><p>Results are returned in the default sort order unless a sort parameter is specified</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"duration[gte]","value":"7"},{"disabled":true,"key":"sort","value":"price"},{"key":"price[lt]","value":"1000"},{"key":"ratingsAverage[gte]","value":"4.7"}],"variable":[]}},"response":[],"_postman_id":"e57f1aaf-40e4-49a1-b786-9d322ced8f1f"},{"name":"Get Tour","id":"4c22682b-bbab-4f3c-b827-3ad14d9ba8ba","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955","description":"<h1 id=\"get-tour-by-id\">Get Tour by ID</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Retrieves detailed information about a specific tour using its unique identifier. This endpoint returns comprehensive tour data including itinerary, pricing, ratings, guides, and customer reviews.</p>\n<h2 id=\"request-details\">Request Details</h2>\n<p><strong>Method:</strong> <code>GET</code></p>\n<p><strong>Endpoint:</strong> <code>{{URL}}api/v1/tours/:tourId</code></p>\n<h3 id=\"path-parameters\">Path Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>tourId</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The unique identifier of the tour (MongoDB ObjectId format)</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Example:</strong> <code>{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955</code></p>\n<h2 id=\"response-structure\">Response Structure</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>The response returns a JSON object with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      // Tour object with detailed information\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"key-response-fields\">Key Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>String</td>\n<td>The name of the tour</td>\n</tr>\n<tr>\n<td><code>duration</code></td>\n<td>Number</td>\n<td>Tour duration in days</td>\n</tr>\n<tr>\n<td><code>durationWeek</code></td>\n<td>Number</td>\n<td>Tour duration in weeks (calculated)</td>\n</tr>\n<tr>\n<td><code>maxGroupSize</code></td>\n<td>Number</td>\n<td>Maximum number of participants</td>\n</tr>\n<tr>\n<td><code>difficulty</code></td>\n<td>String</td>\n<td>Difficulty level (easy, medium, difficult)</td>\n</tr>\n<tr>\n<td><code>ratingsAverage</code></td>\n<td>Number</td>\n<td>Average rating (0-5)</td>\n</tr>\n<tr>\n<td><code>ratingsQuantity</code></td>\n<td>Number</td>\n<td>Total number of ratings</td>\n</tr>\n<tr>\n<td><code>price</code></td>\n<td>Number</td>\n<td>Tour price in USD</td>\n</tr>\n<tr>\n<td><code>summary</code></td>\n<td>String</td>\n<td>Brief tour description</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td>String</td>\n<td>Detailed tour description</td>\n</tr>\n<tr>\n<td><code>imageCover</code></td>\n<td>String</td>\n<td>Main tour image filename</td>\n</tr>\n<tr>\n<td><code>images</code></td>\n<td>Array</td>\n<td>Additional tour images</td>\n</tr>\n<tr>\n<td><code>startDates</code></td>\n<td>Array</td>\n<td>Available tour start dates (ISO 8601 format)</td>\n</tr>\n<tr>\n<td><code>startLocation</code></td>\n<td>Object</td>\n<td>Starting point with coordinates and address</td>\n</tr>\n<tr>\n<td><code>locations</code></td>\n<td>Array</td>\n<td>Tour stops with coordinates, descriptions, and day numbers</td>\n</tr>\n<tr>\n<td><code>guides</code></td>\n<td>Array</td>\n<td>Tour guide information (name, email, role)</td>\n</tr>\n<tr>\n<td><code>reviews</code></td>\n<td>Array</td>\n<td>Customer reviews with ratings and user details</td>\n</tr>\n<tr>\n<td><code>slug</code></td>\n<td>String</td>\n<td>URL-friendly tour identifier</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-response\">Example Response</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"_id\": \"5c88fa8cf4afda39709c2955\",\n      \"name\": \"The Sea Explorer\",\n      \"duration\": 7,\n      \"maxGroupSize\": 15,\n      \"difficulty\": \"medium\",\n      \"ratingsAverage\": 4.8,\n      \"ratingsQuantity\": 6,\n      \"price\": 497,\n      \"summary\": \"Exploring the jaw-dropping US east coast by foot and by boat\",\n      \"startLocation\": {\n        \"type\": \"Point\",\n        \"coordinates\": [-80.185942, 25.774772],\n        \"address\": \"301 Biscayne Blvd, Miami, FL 33132, USA\",\n        \"description\": \"Miami, USA\"\n      },\n      \"locations\": [\n        {\n          \"type\": \"Point\",\n          \"coordinates\": [-80.128473, 25.781842],\n          \"description\": \"Lummus Park Beach\",\n          \"day\": 1\n        }\n      ],\n      \"guides\": [\n        {\n          \"_id\": \"5c8a22c62f8fb814b56fa18b\",\n          \"name\": \"Miyah Myles\",\n          \"email\": \"miyah@example.com\",\n          \"role\": \"lead-guide\"\n        }\n      ],\n      \"reviews\": [\n        {\n          \"_id\": \"5c8a34ed14eb5c17645c9108\",\n          \"review\": \"Amazing experience!\",\n          \"rating\": 5,\n          \"user\": {\n            \"name\": \"Lourdes Browning\",\n            \"photo\": \"user-2.jpg\"\n          }\n        }\n      ]\n    }\n  }\n}\n\n</code></pre>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p><strong>GeoJSON Format:</strong> Location data uses GeoJSON Point format with longitude/latitude coordinates</p>\n</li>\n<li><p><strong>Populated Data:</strong> The response includes populated references to guides and reviews with full user details</p>\n</li>\n<li><p><strong>Image References:</strong> Image fields contain filenames that should be resolved to full URLs on the client side</p>\n</li>\n<li><p><strong>Date Format:</strong> All dates are in ISO 8601 format (e.g., <code>2026-06-19T09:00:00.000Z</code>)</p>\n</li>\n<li><p><strong>Calculated Fields:</strong> Some fields like <code>durationWeek</code> are virtual properties calculated from other fields</p>\n</li>\n<li><p><strong>Reviews:</strong> Reviews are embedded with user information and sorted by creation date</p>\n</li>\n</ul>\n<h2 id=\"use-cases\">Use Cases</h2>\n<ul>\n<li><p>Display detailed tour information on tour detail pages</p>\n</li>\n<li><p>Show tour itinerary with location markers on maps</p>\n</li>\n<li><p>Present guide information and customer reviews</p>\n</li>\n<li><p>Enable booking functionality with available start dates</p>\n</li>\n<li><p>Calculate and display tour metrics (ratings, duration, price)</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2955"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c22682b-bbab-4f3c-b827-3ad14d9ba8ba"},{"name":"Get Monthly Plan","id":"aea59027-8355-4d20-a137-01f0ded8ee94","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/2022","description":"<h2 id=\"get-monthly-tour-plan\">Get Monthly Tour Plan</h2>\n<p>This endpoint retrieves aggregated statistics about tour starts per month for a specific year. It provides a comprehensive overview of tour scheduling and distribution throughout the year.</p>\n<h3 id=\"endpoint-purpose\">Endpoint Purpose</h3>\n<p>Returns monthly tour planning data, including the number of tour starts and the names of tours scheduled for each month in the specified year.</p>\n<h3 id=\"path-parameters\">Path Parameters</h3>\n<ul>\n<li><strong>year</strong> (required): The year for which to retrieve the monthly tour plan (e.g., 2022)</li>\n</ul>\n<h3 id=\"expected-response-format\">Expected Response Format</h3>\n<p>The endpoint returns a JSON object with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"plan\": [\n      {\n        \"numTourStarts\": 3,\n        \"tours\": [\"The Snow Adventurer\", \"The Star Gazer\", \"The Northern Lights\"],\n        \"month\": 1\n      }\n    ]\n  }\n}\n\n</code></pre>\n<p><strong>Response Fields:</strong></p>\n<ul>\n<li><p><code>status</code>: Indicates the success or failure of the request</p>\n</li>\n<li><p><code>data.plan</code>: Array of monthly tour statistics</p>\n<ul>\n<li><p><code>numTourStarts</code>: Number of tours starting in that month</p>\n</li>\n<li><p><code>tours</code>: Array of tour names scheduled for that month</p>\n</li>\n<li><p><code>month</code>: Month number (1-12)</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"usage-notes\">Usage Notes</h3>\n<ul>\n<li><p>The response only includes months that have scheduled tour starts</p>\n</li>\n<li><p>Months without any tour starts will not appear in the response array</p>\n</li>\n<li><p>Tour names are returned as an array, allowing multiple tours per month</p>\n</li>\n<li><p>The plan array is not necessarily sorted by month number</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","monthly-plan","2022"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"aea59027-8355-4d20-a137-01f0ded8ee94"},{"name":"Get Tour Status","id":"fbd0c8d1-a1bb-4e93-bf62-a7952b1a0988","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tour-status","description":"<h1 id=\"get-tour-statistics-by-difficulty\">Get Tour Statistics by Difficulty</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint retrieves aggregated statistics for all tours in the system, grouped by their difficulty level. It provides valuable insights into tour distribution, pricing, and ratings across different difficulty categories.</p>\n<h2 id=\"response-structure\">Response Structure</h2>\n<p>The endpoint returns a success response containing a <code>stats</code> array. Each object in the array represents statistics for a specific difficulty level.</p>\n<h3 id=\"response-fields\">Response Fields</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>_id</code></td>\n<td>String</td>\n<td>The difficulty level of the tours (e.g., \"EASY\", \"MEDIUM\", \"DIFFICULT\")</td>\n</tr>\n<tr>\n<td><code>numTours</code></td>\n<td>Number</td>\n<td>Total number of tours available at this difficulty level</td>\n</tr>\n<tr>\n<td><code>numRatings</code></td>\n<td>Number</td>\n<td>Total number of ratings received across all tours in this difficulty category</td>\n</tr>\n<tr>\n<td><code>avgRating</code></td>\n<td>Number</td>\n<td>Average rating score for tours in this difficulty level</td>\n</tr>\n<tr>\n<td><code>avgPrice</code></td>\n<td>Number</td>\n<td>Average price of tours in this difficulty category</td>\n</tr>\n<tr>\n<td><code>minPrice</code></td>\n<td>Number</td>\n<td>Lowest priced tour in this difficulty level</td>\n</tr>\n<tr>\n<td><code>maxPrice</code></td>\n<td>Number</td>\n<td>Highest priced tour in this difficulty level</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-use-case\">Example Use Case</h2>\n<p>This endpoint is useful for:</p>\n<ul>\n<li><p>Displaying tour statistics on a dashboard or analytics page</p>\n</li>\n<li><p>Helping users understand the distribution of tours by difficulty</p>\n</li>\n<li><p>Comparing pricing and ratings across different difficulty levels</p>\n</li>\n<li><p>Making data-driven decisions about tour offerings</p>\n</li>\n</ul>\n<h2 id=\"requirements\">Requirements</h2>\n<p>⚠️ <strong>Note:</strong> This request requires the <code>{{URL}}</code> environment variable to be set with your API base URL (e.g., <code>https://api.natours.com/</code>)</p>\n<h2 id=\"sample-response\">Sample Response</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"stats\": [\n      {\n        \"_id\": \"EASY\",\n        \"numTours\": 4,\n        \"numRatings\": 21,\n        \"avgRating\": 4.7,\n        \"avgPrice\": 872,\n        \"minPrice\": 397,\n        \"maxPrice\": 997\n      }\n    ]\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","tours","tour-status"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"fbd0c8d1-a1bb-4e93-bf62-a7952b1a0988"},{"name":"Get Top 5 Cheap Tours","id":"00d1c042-bfa7-4c95-9323-1f4611c6b1ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top-5-cheap","description":"<h1 id=\"get-top-5-cheap-tours\">Get Top 5 Cheap Tours</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint retrieves the top 5 cheapest tours from the database, providing a curated list of budget-friendly tour options with the best ratings.</p>\n<h2 id=\"request-details\">Request Details</h2>\n<ul>\n<li><strong>Method:</strong> GET</li>\n<li><strong>Endpoint:</strong> <code>{{URL}}api/v1/tours/top-5-cheap</code></li>\n<li><strong>Authentication:</strong> Required (uses bearer token from environment)</li>\n</ul>\n<h2 id=\"functionality\">Functionality</h2>\n<p>This endpoint returns a pre-filtered and sorted list of tours optimized for users looking for affordable, highly-rated tour options. The results are:</p>\n<ul>\n<li><strong>Sorted by:</strong> Rating (highest first), then by price (lowest first)</li>\n<li><strong>Limited to:</strong> Maximum of 5 tours</li>\n<li><strong>Filtered:</strong> Excludes any secret/hidden tours from the results</li>\n</ul>\n<h2 id=\"response-structure\">Response Structure</h2>\n<p>The response returns tour documents with the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>String</td>\n<td>The name of the tour</td>\n</tr>\n<tr>\n<td><code>price</code></td>\n<td>Number</td>\n<td>The price of the tour</td>\n</tr>\n<tr>\n<td><code>ratingsAverage</code></td>\n<td>Number</td>\n<td>The average rating of the tour</td>\n</tr>\n<tr>\n<td><code>summary</code></td>\n<td>String</td>\n<td>A brief summary of the tour</td>\n</tr>\n<tr>\n<td><code>difficulty</code></td>\n<td>String</td>\n<td>The difficulty level of the tour</td>\n</tr>\n<tr>\n<td><code>guides</code></td>\n<td>Array</td>\n<td>List of tour guides assigned to this tour</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"example-response\">Example Response</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": [\n      {\n        \"name\": \"Tour Name\",\n        \"price\": 299,\n        \"ratingsAverage\": 4.8,\n        \"summary\": \"Tour summary\",\n        \"difficulty\": \"easy\",\n        \"guides\": [...]\n      }\n    ]\n  }\n}\n</code></pre>\n<h2 id=\"use-cases\">Use Cases</h2>\n<ul>\n<li>Display featured budget tours on the homepage</li>\n<li>Provide quick recommendations for price-conscious customers</li>\n<li>Showcase value-for-money tour options</li>\n</ul>\n","urlObject":{"path":["v1","tours","top-5-cheap"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"00d1c042-bfa7-4c95-9323-1f4611c6b1ea"},{"name":"Get Distances to Tours From Point","id":"864bae3a-2636-465d-bda0-669187d5f363","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/distances/-117.68027936629767,33.578014746144014/unit/mi","description":"<h1 id=\"get-distances-to-tours-from-point\">Get Distances to Tours From Point</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint calculates the distance from a specific geographic point (latitude/longitude coordinates) to all available tours in the system. It returns a sorted list of tours with their calculated distances, making it useful for finding nearby tours or determining travel requirements.</p>\n<h2 id=\"url-parameters\">URL Parameters</h2>\n<h3 id=\"coordinates\">Coordinates</h3>\n<p><strong>Format:</strong> <code>longitude,latitude</code><br /><strong>Example:</strong> <code>-117.68027936629767,33.578014746144014</code></p>\n<ul>\n<li><strong>Longitude:</strong> The east-west position of your starting point (range: -180 to 180)</li>\n<li><strong>Latitude:</strong> The north-south position of your starting point (range: -90 to 90)</li>\n</ul>\n<h3 id=\"unit\">Unit</h3>\n<p><strong>Format:</strong> <code>/unit/{unit}</code><br /><strong>Options:</strong> </p>\n<ul>\n<li><code>mi</code> - Miles</li>\n<li><code>km</code> - Kilometers</li>\n</ul>\n<p>Specifies the unit of measurement for the returned distances.</p>\n<h2 id=\"response-format\">Response Format</h2>\n<p>The endpoint returns a JSON object with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": [\n      {\n        \"_id\": \"tour_id\",\n        \"name\": \"Tour Name\",\n        \"distance\": 71.03\n      }\n    ]\n  }\n}\n</code></pre>\n<p><strong>Response Fields:</strong></p>\n<ul>\n<li><code>_id</code>: Unique identifier for the tour</li>\n<li><code>name</code>: Name of the tour</li>\n<li><code>distance</code>: Calculated distance from the specified point in the requested unit</li>\n</ul>\n<p>Tours are typically returned sorted by distance (closest first).</p>\n<h2 id=\"example-use-case\">Example Use Case</h2>\n<p>A travel booking application wants to show users which tours are closest to their current location in Los Angeles, CA (coordinates: -117.68, 33.58). By calling this endpoint with their coordinates and specifying miles as the unit, the app can display a list like:</p>\n<ul>\n<li>\"The Sports Lover\" - 71 miles away</li>\n<li>\"The Park Camper\" - 226 miles away</li>\n<li>\"The Wine Taster\" - 416 miles away</li>\n</ul>\n<p>This helps users make informed decisions about which tours are most accessible from their location.</p>\n","urlObject":{"path":["v1","tours","distances","-117.68027936629767,33.578014746144014","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"864bae3a-2636-465d-bda0-669187d5f363"},{"name":"Get Tours Within Radius","id":"8eb7c9c5-35ab-49f9-a45e-bb8d32a776eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tours-within/2000/center/-117.32324032947227, 52.37559917665913/unit/mi","description":"<h1 id=\"get-tours-within-radius\">Get Tours Within Radius</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint retrieves all tours that fall within a specified radius from a given center point. It uses geospatial queries to find tours based on their starting location, making it ideal for location-based tour discovery.</p>\n<h2 id=\"url-parameters\">URL Parameters</h2>\n<p>The endpoint uses the following path parameters in the format:<br /><code>/tours-within/:distance/center/:coordinates/unit/:unit</code></p>\n<h3 id=\"distance\">Distance</h3>\n<ul>\n<li><p><strong>Parameter</strong>: <code>distance</code> (e.g., <code>2000</code>)</p>\n</li>\n<li><p><strong>Description</strong>: The radius distance from the center point</p>\n</li>\n<li><p><strong>Type</strong>: Number</p>\n</li>\n<li><p><strong>Example</strong>: <code>2000</code> means search within 2000 units from the center</p>\n</li>\n</ul>\n<h3 id=\"center-coordinates\">Center Coordinates</h3>\n<ul>\n<li><p><strong>Parameter</strong>: <code>coordinates</code> (e.g., <code>-117.32324032947227, 52.37559917665913</code>)</p>\n</li>\n<li><p><strong>Description</strong>: The latitude and longitude of the center point for the search</p>\n</li>\n<li><p><strong>Format</strong>: <code>longitude, latitude</code> (comma-separated)</p>\n</li>\n<li><p><strong>Example</strong>: <code>-117.32324032947227, 52.37559917665913</code></p>\n</li>\n<li><p><strong>Note</strong>: Coordinates should be provided as longitude first, then latitude</p>\n</li>\n</ul>\n<h3 id=\"unit\">Unit</h3>\n<ul>\n<li><p><strong>Parameter</strong>: <code>unit</code> (e.g., <code>mi</code>)</p>\n</li>\n<li><p><strong>Description</strong>: The unit of measurement for the distance</p>\n</li>\n<li><p><strong>Accepted Values</strong>:</p>\n<ul>\n<li><p><code>mi</code> - Miles</p>\n</li>\n<li><p><code>km</code> - Kilometers</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Example</strong>: <code>mi</code> for miles</p>\n</li>\n</ul>\n<h2 id=\"response-structure\">Response Structure</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"result\": 7,\n  \"data\": {\n    \"data\": [\n      {\n        \"_id\": \"tour_id\",\n        \"name\": \"Tour Name\",\n        \"duration\": 5,\n        \"maxGroupSize\": 8,\n        \"difficulty\": \"easy\",\n        \"ratingsAverage\": 4.4,\n        \"ratingsQuantity\": 7,\n        \"price\": 1997,\n        \"summary\": \"Brief tour description\",\n        \"description\": \"Detailed tour description\",\n        \"imageCover\": \"tour-image.jpg\",\n        \"images\": [\"image1.jpg\", \"image2.jpg\"],\n        \"startDates\": [\"2026-04-14T09:00:00.000Z\"],\n        \"startLocation\": {\n          \"type\": \"Point\",\n          \"coordinates\": [-122.29286, 38.294065],\n          \"address\": \"Full address\",\n          \"description\": \"Location description\"\n        },\n        \"locations\": [...],\n        \"guides\": [...]\n      }\n    ]\n  }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<ul>\n<li><p><strong>status</strong>: Request status (<code>success</code>)</p>\n</li>\n<li><p><strong>result</strong>: Number of tours found within the specified radius</p>\n</li>\n<li><p><strong>data.data</strong>: Array of tour objects containing:</p>\n<ul>\n<li><p>Basic info: name, duration, difficulty, price</p>\n</li>\n<li><p>Ratings: ratingsAverage, ratingsQuantity</p>\n</li>\n<li><p>Media: imageCover, images array</p>\n</li>\n<li><p>Locations: startLocation with coordinates and address</p>\n</li>\n<li><p>Additional details: guides, locations, start dates</p>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"example-use-case\">Example Use Case</h2>\n<p><strong>Scenario</strong>: A user in Manitoba, Canada wants to find all available tours within 2000 miles of their location.</p>\n<p><strong>Request</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET {{URL}}api/v1/tours/tours-within/2000/center/-117.32324032947227,52.37559917665913/unit/mi\n\n</code></pre><p><strong>Result</strong>: Returns 7 tours including \"The Wine Taster\" in California, \"The Park Camper\" in Las Vegas, \"The Sports Lover\" in Malibu, and others that fall within the 2000-mile radius from the specified coordinates.</p>\n<p>This is particularly useful for:</p>\n<ul>\n<li><p>Travel planning applications showing nearby tours</p>\n</li>\n<li><p>Mobile apps with location-based tour recommendations</p>\n</li>\n<li><p>Regional tour discovery features</p>\n</li>\n<li><p>Distance-based tour filtering</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","tours-within","2000","center","-117.32324032947227, 52.37559917665913","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8eb7c9c5-35ab-49f9-a45e-bb8d32a776eb"},{"name":"Create New Tour","id":"917bbdbc-96d6-4f85-bf60-1a7778a3198f","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\": \"New Test Tour\",\r\n    \"duration\": 5,\r\n    \"maxGroupSize\": 25,\r\n    \"difficulty\": \"easy\",\r\n    \"price\": 397,\r\n    \"secrateTour\": false,\r\n    \"summary\": \"Test doc\",\r\n    \"imageCover\": \"tour-1-cover.jpg\"\r\n  }","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours","description":"<h1 id=\"create-new-tour\">Create New Tour</h1>\n<p>Creates a new tour in the system with the specified details including duration, pricing, difficulty level, and other tour-specific information.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>Method:</strong> <code>POST</code><br /><strong>URL:</strong> <code>{{URL}}api/v1/tours</code></p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires authentication using a JWT token. The token should be included in the request headers.</p>\n<p><strong>Required Variable:</strong> <code>{{jwt}}</code></p>\n<h2 id=\"request-body\">Request Body</h2>\n<p>The request body should be in JSON format with the following schema:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>name</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The name of the tour</td>\n</tr>\n<tr>\n<td><code>duration</code></td>\n<td>Number</td>\n<td>Yes</td>\n<td>Duration of the tour in days</td>\n</tr>\n<tr>\n<td><code>maxGroupSize</code></td>\n<td>Number</td>\n<td>Yes</td>\n<td>Maximum number of participants allowed</td>\n</tr>\n<tr>\n<td><code>difficulty</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Difficulty level (e.g., \"easy\", \"medium\", \"difficult\")</td>\n</tr>\n<tr>\n<td><code>price</code></td>\n<td>Number</td>\n<td>Yes</td>\n<td>Price of the tour in the base currency</td>\n</tr>\n<tr>\n<td><code>summary</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Brief summary/description of the tour</td>\n</tr>\n<tr>\n<td><code>imageCover</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Filename or URL of the tour's cover image</td>\n</tr>\n<tr>\n<td><code>secrateTour</code></td>\n<td>Boolean</td>\n<td>No</td>\n<td>Whether this is a secret/private tour (default: false)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"New Test Tour\",\n  \"duration\": 5,\n  \"maxGroupSize\": 25,\n  \"difficulty\": \"easy\",\n  \"price\": 397,\n  \"secrateTour\": false,\n  \"summary\": \"Test doc\",\n  \"imageCover\": \"tour-1-cover.jpg\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response-201-created\">Success Response (201 Created)</h3>\n<p>When a tour is successfully created, the API returns a <code>201 Created</code> status with the complete tour object including system-generated fields.</p>\n<p><strong>Response Structure:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"name\": \"New Test Tour\",\n      \"duration\": 5,\n      \"maxGroupSize\": 25,\n      \"difficulty\": \"easy\",\n      \"ratingsAverage\": 4.5,\n      \"ratingsQuantity\": 0,\n      \"price\": 397,\n      \"summary\": \"Test doc\",\n      \"imageCover\": \"tour-1-cover.jpg\",\n      \"images\": [],\n      \"startDates\": [],\n      \"secrateTour\": false,\n      \"guides\": [],\n      \"_id\": \"696adfa22ebd9af633b97bee\",\n      \"createdAt\": \"2026-01-17T01:02:26.046Z\",\n      \"locations\": [],\n      \"slug\": \"new-test-tour\",\n      \"__v\": 0,\n      \"durationWeek\": 0.7142857142857143,\n      \"id\": \"696adfa22ebd9af633b97bee\"\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\n<p>The response includes all submitted fields plus additional system-generated fields:</p>\n<ul>\n<li><p><code>_id</code> / <code>id</code>: Unique identifier for the tour</p>\n</li>\n<li><p><code>createdAt</code>: Timestamp when the tour was created</p>\n</li>\n<li><p><code>slug</code>: URL-friendly version of the tour name</p>\n</li>\n<li><p><code>ratingsAverage</code>: Average rating (default: 4.5)</p>\n</li>\n<li><p><code>ratingsQuantity</code>: Number of ratings (default: 0)</p>\n</li>\n<li><p><code>durationWeek</code>: Duration converted to weeks</p>\n</li>\n<li><p><code>images</code>: Array of additional tour images</p>\n</li>\n<li><p><code>startDates</code>: Array of tour start dates</p>\n</li>\n<li><p><code>guides</code>: Array of tour guides</p>\n</li>\n<li><p><code>locations</code>: Array of tour locations</p>\n</li>\n<li><p><code>__v</code>: Version key (MongoDB)</p>\n</li>\n</ul>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Ensure all required fields are provided in the request body</p>\n</li>\n<li><p>The <code>{{URL}}</code> variable should point to your API base URL</p>\n</li>\n<li><p>The tour slug is automatically generated from the tour name</p>\n</li>\n<li><p>Default ratings are initialized when a tour is created</p>\n</li>\n<li><p>Duration in weeks is automatically calculated from the duration in days</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"917bbdbc-96d6-4f85-bf60-1a7778a3198f"},{"name":"Update Tour","id":"4700550c-ba15-4b6e-9e0d-f2bfa11fb0ab","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","src":"/D:/Learn JS/NodeJS/TourBookingApp/dev-data/img/new-tour-1.jpg"},{"type":"file","key":"images","src":"/D:/Learn JS/NodeJS/TourBookingApp/dev-data/img/new-tour-2.jpg"},{"type":"file","key":"images","src":"/D:/Learn JS/NodeJS/TourBookingApp/dev-data/img/new-tour-3.jpg"},{"type":"file","key":"images","src":"/D:/Learn JS/NodeJS/TourBookingApp/dev-data/img/new-tour-4.jpg"},{"key":"price","value":"997","type":"text","uuid":"b3bbce16-0ac3-40d8-ad88-1c04cf5f44f3"}]},"url":"{{URL}}api/v1/tours/69d269fe8a30322c23cfbdb8","urlObject":{"path":["v1","tours","69d269fe8a30322c23cfbdb8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4700550c-ba15-4b6e-9e0d-f2bfa11fb0ab"},{"name":"Delete Tour","id":"7fa657e1-94b4-43a2-ab03-510eca345585","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"test tour\",\r\n    \"duration\": 10\r\n}"},"url":"{{URL}}api/v1/tours/69402d3b93d64cecf226fd3e","urlObject":{"path":["v1","tours","69402d3b93d64cecf226fd3e"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7fa657e1-94b4-43a2-ab03-510eca345585"}],"id":"a1c87fc7-1404-4789-b52d-338dbd1b7288","_postman_id":"a1c87fc7-1404-4789-b52d-338dbd1b7288","description":""},{"name":"Users","item":[{"name":"Get All Users","id":"374bddbe-cb6f-4dac-aae7-30ceddeb2b89","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY5MDUyMTg2MmZjNjllZWVhNDg5MTc3MiIsImlhdCI6MTc2MTk0Mzk0MywiZXhwIjoxNzY5NzE5OTQzfQ.iW1J493jpKS0BBjVrFMw9ItodN6C64YJBl-MS3YcwJM","type":"text"}],"url":"{{URL}}api/v1/users?role=user","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[{"key":"role","value":"user"}],"variable":[]}},"response":[],"_postman_id":"374bddbe-cb6f-4dac-aae7-30ceddeb2b89"},{"name":"Get User","id":"8b5a01db-d912-4f72-a64d-9c2b99fc95ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/users/","urlObject":{"path":["v1","users",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8b5a01db-d912-4f72-a64d-9c2b99fc95ba"},{"name":"Get Current User","id":"a25988d4-2229-4732-a338-61f2912163c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/me","description":"<h1 id=\"get-current-user-me\">Get Current User (Me)</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Returns data for the currently authenticated user (signed in or just signed up).</p>\n<hr />\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>GET</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{URL}}/api/v1/users/me\n\n</code></pre><hr />\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires a valid Bearer Token.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><hr />\n<h2 id=\"success-response-200\">Success Response (200)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"_id\": \"696c0662b4e8fa3998f39ade\",\n      \"name\": \"tester\",\n      \"email\": \"tester@test.com\",\n      \"role\": \"user\",\n      \"__v\": 0,\n      \"passwordResetExpires\": \"2026-01-17T22:15:57.392Z\",\n      \"passwordResetToken\": \"afd705504438fb9cb36fbf6d300e6ff36e8d2641e64fccf5a74251affc5666e7\"\n    }\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Returns the currently logged-in user</p>\n</li>\n<li><p>User is identified from the JWT</p>\n</li>\n<li><p>Sensitive fields may be hidden depending on backend settings</p>\n</li>\n<li><p>Returns <strong>401 Unauthorized</strong> if token is missing or invalid</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","me"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"role","value":"user"}],"variable":[]}},"response":[],"_postman_id":"a25988d4-2229-4732-a338-61f2912163c2"},{"name":"Update User","id":"2920593a-da08-48cd-a35d-88ae48d02414","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\":\"FinalTest\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/696c0662b4e8fa3998f39ade","description":"<h1 id=\"update-user-admin-only\">Update User (Admin Only)</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Updates user data by ID.<br />This action is <strong>restricted to admin users only</strong>.</p>\n<hr />\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>PATCH</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{URL}}/api/v1/users/:userId\n\n</code></pre><hr />\n<h2 id=\"authentication\">Authentication</h2>\n<p>Admin authorization required.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><hr />\n<h2 id=\"path-parameter\">Path Parameter</h2>\n<ul>\n<li><code>userId</code> → ID of the user to be updated</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>696c0662b4e8fa3998f39ade\n\n</code></pre><hr />\n<h2 id=\"request-body\">Request Body</h2>\n<p>Send only the fields you want to update.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Updated Name\",\n  \"role\": \"user\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"success-response-200\">Success Response (200)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"_id\": \"696c0662b4e8fa3998f39ade\",\n      \"name\": \"Updated Name\",\n      \"role\": \"user\"\n    }\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Only users with <strong>admin role</strong> can access this endpoint</p>\n</li>\n<li><p>Send partial data (PATCH)</p>\n</li>\n<li><p>Sensitive fields may be restricted by backend</p>\n</li>\n<li><p>Returns <strong>403 Forbidden</strong> if user is not admin</p>\n</li>\n<li><p>Returns <strong>404</strong> if user does not exist</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","696c0662b4e8fa3998f39ade"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2920593a-da08-48cd-a35d-88ae48d02414"},{"name":"Update Current User","id":"6bd7c7d1-f56e-4b99-bc45-511d1a4199cd","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":"The perfect Tester\n","type":"text","uuid":"1f5161cb-99bd-46a9-97b2-de9c874bc812","disabled":true},{"key":"photo","type":"file","uuid":"1ed5e925-970a-464c-a3b5-a9f2685fc1b1","src":"/D:/Learn JS/NodeJS/TourBookingApp/dev-data/img/aarav.jpg"}]},"url":"{{URL}}api/v1/users/updateMe","description":"<h1 id=\"update-current-user-data\">Update Current User Data</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint allows the currently authenticated user to update their own profile data. It provides a secure way for users to modify their account information without requiring administrator privileges.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p><strong>Required:</strong> JWT Bearer Token</p>\n<p>The request must include a valid JWT token in the Authorization header. The token identifies the user whose data will be updated.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PATCH {{URL}}api/v1/users/updateMe\n\n</code></pre><h2 id=\"updatable-fields\">Updatable Fields</h2>\n<p>The following fields can be updated through this endpoint:</p>\n<ul>\n<li><strong>name</strong> - The user's display name</li>\n</ul>\n<h2 id=\"request-body\">Request Body</h2>\n<p><strong>Content-Type:</strong> <code>application/json</code></p>\n<h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"Better Tester\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"user\": {\n      \"_id\": \"696d42f6036855cb4a45d77c\",\n      \"name\": \"Better Tester\",\n      \"email\": \"tester@test.com\",\n      \"role\": \"user\",\n      \"__v\": 0,\n      \"passwordChangedAt\": \"2026-01-18T20:40:25.959Z\"\n    }\n  }\n}\n\n</code></pre>\n<p>The response includes the complete updated user object with all current field values.</p>\n<h2 id=\"important-notes\">Important Notes</h2>\n<ul>\n<li><p>⚠️ <strong>Password Updates:</strong> This endpoint should NOT be used to update passwords. Use the dedicated \"Update My Password\" endpoint instead for password changes.</p>\n</li>\n<li><p>⚠️ <strong>Email Updates:</strong> Depending on your API implementation, email changes may require additional verification steps and might not be allowed through this endpoint.</p>\n</li>\n<li><p>⚠️ <strong>Role Changes:</strong> Users cannot change their own role through this endpoint. Role modifications require administrator access.</p>\n</li>\n<li><p>✅ <strong>Authentication Required:</strong> Only authenticated users can update their own data. The JWT token determines which user's data is updated.</p>\n</li>\n<li><p>✅ <strong>Self-Service Only:</strong> Users can only update their own profile data, not other users' data.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6bd7c7d1-f56e-4b99-bc45-511d1a4199cd"},{"name":"Delete User","id":"b4c83b9f-5903-4c6c-ba7c-bbff359b1da6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/696c0662b4e8fa3998f39ade","description":"<h1 id=\"delete-user-admin-only\">Delete User (Admin Only)</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Deletes a user by ID.<br />This action is <strong>restricted to admin users only</strong>.</p>\n<hr />\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>DELETE</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{URL}}/api/v1/users/:userId\n\n</code></pre><hr />\n<h2 id=\"authentication\">Authentication</h2>\n<p>Admin authorization required.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><hr />\n<h2 id=\"path-parameter\">Path Parameter</h2>\n<ul>\n<li><code>userId</code> → ID of the user to be deleted</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>696c0662b4e8fa3998f39ade\n\n</code></pre><hr />\n<h2 id=\"success-response-204\">Success Response (204)</h2>\n<p>No content is returned.</p>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Only users with <strong>admin role</strong> can access this endpoint</p>\n</li>\n<li><p>Action is irreversible</p>\n</li>\n<li><p>Returns <strong>403 Forbidden</strong> if user is not admin</p>\n</li>\n<li><p>Returns <strong>404</strong> if user does not exist</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","696c0662b4e8fa3998f39ade"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b4c83b9f-5903-4c6c-ba7c-bbff359b1da6"}],"id":"52919fcb-b623-4f0d-a470-09fbcdbdee21","_postman_id":"52919fcb-b623-4f0d-a470-09fbcdbdee21","description":""},{"name":"Reviews","item":[{"name":"Get All Reviews","id":"07acc0de-214a-4bdf-9744-73585ea6e74c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n  \"review\": \"This tour was amazing and very well organized!\",\r\n  \"rating\": 2,\r\n  \"tour\": \"69402d3b93d64cecf226fd3e\",\r\n  \"user\": \"6937bb35462890109caf6d8d\"\r\n}\r\n"},"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"rating[lte]","value":"3"}],"variable":[]}},"response":[],"_postman_id":"07acc0de-214a-4bdf-9744-73585ea6e74c"},{"name":"Get Review","id":"af7bad4f-583c-48cb-b5e2-85ea5ff9d435","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/69409cb15d15c45702134bbe","urlObject":{"path":["v1","reviews","69409cb15d15c45702134bbe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"af7bad4f-583c-48cb-b5e2-85ea5ff9d435"},{"name":"Create New Review","id":"207f0b01-3dbc-4358-92ae-2c6315bac655","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\": \"Beautiful locations, loved it.\",\r\n    \"rating\": 5,\r\n    \"tour\": \"5c88fa8cf4afda39709c2970\",\r\n    \"user\": \"69064695dd5e9da008f9dc7b\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"207f0b01-3dbc-4358-92ae-2c6315bac655"},{"name":"Update Review","id":"0ca6fbcc-412c-4957-83a2-8f036e2e94c3","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\": 5\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/5c8a355b14eb5c17645c9109","urlObject":{"path":["v1","reviews","5c8a355b14eb5c17645c9109"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"0ca6fbcc-412c-4957-83a2-8f036e2e94c3"},{"name":"Delete Review","id":"a6a803ef-9587-4452-97ad-fa6a4dbc71e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/696024b9b4c509e6b1e50168","urlObject":{"path":["v1","reviews","696024b9b4c509e6b1e50168"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a6a803ef-9587-4452-97ad-fa6a4dbc71e0"}],"id":"96f99ab0-0eb5-4e02-a104-80c8d5ac3949","_postman_id":"96f99ab0-0eb5-4e02-a104-80c8d5ac3949","description":""},{"name":"Tours / Reviews","item":[{"name":"Get All Reviews on Tour","id":"dfa6d532-3727-4cb6-97a9-496a70e87abe","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","description":"<h1 id=\"get-all-reviews-on-tour\">Get All Reviews on Tour</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Retrieves all reviews associated with a specific tour. This endpoint returns a paginated list of reviews including user feedback, ratings, and metadata for the specified tour.</p>\n<h2 id=\"endpoint\">Endpoint</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET {{URL}}api/v1/tours/:tourId/reviews\n\n</code></pre><h2 id=\"path-parameters\">Path Parameters</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Description</th>\n<th>Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>tourId</code></td>\n<td>String (ObjectId)</td>\n<td>The unique identifier of the tour</td>\n<td><code>5c88fa8cf4afda39709c2951</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"required-variables\">Required Variables</h2>\n<ul>\n<li><p><strong><code>URL</code></strong> - Base URL for the API (e.g., <code>https://api.natours.com/</code>)</p>\n</li>\n<li><p><strong><code>jwt</code></strong> - JSON Web Token for authentication</p>\n</li>\n</ul>\n<h2 id=\"authentication\">Authentication</h2>\n<p>This endpoint requires authentication via Bearer token. The JWT token should be included in the Authorization header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<p>Returns a JSON object containing:</p>\n<ul>\n<li><p><strong><code>status</code></strong> - Request status (<code>\"success\"</code>)</p>\n</li>\n<li><p><strong><code>data</code></strong> - Object containing review data and MongoDB query execution details</p>\n<ul>\n<li><p>Review documents with user information, ratings, and comments</p>\n</li>\n<li><p>Query execution statistics and performance metrics</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"example-response-structure\">Example Response Structure</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"queryPlanner\": { ... },\n      \"executionStats\": { ... }\n    }\n  }\n}\n\n</code></pre>\n<h2 id=\"status-codes\">Status Codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>Successfully retrieved reviews</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized - Invalid or missing JWT token</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Tour not found</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal server error</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"use-case-example\">Use Case Example</h2>\n<p>Fetch all reviews for a specific tour to display on the tour detail page, allowing potential customers to read feedback from previous participants before booking.</p>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>The response includes MongoDB query execution details which can be useful for performance monitoring and optimization</p>\n</li>\n<li><p>Reviews are sorted by creation date in descending order (newest first)</p>\n</li>\n<li><p>Default limit is 100 reviews per request</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2951","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"dfa6d532-3727-4cb6-97a9-496a70e87abe"},{"name":"Create new review on tour","id":"7e32596d-71b1-4304-b5ed-731f4c208fc9","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\": 5,\r\n    \"review\": \"perfect\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955/reviews","description":"<h1 id=\"create-review-on-tour\">Create Review on Tour</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>Creates a review for a specific tour by the authenticated user.</p>\n<hr />\n<h2 id=\"endpoint\">Endpoint</h2>\n<p><strong>POST</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{{URL}}/api/v1/tours/:tourId/reviews\n\n</code></pre><hr />\n<h2 id=\"authentication\">Authentication</h2>\n<p>Requires a Bearer Token:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer {{jwt}}\n\n</code></pre><hr />\n<h2 id=\"request-body\">Request Body</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"rating\": 5,\n  \"review\": \"perfect\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"success-response-201\">Success Response (201)</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"data\": {\n    \"data\": {\n      \"review\": \"perfect\",\n      \"rating\": 5,\n      \"tour\": \"5c88fa8cf4afda39709c2955\",\n      \"user\": \"696c0662b4e8fa3998f39ade\",\n      \"_id\": \"696c0846b4e8fa3998f39ae7\",\n      \"createdAt\": \"2026-01-17T22:08:06.171Z\"\n    }\n  }\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>User is taken automatically from JWT</p>\n</li>\n<li><p>Tour ID comes from the URL</p>\n</li>\n<li><p>One review per user per tour (usually enforced by backend)</p>\n</li>\n</ul>\n<p>EndFragment</p>\n","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2955","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7e32596d-71b1-4304-b5ed-731f4c208fc9"}],"id":"24df4bfd-06f9-4b1f-842e-706ec0c91207","_postman_id":"24df4bfd-06f9-4b1f-842e-706ec0c91207","description":""}],"variable":[{"key":"baseURL","value":"","type":"default"}]}