{"info":{"_postman_id":"56f5485e-4b32-4c98-95dd-469cfc3b28cb","name":"event-man","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"21554629","collectionId":"56f5485e-4b32-4c98-95dd-469cfc3b28cb","publishedId":"2sAXxLCuac","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-04T00:33:12.000Z"},"item":[{"name":"auth","item":[{"name":"signup","id":"f06cde26-a117-440f-a4b0-070527427b3d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Registers a new user in the system.</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>POST /api/user/signup</code></p>\n</li>\n<li><p><strong>Description</strong>: Creates a new user with the provided email and password.</p>\n</li>\n</ul>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>/api/user/signup</code></p>\n</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"1e85758c-4492-47a8-a647-d1f938851116","name":"sign up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"dav1241@gmail.com\",\n    \"password\": \"Zyxwv09876$\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:3000/api/user/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"RateLimit-Policy","value":"70;w=600"},{"key":"RateLimit-Limit","value":"70"},{"key":"RateLimit-Remaining","value":"68"},{"key":"RateLimit-Reset","value":"584"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"198"},{"key":"ETag","value":"W/\"c6-itR6kmJ73vILfQ12D1ULFMgw9qE\""},{"key":"Date","value":"Fri, 04 Oct 2024 00:14:44 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User created successfully\",\n    \"data\": {\n        \"id\": \"eafbdc8e-dd89-4224-a8bd-f0af25fe7015\",\n        \"email\": \"dav1241@gmail.com\",\n        \"updatedAt\": \"2024-10-04T00:14:44.358Z\",\n        \"createdAt\": \"2024-10-04T00:14:44.358Z\"\n    }\n}"}],"_postman_id":"f06cde26-a117-440f-a4b0-070527427b3d"},{"name":"signin","id":"18bf6d3d-911f-4da5-96fd-6e42a80ca1aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Logs a user into the system and returns access tokens.</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>POST /api/auth/signin</code></p>\n</li>\n<li><p><strong>Description</strong>: Authenticates a user and generates tokens for future requests.</p>\n</li>\n</ul>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>/api/auth/signin</code></p>\n</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"bd504c69-8ab2-4e0b-a29a-9e32b3544136","name":"sign in","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"dav@gmail.com\",\n    \"password\": \"Zyxwvu09876$\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:3000/api/auth/signin"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"RateLimit-Policy","value":"70;w=600"},{"key":"RateLimit-Limit","value":"70"},{"key":"RateLimit-Remaining","value":"68"},{"key":"RateLimit-Reset","value":"589"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"870"},{"key":"ETag","value":"W/\"366-1EnyRY2UD5q8l9bVGUTMdM9sWwU\""},{"key":"Date","value":"Thu, 03 Oct 2024 01:24:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Login successful.\",\n    \"data\": {\n        \"user\": {\n            \"id\": \"8b7d7a68-0534-4211-847f-ad26e28bc697\",\n            \"email\": \"dav@gmail.com\",\n            \"createdAt\": \"2024-10-03T00:38:00.929Z\",\n            \"updatedAt\": \"2024-10-03T00:38:00.929Z\"\n        },\n        \"accessToken\": \"U2FsdGVkX18zE+ka3c3eX4AGZl8MB3DEDw4sPZT/7GJN9v0aOXldxqCpOjSA2D0gXi2FxL/xgb86v52T0HgFSN6B+Wm6tmMoukczF0uOMeY7eiYPjHclXEwEYE758i+fJnrT9yjKIYbJX2AoW4goMfQTpO/adCkF9kknPNknP/UPGBzPTS3kwPJEsVKcRaYuEqlpsIGcFyz2PWcqpTsoQRk9DAO2pOj/xyRv8x5RVrgwzgVjlEdJTs7luNinp9oopZLmQhjNLY4CcHqKBvPr88Kcoxr+fnZWbdG72VMZOMOwcQYYj4lcw3V5VroSizeV\",\n        \"refreshToken\": \"U2FsdGVkX1+bCwUoeZ0lU9hp0cKn3GJgBVe6z/IfSgajbIKYIOp+qjzZcUoQ21ykEnyOJ2v4P1ZFP50GO/Jhg0U8kDXrwO1P+tDXvVlyTb1ssq+V4Ud3bja45Fig5B2EPMFnoccgH1W5oyp2J0AqIdCrlehd1O7NSQE+ujRrNMJPydffo06R0IrTxtSZJ6VVq4UOwpw86ysAaRVSfFLlceH9sMNZoxF+PkZrJiltKNoQPtVo4v4pRryjZkpXazHa1jD0cQhURXd3pgnzyVpo6TsSdMb0gonGpOvJZFlGGpf4drDKGspddFbpj39HK6DM\"\n    }\n}"}],"_postman_id":"18bf6d3d-911f-4da5-96fd-6e42a80ca1aa"}],"id":"039124d2-f189-4627-a00d-9483240041d5","description":"<p>This Folder handles signup and signin</p>\n","_postman_id":"039124d2-f189-4627-a00d-9483240041d5"},{"name":"event","item":[{"name":"create event","id":"5e24a364-3e45-4785-9ca9-b0c4fa67814d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Creates a new event.</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>POST /api/event/initialize</code></p>\n</li>\n<li><p><strong>Description</strong>: Initializes a new event with a given name and total number of tickets.</p>\n</li>\n</ul>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>/api/event/initialize</code></p>\n</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"73360c93-1d38-4eeb-a3b8-b44b5e8ba357","name":"create event","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"first event- e\",\n    \"totalTickets\": 5\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:3000/api/event/initialize"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"RateLimit-Policy","value":"70;w=600"},{"key":"RateLimit-Limit","value":"70"},{"key":"RateLimit-Remaining","value":"69"},{"key":"RateLimit-Reset","value":"600"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"277"},{"key":"ETag","value":"W/\"115-EJFCfeMxbzfYJm3dQmJkxnyNB1Q\""},{"key":"Date","value":"Thu, 03 Oct 2024 00:26:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Event created successfully\",\n    \"data\": {\n        \"id\": \"2371f796-e565-47bd-92ed-88d7c9dcf8b5\",\n        \"soldTickets\": 0,\n        \"name\": \"first event- e\",\n        \"totalTickets\": 5,\n        \"ownerId\": \"42bbfa79-b1fd-441e-80ca-a3ba514e97ed\",\n        \"updatedAt\": \"2024-10-03T00:26:06.798Z\",\n        \"createdAt\": \"2024-10-03T00:26:06.798Z\"\n    }\n}"}],"_postman_id":"5e24a364-3e45-4785-9ca9-b0c4fa67814d"},{"name":"get event","id":"533d678d-e330-4c02-bba5-e4e409927585","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Retrieves the current status of an event, including the number of available tickets and waiting list count.</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>GET /api/event/status/:eventId</code></p>\n</li>\n<li><p><strong>Description</strong>: Fetches the details of an event by its <code>eventId</code>.</p>\n</li>\n</ul>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method</strong>: GET</p>\n</li>\n<li><p><strong>URL</strong>: <code>/api/event/status/:eventId</code></p>\n</li>\n<li><p><strong>Parameters</strong>:</p>\n<ul>\n<li><code>eventId</code>: The unique identifier of the event.</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"ef8ef905-ea5a-4072-aed3-7fe6f789643c","name":"get event","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:3000/api/event/status/2371f796-e565-47bd-92ed-88d7c9dcf8b5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"RateLimit-Policy","value":"70;w=600"},{"key":"RateLimit-Limit","value":"70"},{"key":"RateLimit-Remaining","value":"67"},{"key":"RateLimit-Reset","value":"339"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"164"},{"key":"ETag","value":"W/\"a4-ClTVIZCe3+Yq8L98gqZcqMR9Ux0\""},{"key":"Date","value":"Fri, 11 Oct 2024 15:03:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Event fetched successfully\",\n    \"data\": {\n        \"EventId\": \"2371f796-e565-47bd-92ed-88d7c9dcf8b5\",\n        \"EventName\": \"first event- e\",\n        \"availableTickets\": 0,\n        \"waitingList\": 1\n    }\n}"}],"_postman_id":"533d678d-e330-4c02-bba5-e4e409927585"}],"id":"7bd96b35-eaf0-4f3a-9cd7-edb4a3abafc0","description":"<p>This folder gives the endpoint for events</p>\n","_postman_id":"7bd96b35-eaf0-4f3a-9cd7-edb4a3abafc0"},{"name":"reservations","item":[{"name":"create reservation","id":"6296c466-e5c3-44d4-b2d3-d297c643ed76","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Allows a user to make a reservation for an event. If the reservation is successful, the user is added to the reservation list, and tickets are updated.</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>POST /api/reservation/book</code></p>\n</li>\n<li><p><strong>Description</strong>: Creates a reservation for a specific event.</p>\n</li>\n</ul>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>/api/reservation/book</code></p>\n</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"58ede93b-80ed-4915-afcc-8d71279762be","name":"book reservation","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"eventId\": \"2371f796-e565-47bd-92ed-88d7c9dcf8b5\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/reservation/book"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"RateLimit-Policy","value":"70;w=600"},{"key":"RateLimit-Limit","value":"70"},{"key":"RateLimit-Remaining","value":"63"},{"key":"RateLimit-Reset","value":"318"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"96"},{"key":"ETag","value":"W/\"60-59tga9n0x1cWBgyzp2BdUdtKc+U\""},{"key":"Date","value":"Fri, 11 Oct 2024 15:02:48 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"The event is sold out, you have been added to the waiting list.\",\n    \"status\": \"waiting\"\n}"}],"_postman_id":"6296c466-e5c3-44d4-b2d3-d297c643ed76"},{"name":"cancel request","id":"10cda75a-aca3-48d6-bae8-ba825c1663db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Allows a user to cancel a previously booked reservation.</p>\n<ul>\n<li><p><strong>Endpoint</strong>: <code>POST /api/reservation/cancel</code></p>\n</li>\n<li><p><strong>Description</strong>: Cancels a reservation for a specific event and updates the waiting list accordingly.</p>\n</li>\n</ul>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>/api/reservation/cancel</code></p>\n</li>\n</ul>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"d051b8c0-07b9-4d35-aa93-33b85b74d83d","name":"cancel reservation","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"eventId\": \"ff0e0c7d-fc28-4e6f-8244-dc0978dbf480\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:3000/api/reservation/cancel"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"RateLimit-Policy","value":"70;w=600"},{"key":"RateLimit-Limit","value":"70"},{"key":"RateLimit-Remaining","value":"63"},{"key":"RateLimit-Reset","value":"302"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"48"},{"key":"ETag","value":"W/\"30-VabcTY2bxZUF2TeNJuMlztur/ek\""},{"key":"Date","value":"Fri, 04 Oct 2024 00:19:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Reservation successfully canceled.\"\n}"}],"_postman_id":"10cda75a-aca3-48d6-bae8-ba825c1663db"}],"id":"e20ecc20-3ecb-433a-9fe5-ae841e9ce29a","description":"<p>This Folder gives endpoints for reservations</p>\n","_postman_id":"e20ecc20-3ecb-433a-9fe5-ae841e9ce29a"}]}