{"info":{"_postman_id":"f0eaced6-950a-4786-90a4-24dc7555485b","name":"Booking","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"37612905","collectionId":"f0eaced6-950a-4786-90a4-24dc7555485b","publishedId":"2sB2j7cp24","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-05-06T17:15:01.000Z"},"item":[{"name":"Tours","item":[{"name":"Get All Tours","event":[{"listen":"test","script":{"id":"ef779eac-f6d4-4dde-95c5-52641f9a6407","exec":[""],"type":"text/javascript","packages":{}}}],"id":"a48caea1-b042-4663-84cd-40503a0fe3a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of tours based on the specified query parameters. The request includes query parameters for filtering tours based on price (less than 1000) and average ratings (greater than or equal to 4.7).</p>\n<h3 id=\"request\">Request</h3>\n<p>The request does not include a request body. The query parameters are:</p>\n<ul>\n<li><p>price[lt]: Specifies the maximum price for the tours.</p>\n</li>\n<li><p>ratingsAverage[gte]: Specifies the minimum average ratings for the tours.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response will be a JSON object representing the list of tours that meet the specified criteria. The JSON schema for the response will include properties such as tour name, price, ratings, and other relevant tour details.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"tours\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"tourName\": { \"type\": \"string\" },\n          \"price\": { \"type\": \"number\" },\n          \"ratings\": { \"type\": \"number\" },\n          // Other relevant tour details\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"difficulty","value":"easy"},{"disabled":true,"key":"duration[gte]","value":"5"},{"disabled":true,"key":"sort","value":"-price,-ratingsAverage"},{"disabled":true,"key":"fields","value":"name,duration,difficulty,price"},{"disabled":true,"key":"page","value":"3"},{"disabled":true,"key":"limit","value":"3"},{"disabled":true,"key":"limit","value":"5"},{"disabled":true,"key":"sort","value":"-ratingsAverage,price"},{"disabled":true,"key":"search","value":"Sea"}],"variable":[]}},"response":[],"_postman_id":"a48caea1-b042-4663-84cd-40503a0fe3a0"},{"name":"Add Tour","id":"da13b355-f175-4649-914a-f142abf10817","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\": \"The Tour for calc Average Rating\",\r\n  \"duration\": 5,\r\n  \"maxGroupSize\": 25,\r\n  \"difficulty\": \"easy\",\r\n  \"price\": 397,\r\n  \"imageCover\": \"tour-3-cover.jpg\",\r\n  \"startLocation\": {\r\n    \"type\": \"Point\",\r\n    \"coordinates\": [30.987654, 31.234567],\r\n    \"description\": \"Port Said, Egypt\",\r\n    \"address\": \"Port Said City Center\"\r\n  }\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours","description":"<h3 id=\"create-a-new-tour\">Create a New Tour</h3>\n<p>This endpoint allows you to create a new tour.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>name</code> (string, required): The name of the tour.</p>\n</li>\n<li><p><code>duration</code> (number, required): The duration of the tour in days.</p>\n</li>\n<li><p><code>maxGroupSize</code> (number, required): The maximum group size for the tour.</p>\n</li>\n<li><p><code>difficulty</code> (string, required): The difficulty level of the tour.</p>\n</li>\n<li><p><code>price</code> (number, required): The price of the tour.</p>\n</li>\n<li><p><code>imageCover</code> (string, required): The image cover for the tour.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"The Tour for calc Average Rati ...\",\n  \"duration\": 5,\n  \"maxGroupSize\": 25,\n  \"difficulty\": \"easy\",\n  \"price\": 397,\n  \"imageCover\": \"tour-3-cover.jpg\"\n}\n\n</code></pre>\n<h4 id=\"response-json-schema\">Response (JSON Schema)</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"tourId\": {\n      \"type\": \"string\"\n    },\n    \"name\": {\n      \"type\": \"string\"\n    },\n    \"duration\": {\n      \"type\": \"number\"\n    },\n    \"maxGroupSize\": {\n      \"type\": \"number\"\n    },\n    \"difficulty\": {\n      \"type\": \"string\"\n    },\n    \"price\": {\n      \"type\": \"number\"\n    },\n    \"imageCover\": {\n      \"type\": \"string\"\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","tours"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"da13b355-f175-4649-914a-f142abf10817"},{"name":"Get Tour","id":"84771211-f149-4c2e-9fa3-6e434c341a87","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/681608073f312fed6a905a6f","description":"<h1 id=\"get-tour-by-id\">Get Tour by ID</h1>\n<p>Retrieves a specific tour by its ID.</p>\n<h2 id=\"endpoint\">Endpoint:</h2>\n<p><code>GET /api/v1/tours/:id</code></p>\n<h2 id=\"url-example\">URL Example:</h2>\n<p><code>{{URL}}/api/v1/tours/681608073f312fed6a905a6f</code></p>\n<h2 id=\"path-parameters\">Path Parameters:</h2>\n<ul>\n<li><code>id</code> (required): The ID of the tour you want to retrieve.</li>\n</ul>\n<h2 id=\"authorization\">Authorization:</h2>\n<p>Bearer Token (if required)</p>\n<h2 id=\"success-response\">Success Response:</h2>\n<ul>\n<li><p>Status: 200 OK</p>\n</li>\n<li><p>{<br />  \"status\": \"success\",<br />  \"data\":<br />  { \"tour\":<br />  { \"_id\": \"681608073f312fed6a905a6f\",<br />  \"name\": \"Tour Name\",<br />  \"duration\": 5,<br />  \"price\": 500<br />  }}}</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","681608073f312fed6a905a6f"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"84771211-f149-4c2e-9fa3-6e434c341a87"},{"name":"Update Tour","id":"09a84a33-beff-4474-b23e-94c1b2f9e39e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"imageCover","type":"file","uuid":"95d3903e-1ca4-484b-a1da-0e1ff024137f","src":"postman-cloud:///1efcd63e-d79e-45e0-8914-59f9aa4b0708","disabled":true},{"key":"images","type":"file","uuid":"36969edf-89cd-48e2-b9e7-32a78ccbbb7c","src":"postman-cloud:///1efcd640-0820-4780-9a4a-7c9a2a39bf73","disabled":true},{"key":"images","type":"file","uuid":"47a04ef6-cce4-4213-a5a7-c6cbe07f8d19","src":"postman-cloud:///1efcd640-b8dc-49c0-b903-af1c090f40ed","disabled":true},{"key":"images","type":"file","uuid":"84b1dce3-e5e5-4699-96a9-d539ab4f1655","src":"postman-cloud:///1efcd641-c04b-4930-b75f-a59d7fb53f6b","disabled":true},{"key":"price","value":"997","type":"text","uuid":"f68cbd72-6c67-47b5-ad9c-2bc249a04d38","disabled":true},{"key":"guides","value":"5c8a21f22f8fb814b56fa18a","type":"text","uuid":"9bf1a6f0-d317-4d5a-8c3e-5e7160bb03fe"}]},"url":"{{URL}}api/v1/tours/6818a4f586ba9cbde370fae2","description":"<h3 id=\"update-tour-ratings\">Update Tour Ratings</h3>\n<p>This endpoint allows updating the average ratings for a specific tour.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>ratingsAverage</code> (number) - The new average rating for the tour.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will include the updated details of the tour, reflecting the changes made to the ratings.</p>\n","urlObject":{"path":["v1","tours","6818a4f586ba9cbde370fae2"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"09a84a33-beff-4474-b23e-94c1b2f9e39e"},{"name":"Delete Tour","id":"ff6933b7-109f-4107-aaa1-e1a10d9bd4b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/tours/6813f18085045d8c2a758118","description":"<h1 id=\"delete-tour-by-id\">Delete Tour by ID</h1>\n<p>Deletes a specific tour from the database using its ID.</p>\n<h2 id=\"endpoint\">Endpoint:</h2>\n<p><code>DELETE /api/v1/tours/:id</code></p>\n<h2 id=\"url-example\">URL Example:</h2>\n<p><code>{{URL}}/api/v1/tours/681608073f312fed6a905a6f</code></p>\n<h2 id=\"path-parameters\">Path Parameters:</h2>\n<ul>\n<li><code>id</code> (required): The ID of the tour to delete.</li>\n</ul>\n<h2 id=\"authorization\">Authorization:</h2>\n<ul>\n<li><p>Required: Yes (Admin only)</p>\n</li>\n<li><p>Type: Bearer Token</p>\n</li>\n</ul>\n<h2 id=\"success-response\">Success Response:</h2>\n<ul>\n<li><p><strong>Status</strong>: 204 No Content</p>\n</li>\n<li><p><strong>Body</strong>: No response body (the resource has been deleted successfully)</p>\n</li>\n</ul>\n<h2 id=\"error-responses\">Error Responses:</h2>\n<ul>\n<li><p>404 Not Found: Tour not found with this ID</p>\n</li>\n<li><p>401 Unauthorized: Missing or invalid token</p>\n</li>\n<li><p>403 Forbidden: Not allowed to perform this action</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","tours","6813f18085045d8c2a758118"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ff6933b7-109f-4107-aaa1-e1a10d9bd4b8"},{"name":"Top-5-cheap","event":[{"listen":"test","script":{"id":"78af2bc0-969b-418e-9291-843ce03e8272","exec":[""],"type":"text/javascript","packages":{}}}],"id":"b0dafcb9-8f47-47bf-8373-7cb921c0718b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/top-5-cheap","description":"<p>This endpoint makes an HTTP GET request to retrieve the top 5 cheap tours. The response of this request is documented below as a JSON schema.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"status\": { \"type\": \"string\" },\n    \"results\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": { \"type\": \"string\" },\n          \"name\": { \"type\": \"string\" },\n          \"price\": { \"type\": \"number\" },\n          \"ratingsAverage\": { \"type\": \"number\" },\n          \"summary\": { \"type\": \"string\" }\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This request does not require a request body.</p>\n<h3 id=\"response-body\">Response Body</h3>\n<ul>\n<li><code>tours</code>: An array of objects containing information about the top 5 cheapest tours, including tour name, price, duration, and other details.</li>\n</ul>\n","urlObject":{"path":["v1","tours","top-5-cheap"],"host":["{{URL}}api"],"query":[{"disabled":true,"key":"limit","value":"5"},{"disabled":true,"key":"sort","value":"-ratingsAverage,price"}],"variable":[]}},"response":[],"_postman_id":"b0dafcb9-8f47-47bf-8373-7cb921c0718b"},{"name":"Tour Stats","id":"0d368b5e-1b3c-43de-acd8-088ee7044b15","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/tours/tour-stats","description":"<h3 id=\"get-tour-stats\">Get Tour Stats</h3>\n<p>This endpoint makes an HTTP GET request to retrieve statistics for tours.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<p>This request does not require a request body.</p>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><code>tourStats</code>: An object containing statistics for tours, such as the number of tours, the average rating, and the number of tours in each category.</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"tourStats\": {\n        \"numTours\": 50,\n        \"avgRating\": 4.5,\n        \"numCategories\": {\n            \"sightseeing\": 20,\n            \"adventure\": 15,\n            \"cultural\": 15\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","tours","tour-stats"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"0d368b5e-1b3c-43de-acd8-088ee7044b15"},{"name":"Monthy Plan","event":[{"listen":"test","script":{"id":"2ca2274d-5013-4326-b6d6-30164d68ee73","exec":[""],"type":"text/javascript","packages":{}}}],"id":"80863ab6-88a4-4f66-8995-52bf2d3ef3c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/monthly-plan/2021","description":"<p>This endpoint retrieves the monthly plan for tours in the year 2021.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p>Method: GET</p>\n</li>\n<li><p>URL: {{URL}}api/v1/tours/monthly-plan/2021</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response will include the monthly plan for tours in the year 2021, with details such as tour names, start dates, end dates, and availability.</p>\n","urlObject":{"path":["v1","tours","monthly-plan","2021"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"80863ab6-88a4-4f66-8995-52bf2d3ef3c7"},{"name":"Get tours within radius","id":"5f0e96ee-e0e6-430b-a09b-07c61b9c8103","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours//tours-within/400/center/34.111745,-118.113491/unit/mi","description":"<h1 id=\"get-tours-within-distance\">Get Tours Within Distance</h1>\n<p>This endpoint retrieves a list of tours within a specified distance from a given center point.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>GET {{URL}}api/v1/tours//tours-within/400/center/34.111745,-118.113491/unit/mi</code></p>\n<h3 id=\"response-body\">Response Body</h3>\n<p>The response will be in JSON format and will contain the following fields:</p>\n<ul>\n<li><p><code>status</code> (string): Indicates the status of the response.</p>\n</li>\n<li><p><code>data</code> (object): Contains the tour data.</p>\n<ul>\n<li><p><code>tours</code> (array): An array of tour objects.</p>\n<ul>\n<li><p><code>startLocation</code> (object): Details about the starting location of the tour.</p>\n<ul>\n<li><p><code>type</code> (string): The type of location.</p>\n</li>\n<li><p><code>coordinates</code> (array): The coordinates of the location.</p>\n</li>\n<li><p><code>address</code> (string): The address of the location.</p>\n</li>\n<li><p><code>description</code> (string): Description of the location.</p>\n</li>\n</ul>\n</li>\n<li><p><code>guides</code> (array): An array of guides for the tour.</p>\n</li>\n<li><p><code>_id</code> (string): The ID of the tour.</p>\n</li>\n<li><p><code>name</code> (string): The name of the tour.</p>\n</li>\n<li><p><code>duration</code> (number): The duration of the tour.</p>\n</li>\n<li><p><code>maxGroupSize</code> (number): The maximum group size for the tour.</p>\n</li>\n<li><p><code>difficulty</code> (string): The difficulty level of the tour.</p>\n</li>\n<li><p><code>ratingsAverage</code> (number): The average rating of the tour.</p>\n</li>\n<li><p><code>ratingsQuantity</code> (number): The quantity of ratings for the tour.</p>\n</li>\n<li><p><code>price</code> (number): The price of the tour.</p>\n</li>\n<li><p><code>summary</code> (string): A summary of the tour.</p>\n</li>\n<li><p><code>description</code> (string): A description of the tour.</p>\n</li>\n<li><p><code>imageCover</code> (string): The cover image of the tour.</p>\n</li>\n<li><p><code>images</code> (array): An array of images for the tour.</p>\n</li>\n<li><p><code>startDates</code> (array): An array of start dates for the tour.</p>\n</li>\n<li><p><code>secretTour</code> (boolean): Indicates if the tour is a secret tour.</p>\n</li>\n<li><p><code>locations</code> (array): An array of locations for the tour.</p>\n<ul>\n<li><p><code>type</code> (string): The type of location.</p>\n</li>\n<li><p><code>coordinates</code> (array): The coordinates of the location.</p>\n</li>\n<li><p><code>description</code> (string): Description of the location.</p>\n</li>\n<li><p><code>day</code> (number): The day of the location.</p>\n</li>\n<li><p><code>_id</code> (string): The ID of the location.</p>\n</li>\n<li><p><code>id</code> (string): The ID of the location.</p>\n</li>\n</ul>\n</li>\n<li><p><code>slug</code> (string): The slug of the tour.</p>\n</li>\n<li><p><code>__v</code> (number): Version control field.</p>\n</li>\n<li><p><code>durationWeeks</code> (number): The duration of the tour in weeks.</p>\n</li>\n<li><p><code>id</code> (string): The ID of the tour.</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li><p>Status: 200</p>\n</li>\n<li><p>Content-Type: application/json</p>\n</li>\n</ul>\n<p>The response will contain the status of the request and the data with details of the tours within the specified distance.</p>\n","urlObject":{"path":["v1","tours","","tours-within","400","center","34.111745,-118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f0e96ee-e0e6-430b-a09b-07c61b9c8103"},{"name":"Get distances","id":"e3f953c2-0721-4c19-b33c-464868b75e49","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours//distances/34.111745,-118.113491/unit/mi","description":"<h3 id=\"get-tour-distances\">Get Tour Distances</h3>\n<p>This endpoint makes an HTTP GET request to retrieve the distances for a specific tour in miles.</p>\n<h4 id=\"request-parameters\">Request Parameters</h4>\n<ul>\n<li><p><code>latitude</code>: Latitude of the location</p>\n</li>\n<li><p><code>longitude</code>: Longitude of the location</p>\n</li>\n<li><p><code>unit</code>: Unit of measurement (mi for miles)</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><code>status</code> (string): Indicates the status of the response</p>\n</li>\n<li><p><code>data</code> (object): Contains the distances data</p>\n<ul>\n<li><p><code>distances</code> (array): Array of distance objects</p>\n<ul>\n<li><p><code>_id</code> (string): ID of the distance</p>\n</li>\n<li><p><code>name</code> (string): Name of the distance</p>\n</li>\n<li><p><code>distance</code> (number): Distance in miles</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<p>The last execution of this request returned a status code of 200 with a JSON response containing the distances data.</p>\n","urlObject":{"path":["v1","tours","","distances","34.111745,-118.113491","unit","mi"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e3f953c2-0721-4c19-b33c-464868b75e49"}],"id":"658f4505-da2a-4f3e-ae37-7fea38cc3ad6","_postman_id":"658f4505-da2a-4f3e-ae37-7fea38cc3ad6","description":""},{"name":"Users","item":[{"name":"Authentication","item":[{"name":"Signup","event":[{"listen":"test","script":{"id":"f035c7ec-f6a8-4062-81f6-079bd3b8c54a","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"0219429f-091b-4c94-a0a9-6522423622f0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Farah\",\r\n    \"email\": \"faroh@mailsac.com\",\r\n    \"password\": \"test1234\",\r\n    \"passwordConfirm\": \"test1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/signup","description":"<p>This endpoint is used to create a new user account by sending a POST request to the specified URL.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p>name (string, required): The name of the user.</p>\n</li>\n<li><p>email (string, required): The email address of the user.</p>\n</li>\n<li><p>password (string, required): The password for the user account.</p>\n</li>\n<li><p>passwordConfirm (string, required): The confirmation of the password.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response of this request is a JSON schema representing the structure of the response object. It includes the properties and data types of the response fields, providing a clear understanding of the expected response format.</p>\n","urlObject":{"path":["v1","users","signup"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"0219429f-091b-4c94-a0a9-6522423622f0"},{"name":"Update Current User Password","id":"d6e5090f-0a45-422f-ab41-68555c5c8ff1","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\": \"test1234\",\r\n    \"password\": \"test12345\",\r\n    \"passwordConfirm\": \"test12345\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/updateMyPassword","description":"<h1 id=\"update-user-password\">Update User Password</h1>\n<p>This endpoint is used to update the password for the currently authenticated user.</p>\n<h2 id=\"request\">Request</h2>\n<ul>\n<li><p>Method: <code>PATCH</code></p>\n</li>\n<li><p>URL: <code>{{URL}}api/v1/users/updateMyPassword</code></p>\n</li>\n<li><p>Headers:</p>\n<ul>\n<li>Content-Type: application/json</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>passwordCurrent</code> (string, required): The current password of the user.</p>\n</li>\n<li><p><code>password</code> (string, required): The new password for the user.</p>\n</li>\n<li><p><code>passwordConfirm</code> (string, required): Confirmation of the new password.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"passwordCurrent\": \"********\",\n  \"password\": \"********\",\n  \"passwordConfirm\": \"********\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<p>The response for this request is a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"string\",\n  \"data\": \"object\",\n  \"message\": \"string\"\n}\n\n</code></pre>\n<ul>\n<li><p><code>status</code> (string): The status of the response.</p>\n</li>\n<li><p><code>data</code> (object): The data object containing the updated user information.</p>\n</li>\n<li><p><code>message</code> (string): A message indicating the result of the password update request.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","updateMyPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d6e5090f-0a45-422f-ab41-68555c5c8ff1"},{"name":"Reset Password","event":[{"listen":"test","script":{"id":"6c5cedc9-a006-4bca-acd1-0bc70f268e89","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"58385810-ffe9-41c0-90f7-f160f3ccaff0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\": \"test12345\",\r\n    \"passwordConfirm\": \"test12345\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/resetPassword/58bc37a5b8f858d967596a26a89505e53cd1b306c4e9af0d219d6f6b6a65491d","description":"<h3 id=\"reset-user-password\">Reset User Password</h3>\n<p>This endpoint is used to reset the password for a user.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>password</code> (string, required): The new password for the user.</p>\n</li>\n<li><p><code>passwordConfirm</code> (string, required): Confirmation of the new password.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will contain the updated user information if the password reset is successful.</p>\n","urlObject":{"path":["v1","users","resetPassword","58bc37a5b8f858d967596a26a89505e53cd1b306c4e9af0d219d6f6b6a65491d"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"58385810-ffe9-41c0-90f7-f160f3ccaff0"},{"name":"Forgot Password","id":"142e5515-9242-4612-b582-bd5159ad0fc0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"faroha@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/forgotPassword","description":"<h3 id=\"request-description\">Request Description</h3>\n<p>This endpoint is used to initiate the process of resetting a user's password by sending a reset link to the provided email address.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>email (string, required): The email address for which the password reset link will be sent.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response for this request is a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"string\",\n  \"data\": {\n    \"resetToken\": \"string\"\n  }\n}\n\n</code></pre>\n<ul>\n<li><p>message (string): A message indicating the status of the request.</p>\n</li>\n<li><p>data (object): An object containing the resetToken which is required for further steps in the password reset process.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","users","forgotPassword"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"142e5515-9242-4612-b582-bd5159ad0fc0"},{"name":"Login","event":[{"listen":"test","script":{"id":"9b239e64-fe71-4528-8416-6103667aad28","exec":["pm.environment.set(\"jwt\", pm.response.json().token);"],"type":"text/javascript","packages":{}}}],"id":"e364a423-c7a5-45c0-a668-f3e99bb3c80d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4MGU4ZGJmMjJiYmY3NWQ5MzBjZTgwYSIsImlhdCI6MTc0NTc4NDI1NSwiZXhwIjoxNzQ2NTYxODU1fQ.-95Y_6wXM79TLwdKwXzrGTtZBQ84o4LLds4u36Y5Vnc","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"faroh@mailsac.com\",\r\n    \"password\": \"test1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/users/login","description":"<h3 id=\"api-request-description\">API Request Description</h3>\n<p>This API endpoint is a POST request to login a user. The request body should be in raw JSON format and should include the user's email and password.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p>email (string): The email of the user.</p>\n</li>\n<li><p>password (string): The password of the user.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"status\": {\n      \"type\": \"string\"\n    },\n    \"token\": {\n      \"type\": \"string\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"user\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"_id\": {\n              \"type\": \"string\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"role\": {\n              \"type\": \"string\"\n            },\n            \"changePasswordAt\": {\n              \"type\": \"string\"\n            },\n            \"__v\": {\n              \"type\": \"integer\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","users","login"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e364a423-c7a5-45c0-a668-f3e99bb3c80d"}],"id":"d4109e59-b2ae-4a21-aa63-9a465545f425","_postman_id":"d4109e59-b2ae-4a21-aa63-9a465545f425","description":""},{"name":"Get All Users","event":[{"listen":"test","script":{"id":"22108706-423d-4df1-a03a-dc54bb970c38","exec":[""],"type":"text/javascript","packages":{}}}],"id":"46579f21-e3db-432b-972b-255b779e6ecf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/users/","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of users. The response of this request can be documented as a JSON schema to describe the structure of the data returned.</p>\n","urlObject":{"path":["v1","users",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"46579f21-e3db-432b-972b-255b779e6ecf"},{"name":"Update Current User Data","id":"51db64cc-afb0-4a47-b794-39000d403555","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":"Farah M. Mahfouz","type":"text","uuid":"d3f09ff4-4688-420f-b7f7-ae085c13e08e"},{"key":"photo","type":"file","uuid":"0f8d40d4-87f2-4b7d-8fbd-513463316ca6","src":"postman-cloud:///1f0294cd-b58d-4250-aa24-6c7b58f99d51"}]},"url":"{{URL}}api/v1/users/updateMe","description":"<h3 id=\"update-current-user-information\">Update Current User Information</h3>\n<p>This endpoint allows the current user to update their information.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>name</code> (string, required): The updated name of the user.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will include the updated user information.</p>\n","urlObject":{"path":["v1","users","updateMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"51db64cc-afb0-4a47-b794-39000d403555"},{"name":"Deactivate Current User","id":"ff4f1c7b-376a-4665-aea6-549f478626b4","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":"<h3 id=\"delete-user-profile\">Delete User Profile</h3>\n<p>This endpoint is used to delete the user's own profile.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>No request body is required for this DELETE request.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li>The response will indicate the success or failure of the deletion operation.</li>\n</ul>\n","urlObject":{"path":["v1","users","deleteMe"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"ff4f1c7b-376a-4665-aea6-549f478626b4"},{"name":"Get Current User","id":"44a3ff53-2059-4d7a-b43e-37639007c7b8","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":"<h3 id=\"get-current-user-details\">Get Current User Details</h3>\n<p>This endpoint retrieves the details of the currently authenticated user.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Method: GET</p>\n</li>\n<li><p>URL: <code>{{URL}}api/v1/users/me</code></p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will contain the details of the current user, including their user ID, username, email, and any other relevant user information.</p>\n","urlObject":{"path":["v1","users","me"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"44a3ff53-2059-4d7a-b43e-37639007c7b8"}],"id":"01165c2c-0cfb-4a62-9bbd-bc2d58b53320","_postman_id":"01165c2c-0cfb-4a62-9bbd-bc2d58b53320","description":""},{"name":"Reviews","item":[{"name":"Get All Reviews","id":"e5aeb45f-1795-4f37-8c59-bcf4b22fd3eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}api/v1/reviews","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of reviews from the API. The request does not include a request body, as it is a GET request. The response will include a list of reviews, with each review containing details such as the review ID, user ID, review text, and rating.</p>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5aeb45f-1795-4f37-8c59-bcf4b22fd3eb"},{"name":"Get Review","event":[{"listen":"test","script":{"id":"9f8f55dc-2e5c-4404-b719-a341500b0587","exec":[""],"type":"text/javascript","packages":{}}}],"id":"3d01330d-41a6-4fc1-ab73-0a53849e7e61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/reviews/6813c99d4001b7830fd348e8","description":"<p>This endpoint makes an HTTP GET request to retrieve the details of a specific review with the ID \"6813c99d4001b7830fd348e8\".</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This request does not require a request body.</p>\n<h3 id=\"response-body\">Response Body</h3>\n<ul>\n<li><p><code>id</code>: (string) The unique identifier of the review.</p>\n</li>\n<li><p><code>title</code>: (string) The title of the review.</p>\n</li>\n<li><p><code>rating</code>: (number) The rating given to the review.</p>\n</li>\n<li><p><code>description</code>: (string) The description or content of the review.</p>\n</li>\n<li><p><code>author</code>: (object) The author of the review, containing details such as name and ID.</p>\n</li>\n<li><p><code>created_at</code>: (string) The timestamp indicating when the review was created.</p>\n</li>\n<li><p><code>updated_at</code>: (string) The timestamp indicating when the review was last updated.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","reviews","6813c99d4001b7830fd348e8"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3d01330d-41a6-4fc1-ab73-0a53849e7e61"},{"name":"Create Review","event":[{"listen":"test","script":{"id":"7fe36ff1-110f-4c2f-9718-b5de648402d4","exec":[""],"type":"text/javascript","packages":{}}}],"id":"94ab74ac-92bc-4bf2-a8e9-312acbac7476","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\": \"Very Nice tour 2\",\r\n    \"rating\": 4,\r\n    \"user\": \"68138a3f3f9378bb68e31d18\",\r\n    \"tour\": \"68115f6cf2fac6e62c22e4fc\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews","description":"<p>The <code>POST /api/v1/reviews</code> endpoint is used to submit a new review for a tour. The request should include a JSON payload in the raw request body with the following parameters:</p>\n<ul>\n<li><p><code>review</code> (string): The review content.</p>\n</li>\n<li><p><code>rating</code> (number): The rating given for the tour.</p>\n</li>\n<li><p><code>user</code> (string): The ID of the user submitting the review.</p>\n</li>\n<li><p><code>tour</code> (string): The ID of the tour for which the review is being submitted.</p>\n</li>\n</ul>\n<p>Upon successful submission, the response will include the details of the newly created review, including its unique identifier and other relevant information.</p>\n","urlObject":{"path":["v1","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"94ab74ac-92bc-4bf2-a8e9-312acbac7476"},{"name":"Update review","id":"50da2c68-8171-44a0-84af-a6e1da28d782","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\": 4\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/reviews/68160cc8be261aedfa4c04a3","description":"<h3 id=\"update-review\">Update Review</h3>\n<p>This endpoint is used to update a specific review by sending an HTTP PATCH request to the specified URL.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>rating</code> (number) - The new rating for the review.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response will include the updated details of the review.</p>\n","urlObject":{"path":["v1","reviews","68160cc8be261aedfa4c04a3"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"50da2c68-8171-44a0-84af-a6e1da28d782"},{"name":"Delete Review","id":"f8d4abf6-abc4-48d2-9a8c-b2a9f5f6284d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}api/v1/reviews/681618a633f4ffca02b446ce","description":"<h3 id=\"delete-review\">Delete Review</h3>\n<p>This endpoint is used to delete a specific review by providing the review ID in the URL.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<p>This endpoint does not require a request body.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response will not contain a body, but will include a status code to indicate the success or failure of the deletion operation.</p>\n","urlObject":{"path":["v1","reviews","681618a633f4ffca02b446ce"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f8d4abf6-abc4-48d2-9a8c-b2a9f5f6284d"}],"id":"0b38d3ae-cab0-4770-bcb1-272c5b5f08be","_postman_id":"0b38d3ae-cab0-4770-bcb1-272c5b5f08be","description":""},{"name":"Tour/Reviews","item":[{"name":"Create New Review On Tour","id":"87705799-7e38-4cfb-b83f-47bee6d01e0a","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\": \"Cras consequat fames faucibus ac aliquam dolor a euismod porttitor rhoncus venenatis himenaeos montes tristique pretium libero nisi!\",\r\n    \"rating\": 4\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}api/v1/tours/6818a4f586ba9cbde370fae2/reviews","description":"<p>The HTTP POST request is used to add a review for a specific tour. The request should be sent to {{URL}}api/v1/tours/681608073f312fed6a905a6f/reviews with the following payload in the raw request body type:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"review\": \"This review for calculation ra ...\",\n    \"rating\": 4\n}\n\n</code></pre>\n<p>The <code>review</code> key represents the text of the review, and the <code>rating</code> key represents the numeric rating given to the tour. Upon successful submission, the response will contain the details of the newly added review.</p>\n","urlObject":{"path":["v1","tours","6818a4f586ba9cbde370fae2","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"87705799-7e38-4cfb-b83f-47bee6d01e0a"},{"name":"Get All Reviews on Tour","id":"d37c7ef6-1169-4e36-98f6-9a59a8cbb707","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/tours/5c88fa8cf4afda39709c2951/reviews","description":"<p>This endpoint retrieves the reviews for a specific tour identified by the ID \"5c88fa8cf4afda39709c2951\". The response for this request can be documented as a JSON schema.</p>\n","urlObject":{"path":["v1","tours","5c88fa8cf4afda39709c2951","reviews"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"d37c7ef6-1169-4e36-98f6-9a59a8cbb707"}],"id":"afca9783-8d08-4bc5-8b7c-143431d2ff23","_postman_id":"afca9783-8d08-4bc5-8b7c-143431d2ff23","description":""},{"name":"Booking","item":[{"name":"Get checkout","id":"3a82f6d8-e4a8-4b14-82a4-a7b3884507f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/booking/checkout-session/5c88fa8cf4afda39709c2955","description":"<p>This endpoint retrieves the checkout session details for a specific booking identified by the ID in the URL.</p>\n<h3 id=\"response\">Response</h3>\n<p>The response will be a JSON object representing the checkout session details for the specified booking. You can refer to the JSON schema below for the structure of the response.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"checkoutSessionId\": {\n      \"type\": \"string\"\n    },\n    \"bookingId\": {\n      \"type\": \"string\"\n    },\n    \"status\": {\n      \"type\": \"string\"\n    },\n    \"paymentDetails\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"amount\": {\n          \"type\": \"number\"\n        },\n        \"currency\": {\n          \"type\": \"string\"\n        },\n        \"method\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"customerDetails\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"eventDetails\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"eventId\": {\n          \"type\": \"string\"\n        },\n        \"eventName\": {\n          \"type\": \"string\"\n        },\n        \"eventDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        }\n      }\n    }\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","booking","checkout-session","5c88fa8cf4afda39709c2955"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3a82f6d8-e4a8-4b14-82a4-a7b3884507f5"},{"name":"GET all booking","id":"240d7567-0656-4873-a832-393f84e6705c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/booking/","description":"<h3 id=\"get-apiv1booking\">GET /api/v1/booking/</h3>\n<p>This endpoint retrieves a list of bookings.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<p>This request does not require a request body.</p>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p>Status: 200</p>\n</li>\n<li><p>Content-Type: application/json</p>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"\",\n    \"result\": 0,\n    \"data\": {\n        \"bookings\": [\n            {\n                \"_id\": \"\",\n                \"tour\": {\n                    \"_id\": \"\",\n                    \"name\": \"\",\n                    \"guides\": [\n                        {\n                            \"_id\": \"\",\n                            \"name\": \"\",\n                            \"email\": \"\",\n                            \"photo\": \"\",\n                            \"role\": \"\"\n                        }\n                    ],\n                    \"durationWeeks\": null,\n                    \"id\": \"\"\n                },\n                \"user\": {\n                    \"photo\": \"\",\n                    \"_id\": \"\",\n                    \"name\": \"\",\n                    \"email\": \"\",\n                    \"role\": \"\",\n                    \"changePasswordAt\": \"\",\n                    \"__v\": 0\n                },\n                \"price\": 0,\n                \"createdAt\": \"\",\n                \"paid\": true,\n                \"__v\": 0\n            }\n        ]\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["v1","booking",""],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"240d7567-0656-4873-a832-393f84e6705c"},{"name":"GET one booking","event":[{"listen":"test","script":{"id":"7226cbe5-017d-4f43-90a3-9f4cd8d25af5","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>Status</th>\r","        <th>User ID</th>\r","        <th>User Name</th>\r","        <th>User Email</th>\r","        <th>User Role</th>\r","        <th>Paid</th>\r","    </tr>\r","    <tr>\r","        <td>{{response.status}}</td>\r","        <td>{{response.data.doc.user._id}}</td>\r","        <td>{{response.data.doc.user.name}}</td>\r","        <td>{{response.data.doc.user.email}}</td>\r","        <td>{{response.data.doc.user.role}}</td>\r","        <td>{{response.data.paid}}</td>\r","    </tr>\r","</table>\r","`;\r","\r","function constructVisualizerPayload() {\r","    return {response: pm.response.json()}\r","}\r","\r","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript","packages":{}}}],"id":"49c3862b-5699-4871-8b21-bdac09ad8409","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{jwt}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}api/v1/booking/681a0c548a9e837b3a4f792a","description":"<h3 id=\"get-booking-details\">Get Booking Details</h3>\n<p>This endpoint retrieves the details of a specific booking identified by the booking ID in the URL.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Method: GET</p>\n</li>\n<li><p>URL: {{URL}}api/v1/booking/681a0c548a9e837b3a4f792a</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p>Status: 200</p>\n</li>\n<li><p>Content-Type: application/json</p>\n</li>\n<li><p>{ \"status\": \"\", \"data\": { \"doc\": { \"_id\": \"\", \"tour\": { \"_id\": \"\", \"name\": \"\", \"guides\": [ { \"_id\": \"\", \"name\": \"\", \"email\": \"\", \"photo\": \"\", \"role\": \"\" } ], \"durationWeeks\": null, \"id\": \"\" }, \"user\": { \"photo\": \"\", \"_id\": \"\", \"name\": \"\", \"email\": \"\", \"role\": \"\", \"changePasswordAt\": \"\", \"**v\": 0 }, \"price\": 0, \"createdAt\": \"\", \"paid\": true, \"**v\": 0 } }}<br />  This response provides the details of the booking, including the tour information, user details, price, and creation status.</p>\n</li>\n</ul>\n","urlObject":{"path":["v1","booking","681a0c548a9e837b3a4f792a"],"host":["{{URL}}api"],"query":[],"variable":[]}},"response":[],"_postman_id":"49c3862b-5699-4871-8b21-bdac09ad8409"}],"id":"4cd628db-80c5-489a-a84e-824585a6b991","_postman_id":"4cd628db-80c5-489a-a84e-824585a6b991","description":""}]}