{"info":{"_postman_id":"ac49136a-a385-455b-9a68-6ea3b558a623","name":"Laundry Buddy API Documentation","description":"<html><head></head><body><p>StartFragment</p>\n<p>The <strong>LaundryBuddy API Documentation</strong> is organized into three main sections:</p>\n<p>1️⃣ <strong>User API</strong> 🧑‍💼</p>\n<ul>\n<li><p>Handles user registration, login, profile updates.</p>\n</li>\n<li><p>Users can place orders, check order status, and submit complaints.</p>\n</li>\n</ul>\n<p>2️⃣ <strong>Worker API</strong> 🛠️</p>\n<ul>\n<li><p>Workers can view all daily orders, track pending/completed orders.</p>\n</li>\n<li><p>Can update order status and notify users via SMS.</p>\n</li>\n</ul>\n<p>3️⃣ <strong>Admin API</strong> 🔧</p>\n<ul>\n<li><p>Admins can create worker accounts by assigning email and password.</p>\n</li>\n<li><p>Responsible for overall system management and worker access control.</p>\n</li>\n</ul>\n<p>EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"39216846","collectionId":"ac49136a-a385-455b-9a68-6ea3b558a623","publishedId":"2sB3dTt8WB","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"0096FF"},"publishDate":"2025-12-15T13:02:02.000Z"},"item":[{"name":"User","item":[{"name":"1. User Authentication APIs","item":[{"name":"Add new user","id":"297e52ee-149e-4b54-a8e3-5f47bc9a30e5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"nagesh\",\r\n  \"email\": \"nagesh@gmail.com\",\r\n  \"phoneNumber\": \"9898989898\",\r\n  \"buildingName\": \"Boys Hostel\",\r\n  \"roomNumber\": \"52\",\r\n  \"bagNumber\" : \"217\",\r\n  \"password\": \"password123\",\r\n  \"confirmPassword\": \"password123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/signup","description":"<h1 id=\"description\"><strong>Description:</strong></h1>\n<p>Registers a new user by validating input fields, checking for existing users, and securely storing the password.</p>\n","urlObject":{"protocol":"https","path":["user","signup"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"297e52ee-149e-4b54-a8e3-5f47bc9a30e5"},{"name":"Login User","id":"ccc392be-0e78-4d7a-a08e-ec7936cc8fcd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"stakescasino433@gmail.com\",\r\n  \"password\": \"pass123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/login","urlObject":{"protocol":"https","path":["user","login"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ccc392be-0e78-4d7a-a08e-ec7936cc8fcd"},{"name":"Forgot-Password","id":"ec2053b8-592f-4aa0-805a-70f872c0c286","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"stakescasino433@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/forgot-password","urlObject":{"protocol":"https","path":["user","forgot-password"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ec2053b8-592f-4aa0-805a-70f872c0c286"},{"name":"Reset-Password","id":"652d973d-ae99-47dc-98de-c9db1548dfbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n \r\n\r\n  \"newPassword\": \"password123\",\r\n  \"confirmPassword\": \"password123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/reset-password/:token","urlObject":{"protocol":"https","path":["user","reset-password",":token"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[{"type":"any","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2N2IyMzM3Yzk3ZWU1YWVlY2ViY2EwZmYiLCJpYXQiOjE3NDAxNjI1OTYsImV4cCI6MTc0MDE2NjE5Nn0.CFiF_629-NItBrXOPPyxvTNYs7sVis914RpaWfj5E-k","key":"token"}]}},"response":[],"_postman_id":"652d973d-ae99-47dc-98de-c9db1548dfbc"},{"name":"Update Password","id":"75d9415b-1fdc-4fb7-ab7f-dbe40abc0df0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2N2IyMzM3Yzk3ZWU1YWVlY2ViY2EwZmYiLCJyb2xlIjoidXNlciIsImlhdCI6MTc0MDE5OTQ3NiwiZXhwIjoxNzQwMjAzMDc2fQ.c1d6cVETY4g4AHWeK6CMTLu91430-6b89rPB5etS-Ko","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"currentPassword\":\"pass@123\",\r\n    \"newPassword\":\"password123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/update-password","urlObject":{"protocol":"https","path":["user","update-password"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"75d9415b-1fdc-4fb7-ab7f-dbe40abc0df0"}],"id":"e285f382-c4c0-4ad7-b8b8-8fe16d271b23","description":"<h1 id=\"postman-documentation-for-authentication-routes\">Postman Documentation for Authentication Routes</h1>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://laundry-buddy-yysq.onrender.com/\n\n</code></pre><h2 id=\"1-register-user\">1. Register User</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /register\n\n</code></pre><h3 id=\"request-body-json\">Request Body (JSON)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"phoneNumber\": \"1234567890\",\n  \"buildingName\": \"XYZ Apartments\",\n  \"roomNumber\": \"101\",\n  \"bagNumber\": \"A101\",\n  \"password\": \"password123\",\n  \"confirmPassword\": \"password123\"\n}\n\n</code></pre>\n<h3 id=\"response-success\">Response (Success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"message\": \"User registered successfully\",\n  \"user\": { \"_id\": \"userId\", \"name\": \"John Doe\", \"email\": \"john@example.com\" }\n}\n\n</code></pre>\n<h3 id=\"response-error\">Response (Error)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"User already exists with this email.\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"2-login-user\">2. Login User</h2>\n<h3 id=\"endpoint-1\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /login\n\n</code></pre><h3 id=\"request-body-json-1\">Request Body (JSON)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"john@example.com\",\n  \"password\": \"password123\"\n}\n\n</code></pre>\n<h3 id=\"response-success-1\">Response (Success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"message\": \"Login successful\",\n  \"token\": \"jwt_token\",\n  \"name\": \"John Doe\",\n  \"userId\": \"userId\",\n  \"role\": \"user\"\n}\n\n</code></pre>\n<h3 id=\"response-error-1\">Response (Error)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Invalid password\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"3-forgot-password\">3. Forgot Password</h2>\n<h3 id=\"endpoint-2\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /forgot-password\n\n</code></pre><h3 id=\"request-body-json-2\">Request Body (JSON)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"john@example.com\"\n}\n\n</code></pre>\n<h3 id=\"response-success-2\">Response (Success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Reset link sent to email\",\n  \"link\": \"http://frontend-url.com/reset-password/jwt_token\"\n}\n\n</code></pre>\n<h3 id=\"response-error-2\">Response (Error)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"User not found\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"4-reset-password\">4. Reset Password</h2>\n<h3 id=\"endpoint-3\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /reset-password/:token\n\n</code></pre><h3 id=\"request-body-json-3\">Request Body (JSON)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"newPassword\": \"newpassword123\",\n  \"confirmPassword\": \"newpassword123\"\n}\n\n</code></pre>\n<h3 id=\"response-success-3\">Response (Success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Password Updated Successfully\"\n}\n\n</code></pre>\n<h3 id=\"response-error-3\">Response (Error)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Invalid or expired token\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"5-update-password\">5. Update Password</h2>\n<h3 id=\"endpoint-4\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /update-password\n\n</code></pre><h3 id=\"headers\">Headers</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer jwt_token\n\n</code></pre><h3 id=\"request-body-json-4\">Request Body (JSON)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"currentPassword\": \"oldpassword123\",\n  \"newPassword\": \"newpassword123\"\n}\n\n</code></pre>\n<h3 id=\"response-success-4\">Response (Success)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"🎉 Password Updated Successfully\"\n}\n\n</code></pre>\n<h3 id=\"response-error-4\">Response (Error)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Current password is incorrect!\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Ensure to replace <code>jwt_token</code> with the actual token received after login.</p>\n</li>\n<li><p>All protected routes require the <code>Authorization: Bearer</code> header.</p>\n</li>\n<li><p>The reset password link expires in <strong>3 minutes</strong>.</p>\n</li>\n<li><p>The JWT token expires in <strong>1 hour</strong>.</p>\n</li>\n</ul>\n","_postman_id":"e285f382-c4c0-4ad7-b8b8-8fe16d271b23"},{"name":"Orders Management APIs","item":[{"name":"Submit-Laundry-form","id":"4f677028-9267-4c50-aae6-7ae71056d0ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2N2IyMzM3Yzk3ZWU1YWVlY2ViY2EwZmYiLCJyb2xlIjoidXNlciIsImlhdCI6MTczOTc2NzA0MiwiZXhwIjoxNzM5NzcwNjQyfQ.esF7hpahveuN97XEU-qBfajYeEwbZLTDhiyqFUGbrnw","type":"text"}],"body":{"mode":"raw","raw":"{\r\n \r\n  \"numberOfClothes\": \"\",\r\n  \"weight\":\"4\" \r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/submit-order","urlObject":{"protocol":"https","path":["user","submit-order"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"4f677028-9267-4c50-aae6-7ae71056d0ff"},{"name":"Get order history","id":"e8bc0a37-0013-4051-9d31-8ccef384245a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2N2IyMzM3Yzk3ZWU1YWVlY2ViY2EwZmYiLCJyb2xlIjoidXNlciIsImlhdCI6MTc0MDQ5Njk3NSwiZXhwIjoxNzQwNTAwNTc1fQ.N8jQbpaz2WpncVmZyEk8fkv-gQrv07uslpOqQTBvsXU","type":"text"}],"url":"https://laundry-buddy-yysq.onrender.com/user/order-history","urlObject":{"protocol":"https","path":["user","order-history"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e8bc0a37-0013-4051-9d31-8ccef384245a"}],"id":"cf1a3c43-1282-45ea-acf2-ab29210813bb","description":"<h1 id=\"order-api-documentation\">Order API Documentation</h1>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">https://laundry-buddy-yysq.onrender.com/\n\n</code></pre>\n<hr />\n<h2 id=\"1-submit-order\">1. Submit Order</h2>\n<h3 id=\"endpoint\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /submit\n\n</code></pre><h3 id=\"description\">Description:</h3>\n<p>This API allows users to submit an order by providing the number of clothes and weight.</p>\n<h3 id=\"headers\">Headers:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-json\">Request Body (JSON):</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"numberOfClothes\": 5,\n  \"weight\": 2\n}\n\n</code></pre>\n<h3 id=\"responses\">Responses:</h3>\n<h4 id=\"success-201-created\">Success (201 Created):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Order submitted successfully\",\n  \"order\": {\n    \"_id\": \"65abcdef1234567890\",\n    \"userId\": \"65xyz1234567890abcd\",\n    \"numberOfClothes\": 5,\n    \"weight\": 2,\n    \"status\": \"Pending\",\n    \"createdAt\": \"03/13/2025, 10:30:15 AM\"\n  }\n}\n\n</code></pre>\n<h4 id=\"error-400-bad-request---missing-fields\">Error (400 Bad Request - Missing Fields):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Number of Clothes Are Required\"\n}\n\n</code></pre>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Plz enter the weight\"\n}\n\n</code></pre>\n<h4 id=\"error-500-internal-server-error\">Error (500 Internal Server Error):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Failed to submit order\",\n  \"error\": \"Database connection error\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"2-get-order-summary\">2. Get Order Summary</h2>\n<h3 id=\"endpoint-1\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /summary\n\n</code></pre><h3 id=\"description-1\">Description:</h3>\n<p>This API retrieves the user's order summary, including total, pending, and completed orders.</p>\n<h3 id=\"headers-1\">Headers:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"response\">Response:</h3>\n<h4 id=\"success-200-ok\">Success (200 OK):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"totalOrders\": 10,\n  \"lengthOfPending\": 3,\n  \"lengthOfComplete\": 7,\n  \"order\": [\n    {\n      \"orderId\": \"65abcdef1234567890\",\n      \"numberOfClothes\": 5,\n      \"weight\": 2,\n      \"status\": \"Pending\",\n      \"createdAt\": \"03/13/2025, 10:30:15 AM\"\n    },\n    {\n      \"orderId\": \"65xyz1234567890abcd\",\n      \"numberOfClothes\": 3,\n      \"weight\": 1.5,\n      \"status\": \"Completed\",\n      \"createdAt\": \"03/12/2025, 09:15:30 PM\"\n    }\n  ]\n}\n\n</code></pre>\n<h4 id=\"error-404-not-found---no-orders\">Error (404 Not Found - No Orders):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"No order found\"\n}\n\n</code></pre>\n<h4 id=\"error-500-internal-server-error-1\">Error (500 Internal Server Error):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Failed to fetch orders\",\n  \"error\": \"Database connection issue\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>All endpoints require authentication using a Bearer token.</p>\n</li>\n<li><p>Ensure proper error handling for missing or incorrect data.</p>\n</li>\n<li><p>Dates are formatted in Indian Standard Time (IST).</p>\n</li>\n</ul>\n<hr />\n<p><strong>Postman Collection:</strong> Import this documentation into Postman to test the API endpoints effectively.</p>\n","_postman_id":"cf1a3c43-1282-45ea-acf2-ab29210813bb"},{"name":"Complaint Form","item":[{"name":"Submit_Complaint","id":"e9d8efdf-fc9d-4b80-a8f7-60af8541e672","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"userId\": \"67947d062302c1061d974759\", \r\n  \"bagNumber\": 1234,\r\n  \"typeOfComplaint\": \"Delay\",  // The type of complaint\r\n  \"description\": \"The laundry was delayed by two days.\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/submit-complaint","urlObject":{"protocol":"https","path":["user","submit-complaint"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9d8efdf-fc9d-4b80-a8f7-60af8541e672"}],"id":"a6577867-b9d1-4311-b3e3-d7d3e78815ea","description":"<h1 id=\"complaint-api-documentation\">Complaint API Documentation</h1>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">https://laundry-buddy-yysq.onrender.com/\n\n</code></pre>\n<hr />\n<h2 id=\"1-submit-complaint\">1. Submit Complaint</h2>\n<h3 id=\"endpoint\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST /submit\n\n</code></pre><h3 id=\"description\">Description:</h3>\n<p>This API allows users to submit a complaint by providing their user ID, bag number, type of complaint, and description.</p>\n<h3 id=\"headers\">Headers:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-json\">Request Body (JSON):</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"userId\": \"65abcdef1234567890\",\n  \"bagNumber\": \"BAG12345\",\n  \"typeOfComplaint\": \"Damaged Clothes\",\n  \"description\": \"My clothes were damaged during the wash.\"\n}\n\n</code></pre>\n<h3 id=\"responses\">Responses:</h3>\n<h4 id=\"success-201-created\">Success (201 Created):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Complaint submitted successfully\",\n  \"complaint\": {\n    \"_id\": \"65xyz1234567890abcd\",\n    \"userId\": \"65abcdef1234567890\",\n    \"bagNumber\": \"BAG12345\",\n    \"typeOfComplaint\": \"Damaged Clothes\",\n    \"description\": \"My clothes were damaged during the wash.\",\n    \"userName\": \"John Doe\",\n    \"userAddress\": \"Sunset Apartments, Room 101\",\n    \"createdAt\": \"03/13/2025, 10:45:00 AM\"\n  }\n}\n\n</code></pre>\n<h4 id=\"error-400-bad-request---missing-fields\">Error (400 Bad Request - Missing Fields):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"All fields are required.\"\n}\n\n</code></pre>\n<h4 id=\"error-404-not-found---user-not-found\">Error (404 Not Found - User Not Found):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"User not found.\"\n}\n\n</code></pre>\n<h4 id=\"error-500-internal-server-error\">Error (500 Internal Server Error):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Failed to submit complaint\",\n  \"error\": \"Database connection issue\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>This endpoint requires authentication via a Bearer token.</p>\n</li>\n<li><p>Ensure that the <code>userId</code> exists in the database before submitting a complaint.</p>\n</li>\n<li><p>User details (name and address) are automatically added to the complaint.</p>\n</li>\n<li><p>Timestamps are formatted in Indian Standard Time (IST).</p>\n</li>\n</ul>\n<hr />\n","_postman_id":"a6577867-b9d1-4311-b3e3-d7d3e78815ea"},{"name":"User Profile Management","item":[{"name":"Get User Detail on UserId","id":"e4981d32-8975-4624-8bac-9c0379105afa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2N2IyMzM3Yzk3ZWU1YWVlY2ViY2EwZmYiLCJyb2xlIjoidXNlciIsImlhdCI6MTczOTg2NzU5OCwiZXhwIjoxNzM5ODcxMTk4fQ.jz3RxVoDLVDAFONr8kRmgp8ypdPqmV5ycOtV507yo7M","type":"text"}],"url":"https://laundry-buddy-yysq.onrender.com/user/profile","urlObject":{"protocol":"https","path":["user","profile"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e4981d32-8975-4624-8bac-9c0379105afa"},{"name":"Update the User Details","id":"d55f44c7-b1cc-4dd3-9adc-a3d7beb97eda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2N2IyMzM3Yzk3ZWU1YWVlY2ViY2EwZmYiLCJyb2xlIjoidXNlciIsImlhdCI6MTczOTg3NjAzMCwiZXhwIjoxNzM5ODc5NjMwfQ.4PB1njKrLTL1rTtQwRnG0YuxN7Xw5HQlphMV-jysnCY","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \r\n \r\n  \"roomNumber\": \"52\",\r\n  \"bagNumber\": \"230\",\r\n  \"address\" : \"Haryana\"\r\n  \r\n\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/user/profile?=","urlObject":{"protocol":"https","path":["user","profile"],"host":["laundry-buddy-yysq","onrender","com"],"query":[{"key":"","value":""}],"variable":[]}},"response":[],"_postman_id":"d55f44c7-b1cc-4dd3-9adc-a3d7beb97eda"}],"id":"50572466-34ed-4315-86ba-0307e72e2c2b","description":"<h1 id=\"user-profile-api-documentation\">User Profile API Documentation</h1>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">https://laundry-buddy-yysq.onrender.com/\n\n</code></pre>\n<hr />\n<h2 id=\"1-get-user-profile\">1. Get User Profile</h2>\n<h3 id=\"endpoint\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /profile\n\n</code></pre><h3 id=\"description\">Description:</h3>\n<p>This API fetches the profile details of the authenticated user.</p>\n<h3 id=\"headers\">Headers:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"responses\">Responses:</h3>\n<h4 id=\"success-200-ok\">Success (200 OK):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"_id\": \"65abcdef1234567890\",\n  \"name\": \"John Doe\",\n  \"email\": \"johndoe@example.com\",\n  \"phoneNumber\": \"9876543210\",\n  \"roomNumber\": \"101\",\n  \"bagNumber\": \"BAG12345\",\n  \"buildingName\": \"Sunset Apartments\",\n  \"address\": \"Street 45, City, State, 123456\"\n}\n\n</code></pre>\n<h4 id=\"error-404-not-found---user-not-found\">Error (404 Not Found - User Not Found):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"User not found\"\n}\n\n</code></pre>\n<h4 id=\"error-500-internal-server-error\">Error (500 Internal Server Error):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Server Error\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"2-update-user-profile\">2. Update User Profile</h2>\n<h3 id=\"endpoint-1\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT /profile\n\n</code></pre><h3 id=\"description-1\">Description:</h3>\n<p>This API allows users to update their profile information.</p>\n<h3 id=\"headers-1\">Headers:</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Key</th>\n<th>Value</th>\n<th>Required</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Authorization</td>\n<td>Bearer</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-json\">Request Body (JSON):</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"phoneNumber\": \"9876543210\",\n  \"roomNumber\": \"102\",\n  \"bagNumber\": \"BAG67890\",\n  \"buildingName\": \"Sunrise Towers\",\n  \"address\": \"New Street 12, City, State, 654321\"\n}\n\n</code></pre>\n<h3 id=\"responses-1\">Responses:</h3>\n<h4 id=\"success-200-ok-1\">Success (200 OK):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Profile Update Successfully\",\n  \"user\": {\n    \"_id\": \"65abcdef1234567890\",\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@example.com\",\n    \"phoneNumber\": \"9876543210\",\n    \"roomNumber\": \"102\",\n    \"bagNumber\": \"BAG67890\",\n    \"buildingName\": \"Sunrise Towers\",\n    \"address\": \"New Street 12, City, State, 654321\"\n  }\n}\n\n</code></pre>\n<h4 id=\"error-400-bad-request---phone-number-already-in-use\">Error (400 Bad Request - Phone Number Already in Use):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Phone Number is already in use\"\n}\n\n</code></pre>\n<h4 id=\"error-404-not-found---user-not-found-1\">Error (404 Not Found - User Not Found):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"User not Found\"\n}\n\n</code></pre>\n<h4 id=\"error-500-internal-server-error-1\">Error (500 Internal Server Error):</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"message\": \"Internal server error\",\n  \"error\": \"Database connection issue\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Authentication via a Bearer token is required for both endpoints.</p>\n</li>\n<li><p>The <code>PUT /profile</code> request allows partial updates (only provided fields will be updated).</p>\n</li>\n<li><p>Phone numbers must be unique across users.</p>\n</li>\n<li><p>The <code>GET /profile</code> response includes full user details.</p>\n</li>\n<li><p>Timestamps are formatted in Indian Standard Time (IST).</p>\n</li>\n</ul>\n<hr />\n","_postman_id":"50572466-34ed-4315-86ba-0307e72e2c2b"}],"id":"fa0e0cff-de59-433d-b6a1-36e22ba000be","description":"<h1 id=\"user-api-documentation\"><strong>User API Documentation</strong></h1>\n<h2 id=\"base-url\"><strong>Base URL:</strong></h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">https://laundry-buddy-yysq.onrender.com/\n\n</code></pre>\n<h2 id=\"1-authentication-api\"><strong>1. Authentication API</strong></h2>\n<h3 id=\"endpoints\"><strong>Endpoints:</strong></h3>\n<ul>\n<li><p><strong>POST</strong> <code>/register</code> → Register a new user.</p>\n</li>\n<li><p><strong>POST</strong> <code>/login</code> → User login.</p>\n</li>\n<li><p><strong>POST</strong> <code>/forgot-password</code> → Send password reset link.</p>\n</li>\n<li><p><strong>POST</strong> <code>/reset-password/:token</code> → Reset password using token.</p>\n</li>\n<li><p><strong>PUT</strong> <code>/update-password</code> → Update password (authenticated).</p>\n</li>\n</ul>\n<h2 id=\"2-orders-api\"><strong>2. Orders API</strong></h2>\n<h3 id=\"endpoints-1\"><strong>Endpoints:</strong></h3>\n<ul>\n<li><p><strong>POST</strong> <code>/submit</code> → Submit a new laundry order.</p>\n</li>\n<li><p><strong>GET</strong> <code>/summary</code> → Get order summary (total, pending, completed).</p>\n</li>\n</ul>\n<h2 id=\"3-complaint-api\"><strong>3. Complaint API</strong></h2>\n<h3 id=\"endpoints-2\"><strong>Endpoints:</strong></h3>\n<ul>\n<li><strong>POST</strong> <code>/submit</code> → Submit a complaint regarding laundry service.</li>\n</ul>\n<h2 id=\"4-user-profile-api\"><strong>4. User Profile API</strong></h2>\n<h3 id=\"endpoints-3\"><strong>Endpoints:</strong></h3>\n<ul>\n<li><p><strong>GET</strong> <code>/profile</code> → Fetch user profile details.</p>\n</li>\n<li><p><strong>PUT</strong> <code>/profile</code> → Update user profile details.</p>\n</li>\n</ul>\n<h2 id=\"notes\"><strong>Notes:</strong></h2>\n<ul>\n<li><p>All protected routes require <code>Authorization: Bearer token</code>.</p>\n</li>\n<li><p>Responses include success and error handling messages.</p>\n</li>\n<li><p>Timestamps are formatted in IST.</p>\n</li>\n</ul>\n","_postman_id":"fa0e0cff-de59-433d-b6a1-36e22ba000be"},{"name":"Admin","item":[{"name":"Handle Worker","item":[{"name":"Email & Password Assign","item":[{"name":"Assign Email and pass","id":"e86748b1-4366-4726-9eea-331d153c8df6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"rai@university.com\",\r\n  \"password\": \"rai123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/admin/add-worker","urlObject":{"protocol":"https","path":["admin","add-worker"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e86748b1-4366-4726-9eea-331d153c8df6"},{"name":"Login Worker","id":"89c22ce1-860f-4ff3-bd98-5c6f9708930e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"email\": \"rai@university.com\",\r\n  \"password\": \"rai123\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/worker/login","urlObject":{"protocol":"https","path":["worker","login"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"89c22ce1-860f-4ff3-bd98-5c6f9708930e"}],"id":"65d3becf-bb0a-4b0a-b0e7-93965c6b1d47","description":"<h3 id=\"assign-email--password-to-worker\"><strong>Assign Email &amp; Password to Worker</strong></h3>\n<p><strong>Endpoint:</strong> <code>POST /api/admin/workers</code></p>\n<p><strong>Description:</strong>  </p>\n<p>This API allows the admin to create a worker account by assigning an email and password. The password is securely hashed before storing it.</p>\n<h4 id=\"request\"><strong>Request</strong></h4>\n<ul>\n<li><p><strong>Method:</strong> <code>POST</code></p>\n</li>\n<li><p><strong>URL Params:</strong> None</p>\n</li>\n<li><p><strong>Headers:</strong></p>\n<ul>\n<li><code>Content-Type: application/json</code></li>\n</ul>\n</li>\n<li><p>jsonCopyEdit{ \"email\": \"<a href=\"mailto:worker@example.com\">worker@example.com</a>\", \"password\": \"securepassword\"}</p>\n</li>\n</ul>\n<h4 id=\"responses\"><strong>Responses</strong></h4>\n<p>✅ <strong>Success (201 Created)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Worker added successfully\",\n  \"worker\": {\n    \"_id\": \"65ab3f12e7890d00123abcd\",\n    \"email\": \"worker@example.com\",\n    \"password\": \"$2a$10$hashedpassword\"\n  }\n}\n\n</code></pre>\n<p>❌ <strong>Error Responses</strong></p>\n<ol>\n<li><strong>400 Bad Request (Missing Fields)</strong></li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Email and password are required.\"\n}\n\n</code></pre>\n<ol>\n<li><strong>400 Bad Request (Worker Already Exists)</strong></li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Worker already exists with this email.\"\n}\n\n</code></pre>\n<ol>\n<li><strong>500 Internal Server Error</strong></li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Error creating worker\",\n  \"error\": \"Detailed error message\"\n}\n\n</code></pre>\n<h4 id=\"authentication--authorization\"><strong>Authentication &amp; Authorization</strong></h4>\n<ul>\n<li><strong>Only Admin</strong> can create worker accounts.</li>\n</ul>\n","_postman_id":"65d3becf-bb0a-4b0a-b0e7-93965c6b1d47"}],"id":"cf86102c-4dee-49a4-997f-4f30663c81d7","_postman_id":"cf86102c-4dee-49a4-997f-4f30663c81d7","description":""}],"id":"e68a7ce7-bbd0-4b7c-89cc-ef685dec7696","description":"<p>The <strong>Admin Folder</strong> in the Postman documentation currently contains one API:</p>\n<ol>\n<li><p><strong>Assign Email &amp; Password to Worker</strong> (<code>POST /api/admin/workers</code>)  </p>\n<ul>\n<li><p>Allows the admin to create worker accounts by assigning an email and password.</p>\n</li>\n<li><p>The password is securely hashed before storing.</p>\n</li>\n<li><p>Returns a success response with worker details or error messages if the email already exists or if required fields are missing.</p>\n</li>\n</ul>\n</li>\n</ol>\n","_postman_id":"e68a7ce7-bbd0-4b7c-89cc-ef685dec7696"},{"name":"Worker","item":[{"name":"Get all orders Details","item":[{"name":"get-all-order-details","id":"6016cfbb-5fbb-49ee-89f7-4f0044ecb125","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://laundry-buddy-yysq.onrender.com/worker/getallorderdetails","urlObject":{"protocol":"https","path":["worker","getallorderdetails"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"6016cfbb-5fbb-49ee-89f7-4f0044ecb125"}],"id":"d2488ce3-4e26-4bee-8d85-c3395083684d","description":"<h3 id=\"get-worker-orders\"><strong>Get Worker Orders</strong></h3>\n<p><strong>Endpoint:</strong> <code>GET /api/worker/orders</code></p>\n<h3 id=\"description\"><strong>Description:</strong></h3>\n<p>Fetches all orders for the worker, including total orders, pending/completed counts, and user details. Orders are sorted from newest to oldest.</p>\n<p><strong>Headers:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"Authorization\": \"Bearer &lt;your_token&gt;\"\n}\n\n</code></pre>\n<p><strong>Response:</strong></p>\n<ul>\n<li><strong>Success (200 OK)</strong></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"totalOrders\": 15,\n  \"pendingOrders\": 5,\n  \"completedOrders\": 10,\n  \"orders\": [\n    {\n      \"OrderId\": \"65a123b45cd67890e123f456\",\n      \"userName\": \"John Doe\",\n      \"phoneNumber\": \"9876543210\",\n      \"bagNumber\": \"BG12345\",\n      \"numberOfItems\": 10,\n      \"status\": \"Pending\",\n      \"date\": \"12-03-2025\",\n      \"time\": \"10:30 AM\"\n    },\n    {\n      \"OrderId\": \"65b123c45de67890f123g456\",\n      \"userName\": \"Jane Smith\",\n      \"phoneNumber\": \"8765432109\",\n      \"bagNumber\": \"BG67890\",\n      \"numberOfItems\": 8,\n      \"status\": \"Completed\",\n      \"date\": \"10-03-2025\",\n      \"time\": \"02:15 PM\"\n    }\n  ]\n}\n\n</code></pre>\n<ul>\n<li><strong>Error (404 Not Found)</strong></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"No orders found\"\n}\n\n</code></pre>\n<ul>\n<li><strong>Error (500 Internal Server Error)</strong></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Failed to fetch orders\",\n  \"error\": \"Database connection error\"\n}\n\n</code></pre>\n","_postman_id":"d2488ce3-4e26-4bee-8d85-c3395083684d"},{"name":"Update Status","item":[{"name":"Update Order Status","id":"a20d9263-7a95-4be0-830c-c5f34f1693d5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"phoneNumber\":\"+919021557571\",\r\n    \"message\":\"Your order completed successfuly\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://laundry-buddy-yysq.onrender.com/worker/update-order-status/:orderId","urlObject":{"protocol":"https","path":["worker","update-order-status",":orderId"],"host":["laundry-buddy-yysq","onrender","com"],"query":[],"variable":[{"type":"any","value":"67d7e61065254b25d77e7268","key":"orderId"}]}},"response":[],"_postman_id":"a20d9263-7a95-4be0-830c-c5f34f1693d5"}],"id":"96895175-5042-4e30-846e-89ee099b5de7","description":"<h3 id=\"update-order-status\"><strong>Update Order Status</strong></h3>\n<p><strong>Endpoint:</strong> <code>PUT /api/worker/orders/:orderId</code></p>\n<p><strong>Description:</strong>  </p>\n<p>Updates the order status to <strong>Completed</strong> and sends an SMS notification to the user.</p>\n<p><strong>Headers:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"Authorization\": \"Bearer &lt;your_token&gt;\",\n  \"Content-Type\": \"application/json\"\n}\n\n</code></pre>\n<p><strong>Request Parameters:</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>orderId</td>\n<td>String</td>\n<td>Yes</td>\n<td>The ID of the order to update</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Request Body:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"phoneNumber\": \"9876543210\",\n  \"message\": \"Your laundry order has been completed. Thank you for using our service!\"\n}\n\n</code></pre>\n<p><strong>Response:</strong></p>\n<ul>\n<li><strong>Success (200 OK)</strong></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Order status updated to Completed and Notification Send\",\n  \"order\": {\n    \"_id\": \"65a123b45cd67890e123f456\",\n    \"status\": \"Completed\",\n    \"smsSent\": true\n  }\n}\n\n</code></pre>\n<ul>\n<li><strong>Error (404 Not Found)</strong></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"Order not found\"\n}\n\n</code></pre>\n<ul>\n<li><strong>Error (500 Internal Server Error)</strong></li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">jsonCopyEdit{\n  \"message\": \"An error occurred while updating the order status\",\n  \"error\": \"SMS service error or database issue\"\n}\n\n</code></pre>\n","_postman_id":"96895175-5042-4e30-846e-89ee099b5de7"}],"id":"e5e42674-4a22-49cf-91aa-03ce6060b10d","description":"<h3 id=\"worker-api---postman-documentation-summary\"><strong>Worker API - Postman Documentation Summary</strong></h3>\n<p>The <strong>Worker</strong> folder in the <strong>Laundry Management API Documentation</strong> contains two main sections:</p>\n<h4 id=\"1-orders\"><strong>1. Orders</strong></h4>\n<ul>\n<li><p><strong>Get All Orders for Worker</strong> (<code>GET /worker/orders</code>)  </p>\n<ul>\n<li><p>Fetches all orders assigned to workers, sorted by creation date.</p>\n</li>\n<li><p>Returns total orders, pending orders, completed orders, and order details.</p>\n</li>\n<li><p>Each order includes <code>OrderId</code>, <code>userName</code>, <code>phoneNumber</code>, <code>bagNumber</code>, <code>numberOfItems</code>, <code>status</code>, <code>date</code>, and <code>time</code>.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"2-notifications\"><strong>2. Notifications</strong></h4>\n<ul>\n<li><p><strong>Update Order Status &amp; Send Notification</strong> (<code>PUT /worker/orders/:orderId</code>)  </p>\n<ul>\n<li><p>Updates the status of an order to <strong>Completed</strong>.</p>\n</li>\n<li><p>Sends an SMS notification to the user using Twilio.</p>\n</li>\n<li><p>Requires <code>orderId</code> in the URL and <code>phoneNumber</code>, <code>message</code> in the request body.</p>\n</li>\n</ul>\n</li>\n</ul>\n","_postman_id":"e5e42674-4a22-49cf-91aa-03ce6060b10d"}]}