{"info":{"_postman_id":"79fbcf10-e0be-48bf-862d-3be4bc4fc2b6","name":"HallBooking_API","description":"<html><head></head><body><p>Hall booking API to create room,book room, view all the booked room data, customer data and also the data related to number of times customer booked room using Express JS.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"30449280","collectionId":"79fbcf10-e0be-48bf-862d-3be4bc4fc2b6","publishedId":"2sA2xh4DsV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-03-11T05:10:59.000Z"},"item":[{"name":"Rooms","item":[{"name":"getAllRooms","id":"2dda6925-f7e9-4765-9955-6813de3555f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h1 id=\"get-all-rooms\">Get All Rooms</h1>\n<p>This endpoint retrieves a list of all available rooms.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>GET</code> <a href=\"https://hall-booking-wumt.onrender.com/rooms/all\">https://hall-booking-wumt.onrender.com/rooms/all</a></p>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li><code>200 OK</code></li>\n<li><code>Content-Type: application/json</code></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"\",\n    \"count\": 0,\n    \"RoomsList\": [\n        {\n            \"roomId\": \"\",\n            \"seatsAvailable\": \"\",\n            \"amenities\": \"\",\n            \"pricePerHour\": \"\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"2dda6925-f7e9-4765-9955-6813de3555f3"},{"name":"CreateRoom","id":"61339e95-fca4-4403-be0e-74d1ab172149","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h3 id=\"create-room\">Create Room</h3>\n<p>This endpoint allows you to create a new room for booking.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>POST</code> <a href=\"https://hall-booking-wumt.onrender.com/rooms/all\">https://hall-booking-wumt.onrender.com/rooms/create</a></p>\n<ul>\n<li><code>roomId</code> (string, required): The unique identifier for the room.</li>\n<li><code>seatsAvailable</code> (string, required): The number of seats available in the room.</li>\n<li><code>amenities</code> (string, required): The amenities available in the room.</li>\n<li><code>pricePerHour</code> (string, required): The price per hour for booking the room.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li>Status: 201</li>\n<li>Content-Type: application/json</li>\n<li><code>message</code>: A message confirming the successful creation of the room.</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"61339e95-fca4-4403-be0e-74d1ab172149"}],"id":"a9ecbe37-17b8-47c1-9a51-8d42eaad679b","description":"<p>Room details</p>\n","_postman_id":"a9ecbe37-17b8-47c1-9a51-8d42eaad679b"},{"name":"BookingRoom","item":[{"name":"getBookings","id":"27362aeb-54b4-4484-a0be-657da3a6a939","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h1 id=\"get-all-bookings\">Get All Bookings</h1>\n<p>This endpoint is used to view booking details.</p>\n<p>The response will be a JSON array with the details of each booking, including the room ID, status, customer name, booking date, start time, and end time.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>GET</code> <a href=\"https://hall-booking-wumt.onrender.com/rooms/all\">https://hall-booking-wumt.onrender.com/viewbooking</a></p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"27362aeb-54b4-4484-a0be-657da3a6a939"},{"name":"createBookings","id":"c1484fe5-9d97-4ffb-9462-14b2686b84fe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h1 id=\"create-booking\">Create Booking</h1>\n<p>This endpoint allows you to create a new booking for a specific room.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"http-post-createbookingid\">HTTP POST /createbooking/:id</h3>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>POST</code> <a href=\"https://hall-booking-wumt.onrender.com/rooms/all\">https://hall-booking-wumt.onrender.com/createbooking/:id</a></p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>roomId</code> (string) - The ID of the room for the booking.</li>\n<li><code>status</code> (string) - The status of the booking.</li>\n<li><code>customer</code> (string) - The name of the customer for the booking.</li>\n<li><code>bookingDate</code> (string) - The date of the booking.</li>\n<li><code>startTime</code> (string) - The start time of the booking.</li>\n<li><code>endTime</code> (string) - The end time of the booking.</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li>Status: 201</li>\n<li>Content-Type: application/json</li>\n</ul>\n<h4 id=\"response-body\">Response Body</h4>\n<p>The response will include a message indicating the success of the operation, along with the details of the newly added booking.</p>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"Booking created successfully\",\n    \"Bookings\": [\n        {\n            \"customer\": \"John Doe\",\n            \"bookingDate\": \"2022-12-31\",\n            \"startTime\": \"10:00 AM\",\n            \"endTime\": \"12:00 PM\",\n            \"roomId\": \"12345\",\n            \"status\": \"confirmed\"\n        }\n    ],\n    \"added\": {\n        \"roomId\": \"12345\",\n        \"status\": \"confirmed\",\n        \"customer\": \"John Doe\",\n        \"bookingDate\": \"2022-12-31\",\n        \"startTime\": \"10:00 AM\",\n        \"endTime\": \"12:00 PM\"\n    }\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"c1484fe5-9d97-4ffb-9462-14b2686b84fe"}],"id":"89dbc926-b573-4a88-8737-d8dbc419edbd","description":"<p>Booking Details</p>\n","_postman_id":"89dbc926-b573-4a88-8737-d8dbc419edbd"},{"name":"Customer","item":[{"name":"getAllCustomers","id":"bdafe1b4-5f45-4b3e-b347-47cbd8a8c6b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h1 id=\"get-all-customer-details\">Get All Customer Details</h1>\n<p>This endpoint retrieves a list of customers from the hall booking system. The response will be in JSON format and will include an array of customer objects with their name, room ID, booking date, start time, and end time.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>GET</code> <a href=\"https://hall-booking-wumt.onrender.com/rooms/all\">https://hall-booking-wumt.onrender.com/customers</a></p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"bdafe1b4-5f45-4b3e-b347-47cbd8a8c6b0"},{"name":"ListNumberOfTimesCustomerBooked","id":"517e8527-d4e5-4910-b4c0-175d089b6cbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h1 id=\"get-number-of-times-customer-booked-room\">Get Number Of Times Customer Booked Room</h1>\n<p>This endpoint retrieves the details of a specific customer by their name.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li>Method: GET</li>\n<li>URL: <a href=\"https://hall-booking-wumt.onrender.com/rooms/all\">https://hall-booking-wumt.onrender.com/customer/:name</a></li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li>Status: 200</li>\n<li>Content-Type: application/json</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"count\": 0,\n    \"customerBookings\": [\n        {\n            \"customer\": \"\",\n            \"roomId\": \"\",\n            \"startTime\": \"\",\n            \"endTime\": \"\",\n            \"status\": \"\",\n            \"bookingDate\": \"\"\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"517e8527-d4e5-4910-b4c0-175d089b6cbc"}],"id":"cfda355b-0e53-4f21-8b74-5c10f4767a15","description":"<p>Customer Details</p>\n","_postman_id":"cfda355b-0e53-4f21-8b74-5c10f4767a15"}]}