{"info":{"_postman_id":"54dcf341-e638-47e9-beef-6f66c9645893","name":"Natours - Node API","description":"<html><head></head><body><p>The Natours API contains endpoints for Tours, Users, and Reviews.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"30945305","collectionId":"54dcf341-e638-47e9-beef-6f66c9645893","publishedId":"2s9YkuYyCW","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-12-28T07:38:17.000Z"},"item":[{"name":"Authentication","item":[{"name":"login","event":[{"listen":"test","script":{"id":"18687102-38dc-4bce-a03c-c0b10f63e86e","exec":["//pm.environment.set(\"jwt\", pm.response.json().token);\r","pm.environment.set(\"jwt\", pm.response.json().token);\r","pm.environment.set(\"user\",pm.response.json().data.user._id);\r",""],"type":"text/javascript"}}],"id":"90f4f970-2e63-4dc5-a103-1804c18889c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n \"email\": \"loulou@example.com\",\r\n \"password\": \"{{password}}\"\r\n   \r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","description":"<p>This API endpoint is used to authenticate and log in users. When making a POST request to <code>{{URL}}api/v1/users/login</code>, the request should include a JSON payload in the raw request body with the user's email and password.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><code>email</code> (string): The email address of the user.</li>\n<li><code>password</code> (string): The password of the user.</li>\n</ul>\n<p>Upon a successful request, the server will respond with a status code of 201, indicating that the request was successful, along with a JSON response body containing the authentication token and user data.</p>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><code>status</code> (string): The status of the response.</li>\n<li><code>token</code> (string): The authentication token for the logged-in user.</li>\n<li><code>data</code> (object): An object containing user data.<ul>\n<li><code>user</code> (object): An object representing the user.<ul>\n<li><code>active</code> (boolean): Indicates whether the user account is active.</li>\n<li><code>_id</code> (string): The unique identifier of the user.</li>\n<li><code>name</code> (string): The name of the user.</li>\n<li><code>email</code> (string): The email address of the user.</li>\n<li><code>role</code> (string): The role or permissions of the user.</li>\n<li><code>__v</code> (number): Version number of the user data.</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"90f4f970-2e63-4dc5-a103-1804c18889c4"},{"name":"Sign up","event":[{"listen":"test","script":{"id":"f9d547cd-3d9b-4a2a-b7aa-0d33523cdfff","exec":["pm.test(\"Response status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","pm.test(\"Response is an object with data property\", function () {\r","    pm.expect(pm.response.json()).to.be.an('object').that.has.property('data');\r","});\r","\r","pm.test(\"User is active in the response\", function () {\r","    pm.expect(pm.response.json().data.user.active).to.be.true;\r","});\r","\r","pm.test(\"User has an email in the response\", function () {\r","    pm.expect(pm.response.json().data.user.email).to.be.a('string');\r","});\r","\r","pm.test(\"User has a role in the response\", function () {\r","    pm.expect(pm.response.json().data.user.role).to.exist;\r","});"],"type":"text/javascript"}}],"id":"6b3f7bfb-9721-4597-87dd-3fdb8e6aa6f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Jonas\",\r\n    \"email\": \"jonas4@gmail.com\",\r\n    \"password\": \"pass123\",\r\n    \"passwordConfirm\": \"pass123\",\r\n    \"role\": \"admin\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","description":"<p>This endpoint allows users to sign up by creating a new account. Upon successful execution, it returns a status code of 201 along with a token and user data.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><code>name</code> (string, required): The name of the user.</li>\n<li><code>email</code> (string, required): The email address of the user.</li>\n<li><code>password</code> (string, required): The password for the user account.</li>\n<li><code>passwordConfirm</code> (string, required): Confirmation of the user's password.</li>\n<li><code>role</code> (string, required): The role of the user.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><code>status</code> (string): Indicates the status of the request.</li>\n<li><code>token</code> (string): A token for the authenticated user.</li>\n<li><code>data</code> (object): The data object containing user details.<ul>\n<li><code>user</code> (object): An object with user information.<ul>\n<li><code>active</code> (boolean): Indicates if the user account is active.</li>\n<li><code>_id</code> (string): The unique identifier for the user.</li>\n<li><code>name</code> (string): The name of the user.</li>\n<li><code>email</code> (string): The email address of the user.</li>\n<li><code>role</code> (string): The role of the user.</li>\n<li><code>__v</code> (number): Version key for user data.</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6b3f7bfb-9721-4597-87dd-3fdb8e6aa6f1"},{"name":"Forgot Password","event":[{"listen":"test","script":{"id":"b58073c2-3ab5-4c1d-ad79-8f6e194a831c","exec":["pm.test(\"Response status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Response has the required fields - status, message\", function () {\r","    const responseData = pm.response.json();\r","    \r","    pm.expect(responseData).to.be.an('object').that.has.all.keys('status', 'message');\r","});\r","\r","pm.test(\"Content-Type header is application/json\", function () {\r","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r","});"],"type":"text/javascript"}}],"id":"69da443a-5df4-4d1f-8377-f4d9e92eea7d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"ayls@example.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","description":"<p>This endpoint allows users to request a password reset by providing their email address.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li>email (string, required): The email address for which the password reset is requested.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li>status (string): The status of the request.</li>\n<li>message (string): A message regarding the password reset request.</li>\n</ul>\n<h3 id=\"example\">Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"email\": \"user@example.com\"\n}\n\n</code></pre>\n","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"69da443a-5df4-4d1f-8377-f4d9e92eea7d"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"02f3784c-8bc7-4828-a951-c2c668aae5e5","exec":["pm.environment.set('jwt',pm.response.json().token)"],"type":"text/javascript"}}],"id":"d6f760b6-c4e6-47b0-9ee3-dede2d419bd6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\": \"newpass\",\r\n    \"passwordConfirm\": \"newpass\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/621be2f9260157270aeebd8701367fdab759c3969f23ed8fa3d1f2ea4c08f1ba","description":"<p>This HTTP PATCH request is used to reset the password for a specific user. The endpoint is <code>{{URL}}api/v1/users/resetPassword/{userId}</code> where <code>{userId}</code> is the unique identifier of the user whose password is being reset.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>The request body should be in raw format and include the following parameters:</p>\n<ul>\n<li><code>password</code>: (string) The new password for the user.</li>\n<li><code>passwordConfirm</code>: (string) Confirmation of the new password.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>In case of a failed request, the response will have a status code of 400 and include the following parameters:</p>\n<ul>\n<li><code>status</code>: (string) The status of the response.</li>\n<li><code>message</code>: (string) A message regarding the error.</li>\n<li><code>error</code>: (object) An object containing details about the error, including <code>statusCode</code>, <code>status</code>, <code>isOperational</code>, and <code>stack</code>.</li>\n</ul>\n<p>Please note that the actual values of the response parameters will vary based on the specific error encountered.</p>\n","urlObject":{"path":["v1","users","resetPassword","621be2f9260157270aeebd8701367fdab759c3969f23ed8fa3d1f2ea4c08f1ba"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d6f760b6-c4e6-47b0-9ee3-dede2d419bd6"},{"name":"Update My Password","event":[{"listen":"test","script":{"id":"32fc3024-a0a7-4b83-8774-f73debeac6ae","exec":["pm.environment.set('jwt',pm.response.json().token)"],"type":"text/javascript"}}],"id":"57f02f3b-f4f6-4d51-a758-2fae559b28de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n \"passwordCurrent\": \"newpass\",\r\n \"password\":\"newpass123\",\r\n \"passwordConfirm\":\"newpass123\"\r\n   \r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMyPassword","description":"<p>This endpoint is used to update the password for the currently authenticated user. The HTTP PATCH request should be sent to <code>{{URL}}api/v1/users/updateMyPassword</code> with the following payload in the raw request body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"passwordCurrent\": \"\",\n    \"password\": \"\",\n    \"passwordConfirm\": \"\"\n}\n</code></pre>\n<p>The <code>passwordCurrent</code> field should contain the user's current password, <code>password</code> should contain the new password, and <code>passwordConfirm</code> should contain the confirmation of the new password.</p>\n<p>The response to this request will have a status code of 500, and the body will include a JSON object with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"\",\n    \"message\": \"\",\n    \"error\": {\n        \"name\": \"\",\n        \"message\": \"\",\n        \"statusCode\": 0,\n        \"status\": \"\"\n    },\n    \"stack\": \"\"\n}\n</code></pre>\n<p>Please note that the specific values for the fields in the response may vary based on the error encountered. </p>\n","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"57f02f3b-f4f6-4d51-a758-2fae559b28de"}],"id":"8a07d33d-4bf7-4884-85ac-c9f5d86ecafe","_postman_id":"8a07d33d-4bf7-4884-85ac-c9f5d86ecafe","description":""},{"name":"Users","item":[{"name":"users","id":"b46dd249-1652-4a9f-9d37-225832048265","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/v1/users","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of users from the API. The request does not include a request body. </p>\n<p>The last execution of this request returned a 500 status code with a response body containing an error object with status, message, and stack properties.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","v1","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b46dd249-1652-4a9f-9d37-225832048265"},{"name":"Update Me","id":"2b584577-7677-4186-b862-c9a8322b78fa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"role\": \"user\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMe","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b584577-7677-4186-b862-c9a8322b78fa"},{"name":"Delete Me","id":"7628043d-b2f0-4358-9420-0aa06e9df7ef","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/deleteMe","urlObject":{"path":["v1","users","deleteMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7628043d-b2f0-4358-9420-0aa06e9df7ef"},{"name":"Get All Users","id":"676ea475-eead-489e-bed0-c1dc5cca4fc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users?role=user","urlObject":{"path":["v1","users"],"host":["{{URL}}api"],"query":[{"key":"role","value":"user"}],"variable":[]}},"response":[],"_postman_id":"676ea475-eead-489e-bed0-c1dc5cca4fc1"},{"name":"Get Me","id":"d8d7bddd-79d8-47d5-8577-7d42aecbc732","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":"d8d7bddd-79d8-47d5-8577-7d42aecbc732"}],"id":"93914147-e7e0-419c-a210-2f9635cbd2d4","_postman_id":"93914147-e7e0-419c-a210-2f9635cbd2d4","description":""},{"name":"Tour","item":[{"name":"Get All Tours","event":[{"listen":"test","script":{"id":"ae0d79e8-16da-4b7c-b051-4236fe4ce8e8","exec":["var template = `\r","<style type=\"text/css\">\r","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}\r","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}\r","    .tftable tr {background-color:#ffffff;}\r","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}\r","    .tftable tr:hover {background-color:#e0ffff;}\r","</style>\r","\r","<table class=\"tftable\" border=\"1\">\r","    <tr>\r","        <th>Name</th>\r","        <th>Price</th>\r","        <th>Ratings Average</th>\r","        <th>Duration</th>\r","    </tr>\r","    \r","    {{#each response.data.tours}}\r","        <tr>\r","            <td>{{name}}</td>\r","            <td>{{price}}</td>\r","            <td>{{ratingsAverage}}</td>\r","            <td>{{duration}}</td>\r","        </tr>\r","    {{/each}}\r","</table>\r","`;\r","\r","function constructVisualizerPayload() {\r","    return { response: pm.response.json() }\r","}\r","\r","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript"}}],"id":"af361b28-433f-474f-ab83-bbf860885712","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours?price[lt]=1000&ratingsAverage[gte]=4.7","description":"<p>This HTTP GET request is used to retrieve a list of tours based on the specified criteria. The request should include query parameters for price less than 1000 and average ratings greater than or equal to 4.7.</p>\n<p>The response to this request will have a status code of 200, and the body will contain information about the tours that match the specified criteria. The response includes the total number of results, as well as details about each tour, such as start location, ratings, images, start dates, end dates, tour guides, duration, group size, difficulty, price, summary, description, and other relevant information.</p>\n<p>Please note that the response data is minified and masked for privacy reasons.</p>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"duration[gte]","value":"5"},{"disabled":true,"key":"difficulty","value":"easy"},{"disabled":true,"key":"limit","value":"10"},{"key":"price[lt]","value":"1000"},{"key":"ratingsAverage[gte]","value":"4.7"}],"variable":[]}},"response":[],"_postman_id":"af361b28-433f-474f-ab83-bbf860885712"},{"name":"Get One Tour","id":"8f0453a7-1652-4991-b508-071b85d7e4eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/6568fc2e15492446a0f2ad1b","urlObject":{"path":["v1","tours","6568fc2e15492446a0f2ad1b"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f0453a7-1652-4991-b508-071b85d7e4eb"},{"name":"Get All tours Duration difff, limit","id":"2879ea2a-4f5b-43ed-99bd-529dce622756","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours?duration[gte]=5&sort=1&price[lt]=1500","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"key":"duration[gte]","value":"5"},{"disabled":true,"key":"difficulty","value":"easy"},{"disabled":true,"key":"limit","value":"10"},{"disabled":true,"key":"page","value":"2"},{"key":"sort","value":"1"},{"key":"price[lt]","value":"1500"}],"variable":[]}},"response":[],"_postman_id":"2879ea2a-4f5b-43ed-99bd-529dce622756"},{"name":"Update Tour","id":"34895ab6-26be-4663-9ed7-1df200414184","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n      \"guides\": [\r\n                \"655691a3b9cc041f64de7ffd\",\r\n                \"65569172b9cc041f64de7ff9\",\r\n                \"6552847faa350a34fc961b31\"\r\n            ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/655e0c21c4ddc546e42ffbec\n","urlObject":{"path":["v1","tours","655e0c21c4ddc546e42ffbec\n"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"34895ab6-26be-4663-9ed7-1df200414184"},{"name":"Create Tour","id":"8e50d4e1-5106-4d2f-be51-9bfb8366a8ef","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\": \"Akriti Lovly\",\r\n    \"duration\": 10,\r\n    \"maxGroupSize\": 15,\r\n    \"difficulty\": \"medium\",\r\n    \"price\": 200,\r\n    \"priceDiscount\": 150,\r\n    \"summary\": \" Test Tour\",\r\n    \"imageCover\": \"tour-5-cover.jpg\"\r\n  }","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/v1/tours","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tours"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8e50d4e1-5106-4d2f-be51-9bfb8366a8ef"},{"name":"Delete Tour","id":"38df33f9-ad23-4be7-9ba0-aa0e76705b90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/654d64954076ec5e08d6afa6","urlObject":{"path":["v1","tours","654d64954076ec5e08d6afa6"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"38df33f9-ad23-4be7-9ba0-aa0e76705b90"},{"name":"Get All Tour sort=-price,ratingAverage","id":"e1383007-77fe-424b-a5a8-4c7f95015638","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/v1/tours?sort=-ratingsAverage","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tours"],"host":["localhost"],"query":[{"key":"sort","value":"-ratingsAverage"}],"variable":[]}},"response":[],"_postman_id":"e1383007-77fe-424b-a5a8-4c7f95015638"},{"name":"Limit fields=name,duration,difficulty","id":"01670f46-bbea-48af-a9d4-49b117495262","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/v1/toursas","urlObject":{"protocol":"http","port":"3000","path":["api","v1","toursas"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"01670f46-bbea-48af-a9d4-49b117495262"},{"name":"Get Monthly plan","id":"cb62c067-c872-449f-a9a4-3c40f15d0693","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/v1/tours/monthly-plan/2021","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tours","monthly-plan","2021"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb62c067-c872-449f-a9a4-3c40f15d0693"},{"name":"Get Tour Stats","id":"65ffd528-c6b2-467d-ae13-204ad57ff71a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/api/v1/tours/tour-stats","urlObject":{"protocol":"http","port":"3000","path":["api","v1","tours","tour-stats"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"65ffd528-c6b2-467d-ae13-204ad57ff71a"}],"id":"089ce3da-688f-48d3-bd58-bf5b6bfb6ca1","description":"<p>You can get all tours, create new ones, and edit and delete tours. There are also special endpoints for some special requirements.</p>\n","_postman_id":"089ce3da-688f-48d3-bd58-bf5b6bfb6ca1"},{"name":"Reviews","item":[{"name":"Get All Review","id":"3d6f64ab-16eb-4ac6-840b-9edcf4bcc107","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":[{"disabled":true,"key":"rating","value":"4.5"}],"variable":[]}},"response":[],"_postman_id":"3d6f64ab-16eb-4ac6-840b-9edcf4bcc107"},{"name":"Post reviews","id":"dcdccd8e-15e9-47fd-b6ae-c952fa3b0e36","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\": \"Terrible\",\r\n    \"rating\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/6568fc2e15492446a0f2ad1b/reviews","urlObject":{"path":["v1","tours","6568fc2e15492446a0f2ad1b","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"dcdccd8e-15e9-47fd-b6ae-c952fa3b0e36"},{"name":"Review","id":"400a3b06-b638-4193-a80c-2b438bef2542","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\": \"Best Tour in the world 123 : 2023/23/11!\"\r\n\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2955/reviews","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2955","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"400a3b06-b638-4193-a80c-2b438bef2542"},{"name":"Delete One Review","id":"9c2a889f-24dd-48dd-a571-042214df63d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/6568fcdc15492446a0f2ad20","urlObject":{"path":["v1","reviews","6568fcdc15492446a0f2ad20"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c2a889f-24dd-48dd-a571-042214df63d8"},{"name":"{{URL}}api/v1/reviews","id":"9b5bd523-5657-41f6-bccf-09595d22148c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/reviews","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b5bd523-5657-41f6-bccf-09595d22148c"},{"name":"Delete User","id":"e607aa45-a632-47e7-8345-5b7689577a46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/users/655fdb2a35542422ac80b4b8","urlObject":{"path":["v1","users","655fdb2a35542422ac80b4b8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e607aa45-a632-47e7-8345-5b7689577a46"},{"name":"Update Review","id":"3eb138c2-6a49-4bb5-9e0c-3d0a4507bf0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"rating\": 4\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/655fcb27d8a6f05c9493c64e","urlObject":{"path":["v1","reviews","655fcb27d8a6f05c9493c64e"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3eb138c2-6a49-4bb5-9e0c-3d0a4507bf0a"},{"name":"Get One Review","id":"fffff933-12d3-4d73-8459-9cef91466b90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/65610027e6825b655c0bf97b","urlObject":{"path":["v1","reviews","65610027e6825b655c0bf97b"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"fffff933-12d3-4d73-8459-9cef91466b90"}],"id":"097e0242-462c-41de-b1b4-cb3116a670f3","_postman_id":"097e0242-462c-41de-b1b4-cb3116a670f3","description":""},{"name":"Tours/Reviews","item":[{"name":"Create New Review on Tour","id":"42b29bbe-ca0f-4fe7-aca9-68e979cf35cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"rating\": 3,\r\n    \"review\": \"Was kind okay\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/655f85c0c98b2242e0305581/reviews\n","urlObject":{"path":["v1","tours","655f85c0c98b2242e0305581","reviews\n"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"42b29bbe-ca0f-4fe7-aca9-68e979cf35cc"}],"id":"7174be9c-b24f-4747-acf7-479d41190a6a","_postman_id":"7174be9c-b24f-4747-acf7-479d41190a6a","description":""}]}