{"openapi":"3.0.0","info":{"title":"ILB Mart API Documentation","version":"2.0.0","description":"Complete API documentation for ILB Mart - Pincode-based e-commerce platform","contact":{"name":"ILB Mart Team","email":"support@ilbmart.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"http://localhost:3005","description":"Development server"},{"url":"https://api.ilbmart.com","description":"Production server"}],"components":{"securitySchemes":{"userAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"User authentication token"},"adminAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Admin authentication token"},"sellerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Seller authentication token"},"deliveryAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Delivery Boy authentication token"},"restaurantAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Restaurant/Food Seller authentication token"}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","example":"Error message"}}},"Success":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object"}}},"User":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"},"mobile":{"type":"string"},"avatar":{"type":"string"},"default_pincode":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"Admin":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Admin User"},"email":{"type":"string","example":"admin@ilbmart.com"},"mobile":{"type":"string","example":"9876543210"},"username":{"type":"string","example":"admin"},"role_id":{"type":"integer","example":1},"status":{"type":"integer","example":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Role":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Super Admin"},"description":{"type":"string","example":"Full system access"},"permissions":{"type":"array","items":{"type":"string"},"example":["dashboard","users","orders","finance"]},"status":{"type":"integer","example":1},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Seller":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Seller unique identifier"},"name":{"type":"string","example":"Fresh Foods Store","description":"Seller name","maxLength":255},"email":{"type":"string","example":"seller@example.com","description":"Seller email address","maxLength":255},"mobile":{"type":"string","example":"9876543210","nullable":true,"description":"Seller mobile number","maxLength":15},"address":{"type":"string","example":"123 Market Street","nullable":true,"description":"Seller address"},"pincode":{"type":"string","example":"400001","nullable":true,"description":"Seller pincode","maxLength":10},"status":{"type":"integer","example":1,"description":"Seller status (0=inactive, 1=active)","enum":[0,1]},"image":{"type":"string","example":"https://example.com/seller.jpg","nullable":true,"description":"Seller profile image URL","maxLength":250},"created_at":{"type":"string","format":"date-time","description":"Account creation timestamp","example":"2024-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time"},"country_id":{"type":"integer","description":"Country ID","example":1},"state_id":{"type":"integer","description":"State ID","example":1},"city_id":{"type":"integer","description":"City ID","example":1},"password":{"type":"string","description":"Encrypted password","maxLength":255,"example":"encrypted_password_hash"},"api_token":{"type":"string","nullable":true,"description":"Current API token","maxLength":255,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"update_at":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-01-01T00:00:00.000Z"}},"additionalProperties":false},"Address":{"type":"object","properties":{"id":{"type":"integer","example":1},"seller_id":{"type":"integer","example":1},"country_id":{"type":"integer","example":1},"state_id":{"type":"integer","example":1},"city_id":{"type":"integer","example":1},"pincode":{"type":"string","example":"400001"},"local_area":{"type":"string","example":"Andheri West"},"landmark":{"type":"string","example":"Near Metro Station"},"address":{"type":"string","example":"123 Market Street"},"type":{"type":"string","enum":["billing","shipping"],"example":"shipping"},"is_primary":{"type":"boolean","example":true},"is_active":{"type":"boolean","example":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Product":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Product unique identifier"},"name":{"type":"string","example":"Fresh Tomatoes","description":"Product name","maxLength":150},"description":{"type":"string","example":"Fresh organic tomatoes","nullable":true,"description":"Product description"},"base_price":{"type":"number","example":100},"sale_price":{"type":"number","example":80},"discount":{"type":"number","example":20},"qty":{"type":"integer","example":50,"nullable":true,"description":"Available quantity"},"qty_unit":{"type":"string","example":"kg"},"category_id":{"type":"integer","example":1},"brand_id":{"type":"integer","example":1,"description":"Brand ID"},"images":{"type":"array","items":{"type":"string"},"example":["https://example.com/image1.jpg"]},"status":{"type":"integer","example":1,"description":"Product status (0=inactive, 1=active)","enum":[0,1]},"seller_id":{"type":"integer","example":1},"pincode_id":{"type":"integer","example":1},"discount_type":{"type":"integer","example":1},"meta_title":{"type":"string","example":"Fresh Tomatoes - Organic"},"meta_keyword":{"type":"string","example":"tomatoes, fresh, organic"},"meta_desc":{"type":"string","example":"Fresh organic tomatoes from local farms"},"mfd_date":{"type":"string","format":"date","example":"2024-01-01"},"exp_date":{"type":"string","format":"date","example":"2024-01-15"},"new_lounch":{"type":"boolean","example":false},"is_popular":{"type":"boolean","example":true},"is_trending":{"type":"integer","example":1,"description":"Show in trending lists (0=no, 1=yes)","enum":[0,1]},"is_price_saver":{"type":"integer","example":1,"description":"Price-saver badge (0=no, 1=yes)","enum":[0,1]},"created_at":{"type":"string","format":"date-time","nullable":true,"description":"Creation timestamp","example":"2024-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","nullable":true,"description":"Last update timestamp","example":"2024-01-01T00:00:00.000Z"},"cat_id":{"type":"integer","description":"Category ID","example":1},"slug":{"type":"string","nullable":true,"description":"URL-friendly product slug","maxLength":256,"example":"fresh-tomatoes"},"act_price":{"type":"integer","description":"Actual price in paise/cents","example":10000},"price":{"type":"integer","description":"Selling price in paise/cents","example":8000},"product_code":{"type":"string","nullable":true,"description":"Product code/SKU","maxLength":50,"example":"TOM001"},"weight":{"type":"string","description":"Product weight/size","maxLength":50,"example":"1kg"},"image":{"type":"string","nullable":true,"description":"Product image URL","maxLength":250,"example":"https://example.com/tomato.jpg"},"fssi_code":{"type":"string","description":"FSSAI code","maxLength":25,"example":"12345678901234"},"sub_cat_id":{"type":"integer","nullable":true,"description":"Sub-category ID","example":null}},"additionalProperties":false},"Category":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Category unique identifier"},"name":{"type":"string","example":"Vegetables","description":"Category name","maxLength":255},"description":{"type":"string","example":"Fresh vegetables category","nullable":true,"description":"Category description"},"parent_id":{"type":"integer","example":null,"nullable":true,"description":"Parent category ID (null for main categories)"},"image":{"type":"string","example":"https://example.com/category.jpg","nullable":true,"description":"Category thumbnail image URL","maxLength":255},"cat_id":{"type":"integer","nullable":true,"description":"Legacy category ID","example":null},"slug":{"type":"string","description":"URL-friendly category slug","maxLength":255,"example":"vegetables"},"show_home":{"type":"integer","description":"Show on homepage (0=no, 1=yes)","enum":[0,1],"example":1},"display_order":{"type":"integer","description":"Display order for sorting","default":0,"example":1},"status":{"type":"integer","description":"Category status (0=inactive, 1=active)","enum":[0,1],"example":1},"meta_title":{"type":"string","nullable":true,"description":"SEO meta title","maxLength":150,"example":"Fresh Vegetables - ILB Mart"},"meta_keyword":{"type":"string","nullable":true,"description":"SEO meta keywords","example":"vegetables, fresh, organic"},"meta_desc":{"type":"string","nullable":true,"description":"SEO meta description","example":"Fresh organic vegetables delivered to your door"},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp","example":"2024-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-01-01T00:00:00.000Z"}},"additionalProperties":false},"Order":{"type":"object","properties":{"id":{"type":"integer","example":1,"description":"Order unique identifier"},"order_id":{"type":"string","example":"ORD123456789","description":"Order ID string","maxLength":50},"customer_id":{"type":"integer","example":1,"description":"Customer ID"},"seller_id":{"type":"integer","example":1},"grand_total":{"type":"number","example":255,"format":"decimal","description":"Final total amount"},"order_status":{"type":"string","enum":["pending","processing","shipped","delivered","cancelled"],"example":"pending","description":"Current order status","maxLength":50},"payment_status":{"type":"string","enum":["pending","paid","failed"],"example":"pending","description":"Payment status","maxLength":50},"delivery_address":{"type":"string","example":"123 Customer Street"},"delivery_pincode":{"type":"string","example":"400001"},"tracking_number":{"type":"string","example":"TRK123456789"},"created_at":{"type":"string","format":"date-time","description":"Order creation timestamp","example":"2024-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-01-01T00:00:00.000Z"},"pincode_id":{"type":"integer","description":"Pincode ID","example":1},"total_item":{"type":"integer","description":"Total number of items","example":5},"total_amount":{"type":"number","format":"decimal","description":"Total amount before discounts","example":250},"discount_amount":{"type":"number","format":"decimal","description":"Discount amount applied","default":0,"example":25},"other_charges":{"type":"number","format":"decimal","description":"Other charges (delivery, etc.)","default":0,"example":30},"payment_type":{"type":"string","description":"Payment method","maxLength":50,"enum":["cod","online","wallet"],"example":"cod"},"status":{"type":"integer","description":"Order status (0=inactive, 1=active)","enum":[0,1],"example":1}},"additionalProperties":false},"Offer":{"type":"object","properties":{"id":{"type":"integer","example":1},"seller_id":{"type":"integer","example":1},"title":{"type":"string","example":"Summer Sale"},"description":{"type":"string","example":"Get 20% off on all summer products"},"discount_type":{"type":"string","enum":["percentage","fixed"],"example":"percentage"},"discount_value":{"type":"number","example":20},"min_order_amount":{"type":"number","example":500},"max_discount":{"type":"number","example":200},"start_date":{"type":"string","format":"date","example":"2024-06-01"},"end_date":{"type":"string","format":"date","example":"2024-08-31"},"status":{"type":"string","enum":["active","inactive"],"example":"active"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"SellerBankAccount":{"type":"object","properties":{"id":{"type":"integer"},"account_holder_name":{"type":"string"},"account_number":{"type":"string","example":"xxxx1234"},"ifsc_code":{"type":"string"},"bank_name":{"type":"string"},"branch_name":{"type":"string"},"is_primary":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"SellerGstDetail":{"type":"object","properties":{"id":{"type":"integer"},"gst_number":{"type":"string"},"business_name":{"type":"string"},"business_address":{"type":"string"},"pan_number":{"type":"string"},"is_verified":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"SellerWallet":{"type":"object","properties":{"balance":{"type":"number"},"pending_balance":{"type":"number"},"total_earnings":{"type":"number"},"total_payouts":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"SellerTransaction":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["credit","debit"]},"amount":{"type":"number"},"description":{"type":"string"},"status":{"type":"string"},"reference_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"SellerOrderItem":{"type":"object","properties":{"id":{"type":"integer"},"order_id":{"type":"integer"},"product_id":{"type":"integer"},"qty":{"type":"integer"},"price":{"type":"number"},"status":{"type":"string"}}},"SellerNotification":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"message":{"type":"string"},"type":{"type":"string"},"is_read":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"DeliveryBoy":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"mobile":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]}}},"PincodeServiceability":{"type":"object","properties":{"pincode":{"type":"string"},"delivery_available":{"type":"boolean"}}},"SellerApproval":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Fresh Foods Ltd"},"email":{"type":"string","example":"seller@example.com"},"mobile":{"type":"string","example":"9876543210"},"address":{"type":"string","example":"123 Market Street"},"pincode":{"type":"string","example":"400001"},"status":{"type":"string","enum":["pending","approved","rejected"],"example":"pending"},"submitted_at":{"type":"string","format":"date-time"},"documents":{"type":"object","properties":{"gst_certificate":{"type":"string"},"pan_card":{"type":"string"},"bank_details":{"type":"string"}}}}},"ProductApproval":{"type":"object","properties":{"id":{"type":"integer","example":1},"seller_id":{"type":"integer","example":1},"name":{"type":"string","example":"Fresh Tomatoes"},"description":{"type":"string","example":"Fresh organic tomatoes"},"base_price":{"type":"number","example":100},"sale_price":{"type":"number","example":80},"category_id":{"type":"integer","example":1},"brand_id":{"type":"integer","example":1},"status":{"type":"string","enum":["pending","approved","rejected"],"example":"pending"},"submitted_at":{"type":"string","format":"date-time"},"images":{"type":"array","items":{"type":"string"},"example":["https://example.com/image1.jpg"]}}},"Pagination":{"type":"object","properties":{"current_page":{"type":"integer","example":1},"per_page":{"type":"integer","example":10},"total":{"type":"integer","example":100},"total_pages":{"type":"integer","example":10},"has_next":{"type":"boolean","example":true},"has_prev":{"type":"boolean","example":false}}},"SellerStats":{"type":"object","properties":{"total_pending":{"type":"integer","example":25},"total_approved":{"type":"integer","example":150},"total_rejected":{"type":"integer","example":10},"approval_rate":{"type":"number","example":88.2}}},"ProductStats":{"type":"object","properties":{"total_pending":{"type":"integer","example":45},"total_approved":{"type":"integer","example":320},"total_rejected":{"type":"integer","example":15},"approval_rate":{"type":"number","example":91.4}}},"RecentApproval":{"type":"object","properties":{"id":{"type":"integer","example":1},"type":{"type":"string","enum":["seller","product"],"example":"seller"},"name":{"type":"string","example":"Fresh Foods Ltd"},"action":{"type":"string","enum":["approved","rejected"],"example":"approved"},"admin_name":{"type":"string","example":"Admin User"},"timestamp":{"type":"string","format":"date-time"}}},"UserLoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","description":"User email address","maxLength":255,"example":"user@example.com"},"password":{"type":"string","description":"User password","minLength":1,"example":"password123"}},"additionalProperties":false},"UserRegisterRequest":{"type":"object","required":["name","email","password","mobile"],"properties":{"name":{"type":"string","description":"Full name of the user","minLength":2,"maxLength":255,"example":"John Doe"},"email":{"type":"string","format":"email","description":"Email address","maxLength":255,"example":"john@example.com"},"password":{"type":"string","description":"Password (minimum 6 characters)","minLength":6,"maxLength":255,"example":"password123"},"mobile":{"type":"string","description":"Mobile number (10-15 digits)","pattern":"^[0-9]{10,15}$","example":"9876543210"}},"additionalProperties":false},"SellerLoginRequest":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","description":"Seller email address","maxLength":255,"example":"seller@example.com"},"password":{"type":"string","description":"Seller password","minLength":1,"example":"password123"}},"additionalProperties":false},"SellerRegisterRequest":{"type":"object","required":["name","email","password","mobile","business_name","gst_number"],"properties":{"name":{"type":"string","description":"Full name of the seller","minLength":2,"maxLength":255,"example":"Jane Smith"},"email":{"type":"string","format":"email","description":"Email address","maxLength":255,"example":"jane@freshfoods.com"},"password":{"type":"string","description":"Password (minimum 6 characters)","minLength":6,"maxLength":255,"example":"password123"},"mobile":{"type":"string","description":"Mobile number (10-15 digits)","pattern":"^[0-9]{10,15}$","example":"9876543210"},"business_name":{"type":"string","description":"Business name","minLength":2,"maxLength":255,"example":"Fresh Foods Ltd"},"gst_number":{"type":"string","description":"GST registration number","minLength":15,"maxLength":15,"pattern":"^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$","example":"27AABCU9603R1ZX"}},"additionalProperties":false},"SendOTPRequest":{"type":"object","required":["mobile"],"properties":{"mobile":{"type":"string","description":"Mobile number to send OTP (10-15 digits)","pattern":"^[0-9]{10,15}$","example":"9876543210"}},"additionalProperties":false},"VerifyOTPRequest":{"type":"object","required":["mobile","otp"],"properties":{"mobile":{"type":"string","description":"Mobile number (10-15 digits)","pattern":"^[0-9]{10,15}$","example":"9876543210"},"otp":{"type":"string","description":"6-digit OTP","pattern":"^[0-9]{6}$","example":"123456"}},"additionalProperties":false},"UserData":{"type":"object","properties":{"id":{"type":"integer","description":"User unique identifier","example":1},"name":{"type":"string","description":"User full name","example":"John Doe"},"email":{"type":"string","description":"User email address","example":"john@example.com"},"mobile":{"type":"string","description":"User mobile number","example":"9876543210"},"pincode":{"type":"string","nullable":true,"description":"User default pincode","example":"400001"},"role":{"type":"string","description":"User role","example":"user"}},"additionalProperties":false},"SellerData":{"type":"object","properties":{"id":{"type":"integer","description":"Seller unique identifier","example":1},"name":{"type":"string","description":"Seller name","example":"Jane Smith"},"email":{"type":"string","description":"Seller email address","example":"jane@freshfoods.com"},"mobile":{"type":"string","description":"Seller mobile number","example":"9876543210"},"address":{"type":"string","nullable":true,"description":"Seller address","example":"123 Market Street"},"pincode":{"type":"string","nullable":true,"description":"Seller pincode","example":"400001"},"role":{"type":"string","description":"User role","example":"seller"}},"additionalProperties":false},"AuthResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Login successful"},"data":{"type":"object","properties":{"token":{"type":"string","description":"JWT authentication token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"user":{"oneOf":[{"$ref":"#/components/schemas/UserData"},{"$ref":"#/components/schemas/SellerData"}]}},"additionalProperties":false}},"additionalProperties":false},"OTPResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"OTP sent successfully"},"data":{"type":"object","properties":{"mobile":{"type":"string","description":"Mobile number OTP was sent to","example":"9876543210"},"otp":{"type":"string","description":"OTP code (only shown in development mode)","nullable":true,"example":"123456"}},"additionalProperties":false}},"additionalProperties":false},"AdminLoginRequest":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string","description":"Admin username, email, or mobile number","example":"admin@ilbmart.com"},"password":{"type":"string","description":"Admin password","example":"admin123"}},"additionalProperties":false},"AdminLoginResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Login successful"},"data":{"type":"object","properties":{"id":{"type":"integer","description":"Admin ID","example":1},"name":{"type":"string","description":"Admin full name","example":"Admin User"},"email":{"type":"string","description":"Admin email address","example":"admin@ilbmart.com"},"mobile":{"type":"string","description":"Admin mobile number","example":"9876543210"},"username":{"type":"string","description":"Admin username","example":"admin"},"role_id":{"type":"integer","description":"Admin role ID","example":1},"userType":{"type":"string","description":"User type identifier","example":"admin"},"apiToken":{"type":"string","description":"JWT authentication token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}},"additionalProperties":false}},"additionalProperties":false},"AdminRegisterRequest":{"type":"object","required":["name","username","password","mobile","email"],"properties":{"name":{"type":"string","description":"Full name of the admin","minLength":2,"maxLength":255,"example":"John Doe"},"username":{"type":"string","description":"Unique username for the admin","minLength":3,"maxLength":100,"example":"johndoe"},"password":{"type":"string","description":"Password (minimum 6 characters)","minLength":6,"maxLength":255,"example":"password123"},"mobile":{"type":"string","description":"Mobile number (10-15 digits)","pattern":"^[0-9]{10,15}$","example":"9876543210"},"email":{"type":"string","format":"email","description":"Email address","maxLength":255,"example":"john@ilbmart.com"}},"additionalProperties":false},"AdminRegisterResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Admin registered successfully"},"data":{"type":"object","properties":{"id":{"type":"integer","description":"Generated admin ID","example":1},"name":{"type":"string","description":"Admin full name","example":"John Doe"},"username":{"type":"string","description":"Admin username","example":"johndoe"},"mobile":{"type":"string","description":"Admin mobile number","example":"9876543210"},"email":{"type":"string","description":"Admin email address","example":"john@ilbmart.com"}},"additionalProperties":false}},"additionalProperties":false},"AdminProfile":{"type":"object","properties":{"id":{"type":"integer","description":"Admin unique identifier","example":1},"name":{"type":"string","description":"Admin full name","maxLength":255,"example":"Admin User"},"email":{"type":"string","format":"email","description":"Admin email address","maxLength":255,"example":"admin@ilbmart.com"},"mobile":{"type":"string","description":"Admin mobile number","maxLength":15,"example":"9876543210"},"username":{"type":"string","description":"Admin username","maxLength":100,"example":"admin"},"role_id":{"type":"integer","description":"Admin role identifier","example":1},"status":{"type":"integer","description":"Admin status (0=inactive, 1=active)","enum":[0,1],"example":1},"api_token":{"type":"string","description":"Current API token (if logged in)","nullable":true,"maxLength":255,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"created_at":{"type":"string","format":"date-time","description":"Account creation timestamp","example":"2024-01-01T00:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-01-01T00:00:00.000Z"}},"additionalProperties":false},"UpdateProfileRequest":{"type":"object","properties":{"name":{"type":"string","description":"Full name","minLength":2,"maxLength":255,"example":"Updated Admin Name"},"email":{"type":"string","format":"email","description":"Email address","maxLength":255,"example":"updated@ilbmart.com"},"mobile":{"type":"string","description":"Mobile number","pattern":"^[0-9]{10,15}$","example":"9876543210"},"password":{"type":"string","description":"New password (optional)","minLength":6,"maxLength":255,"example":"newpassword123"}},"additionalProperties":false},"ChangePasswordRequest":{"type":"object","required":["currentPassword","newPassword"],"properties":{"currentPassword":{"type":"string","description":"Current password","minLength":1,"example":"oldpassword123"},"newPassword":{"type":"string","description":"New password (minimum 6 characters)","minLength":6,"maxLength":255,"example":"newpassword123"}},"additionalProperties":false},"ForgotPasswordRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"Admin email address","maxLength":255,"example":"admin@ilbmart.com"}},"additionalProperties":false},"ResetPasswordRequest":{"type":"object","required":["resetToken","newPassword"],"properties":{"resetToken":{"type":"string","description":"Password reset token received via email","minLength":1,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"newPassword":{"type":"string","description":"New password (minimum 6 characters)","minLength":6,"maxLength":255,"example":"newpassword123"}},"additionalProperties":false},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string","description":"Error message","example":"Invalid credentials"}},"additionalProperties":false},"SuccessResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Success message","example":"Operation successful"},"data":{"type":"object","description":"Response data (varies by endpoint)","additionalProperties":true}},"additionalProperties":false},"CreateCategoryRequest":{"type":"object","required":["name","slug"],"properties":{"parent_id":{"type":"integer","nullable":true,"description":"Parent category ID (null for main categories)","example":null},"cat_id":{"type":"integer","nullable":true,"description":"Legacy category ID","example":null},"name":{"type":"string","description":"Category name","minLength":1,"maxLength":255,"example":"Fruits"},"slug":{"type":"string","description":"URL-friendly category slug","minLength":1,"maxLength":255,"example":"fruits"},"description":{"type":"string","nullable":true,"description":"Category description","example":"Fresh fruits category"},"show_home":{"type":"integer","description":"Show on homepage (0=no, 1=yes)","enum":[0,1],"default":0,"example":1},"image":{"type":"string","nullable":true,"description":"Category thumbnail image URL","maxLength":255,"example":"https://example.com/fruits.jpg"},"display_order":{"type":"integer","description":"Display order for sorting","default":0,"example":1},"status":{"type":"integer","description":"Category status (0=inactive, 1=active)","enum":[0,1],"default":1,"example":1},"meta_title":{"type":"string","nullable":true,"description":"SEO meta title","maxLength":150,"example":"Fresh Fruits - ILB Mart"},"meta_keyword":{"type":"string","nullable":true,"description":"SEO meta keywords","example":"fruits, fresh, organic"},"meta_desc":{"type":"string","nullable":true,"description":"SEO meta description","example":"Fresh organic fruits delivered to your door"}},"additionalProperties":false},"CreateProductRequest":{"type":"object","required":["name","cat_id","brand_id","act_price","price","weight","fssi_code"],"properties":{"name":{"type":"string","description":"Product name","minLength":1,"maxLength":150,"example":"Fresh Apples"},"cat_id":{"type":"integer","description":"Category ID","minimum":1,"example":2},"brand_id":{"type":"integer","description":"Brand ID","minimum":1,"example":1},"slug":{"type":"string","nullable":true,"description":"URL-friendly product slug","maxLength":256,"example":"fresh-apples"},"act_price":{"type":"integer","description":"Actual price in paise/cents","minimum":0,"example":15000},"price":{"type":"integer","description":"Selling price in paise/cents","minimum":0,"example":12000},"qty":{"type":"integer","nullable":true,"description":"Available quantity","minimum":0,"example":100},"product_code":{"type":"string","nullable":true,"description":"Product code/SKU","maxLength":50,"example":"APP001"},"weight":{"type":"string","description":"Product weight/size","minLength":1,"maxLength":50,"example":"1kg"},"image":{"type":"string","nullable":true,"description":"Product image URL","maxLength":250,"example":"https://example.com/apple.jpg"},"description":{"type":"string","nullable":true,"description":"Product description","example":"Fresh red apples"},"status":{"type":"integer","description":"Product status (0=inactive, 1=active)","enum":[0,1],"default":1,"example":1},"fssi_code":{"type":"string","description":"FSSAI code","minLength":1,"maxLength":25,"example":"12345678901234"},"is_trending":{"type":"integer","description":"Show in trending lists (0=no, 1=yes)","enum":[0,1],"default":0,"example":1},"is_price_saver":{"type":"integer","description":"Price-saver badge (0=no, 1=yes)","enum":[0,1],"default":0,"example":1},"sub_cat_id":{"type":"integer","nullable":true,"description":"Sub-category ID","example":null}},"additionalProperties":false},"Customer":{"type":"object","properties":{"id":{"type":"integer","description":"Customer unique identifier","example":1},"name":{"type":"string","nullable":true,"description":"Customer full name","maxLength":255,"example":"John Customer"},"email":{"type":"string","nullable":true,"description":"Customer email address","maxLength":255,"example":"customer@example.com"},"mobile":{"type":"string","nullable":true,"description":"Customer mobile number","maxLength":15,"example":"9876543210"},"country_id":{"type":"integer","nullable":true,"description":"Country ID","example":1},"state_id":{"type":"integer","nullable":true,"description":"State ID","example":1},"city_id":{"type":"integer","nullable":true,"description":"City ID","example":1},"pincode":{"type":"string","nullable":true,"description":"Customer pincode","maxLength":10,"example":"400001"},"address":{"type":"string","nullable":true,"description":"Customer address","example":"123 Customer Street, Mumbai"},"password":{"type":"string","nullable":true,"description":"Encrypted password","maxLength":255,"example":"encrypted_password_hash"},"status":{"type":"integer","description":"Customer status (0=inactive, 1=active)","enum":[0,1],"example":1},"api_token":{"type":"string","nullable":true,"description":"Current API token","maxLength":255,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."},"image":{"type":"string","nullable":true,"description":"Customer profile image URL","maxLength":250,"example":"https://example.com/customer.jpg"},"created_at":{"type":"string","format":"date-time","description":"Account creation timestamp","example":"2024-01-01T00:00:00.000Z"},"update_at":{"type":"string","format":"date-time","description":"Last update timestamp","example":"2024-01-01T00:00:00.000Z"}},"additionalProperties":false},"PaginationResponse":{"type":"object","properties":{"totalRecords":{"type":"integer","description":"Total number of records","example":100},"totalPages":{"type":"integer","description":"Total number of pages","example":10},"currentPage":{"type":"integer","description":"Current page number","example":1},"pageSize":{"type":"integer","description":"Number of items per page","example":10}},"additionalProperties":false},"ListResponse":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object"},"description":"Array of data items"},"pagination":{"$ref":"#/components/schemas/PaginationResponse"}},"additionalProperties":false},"DeliveryRegistration":{"type":"object","required":["name","mobile","password","driving_license","vehicle_registration","id_proof"],"properties":{"name":{"type":"string","description":"Full name of the delivery partner"},"mobile":{"type":"string","description":"Unique mobile number"},"password":{"type":"string","format":"password"},"service_type":{"type":"string","enum":["FOOD","GROCERY","BOTH"],"default":"BOTH"},"vehicle_details":{"type":"object","properties":{"type":{"type":"string","example":"bike"},"model":{"type":"string","example":"Honda Activa"},"number":{"type":"string","example":"MH12AB1234"}}},"profile_image":{"type":"string","format":"binary"},"driving_license":{"type":"string","format":"binary"},"vehicle_registration":{"type":"string","format":"binary"},"id_proof":{"type":"string","format":"binary"}}},"FoodRestaurant":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","SUSPENDED"]}}},"FoodOrder":{"type":"object","properties":{"id":{"type":"integer"},"order_status":{"type":"string"},"final_amount":{"type":"number"},"customer_name":{"type":"string"}}}}},"tags":[{"name":"Authentication","description":"User, Admin, and Seller authentication endpoints"},{"name":"Public","description":"Public endpoints (no authentication required)"},{"name":"User","description":"User-specific endpoints (requires user authentication)"},{"name":"Admin","description":"Admin-specific endpoints (requires admin authentication)"},{"name":"Seller","description":"Seller-specific endpoints (requires seller authentication)"},{"name":"Health","description":"Health check and server status endpoints"},{"name":"Admin Approvals","description":"Admin endpoints for managing seller and product approvals"},{"name":"Admin Bulk Upload","description":"Admin endpoints for bulk uploading sellers and products via CSV"},{"name":"Delivery Partner","description":"Delivery partner authentication, tasks, and profile management"},{"name":"Food Discovery","description":"Home screen, restaurant discovery, and search"},{"name":"Food Cart","description":"Cart management (requires user authentication)"},{"name":"Food Orders","description":"Order placement, tracking, and management (requires user authentication)"},{"name":"Restaurant (Food Seller)","description":"Restaurant authentication, profile management, menu handling, and order processing."}],"paths":{"/user/login":{"post":{"tags":["User Authentication"],"summary":"User login with email and password","description":"Authenticate user with email and password","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginRequest"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid credentials or inactive account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/user/register":{"post":{"tags":["User Authentication"],"summary":"User registration","description":"Register a new user account","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRegisterRequest"}}}},"responses":{"201":{"description":"Registration successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Validation error or user already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/seller/login":{"post":{"tags":["Seller Authentication"],"summary":"Seller login","description":"Authenticate seller with email and password","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerLoginRequest"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid credentials or inactive account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/seller/register":{"post":{"tags":["Seller Authentication"],"summary":"Seller registration","description":"Register a new seller account","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerRegisterRequest"}}}},"responses":{"201":{"description":"Registration successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Seller registered successfully"}},"additionalProperties":false}}}},"400":{"description":"Validation error or seller already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/login":{"post":{"tags":["Admin Authentication"],"summary":"Admin login","description":"Authenticate admin user with username/email/mobile and password","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string","description":"Admin username, email, or mobile number","example":"admin@ilbmart.com"},"password":{"type":"string","description":"Admin password","example":"admin123"}},"additionalProperties":false,"$ref":"#/components/schemas/AdminLoginRequest"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Login successful"},"data":{"type":"object","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Admin User"},"email":{"type":"string","example":"admin@ilbmart.com"},"mobile":{"type":"string","example":"9876543210"},"username":{"type":"string","example":"admin"},"role_id":{"type":"integer","example":1},"userType":{"type":"string","example":"admin"},"apiToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}},"additionalProperties":false}},"additionalProperties":false,"$ref":"#/components/schemas/AdminLoginResponse"}}}},"400":{"description":"Bad request - missing required fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/roles":{"get":{"summary":"Get all admin roles","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"List of all admin roles","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}}}}}}},"post":{"summary":"Create new admin role","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","permissions"],"properties":{"name":{"type":"string","example":"Super Admin"},"description":{"type":"string","example":"Full system access"},"permissions":{"type":"array","items":{"type":"string"},"example":["dashboard","users","orders","finance"]}}}}}},"responses":{"201":{"description":"Role created successfully"}}}},"/admin/dashboard/analytics":{"get":{"summary":"Get advanced dashboard analytics","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"period","schema":{"type":"string","enum":["today","week","month","year"]},"description":"Analytics period"}],"responses":{"200":{"description":"Advanced analytics data"}}}},"/admin/orders/pending":{"get":{"summary":"Get pending orders","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"limit","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"List of pending orders"}}}},"/admin/orders/{id}/status":{"put":{"summary":"Update order status","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["pending","processing","shipped","delivered","cancelled"]},"tracking_number":{"type":"string"}}}}}},"responses":{"200":{"description":"Order status updated successfully"}}}},"/admin/finance/overview":{"get":{"summary":"Get financial overview","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"Financial overview data"}}}},"/admin/settings":{"get":{"summary":"Get all system settings","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"System settings"}}},"put":{"summary":"Update system settings","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_name":{"type":"string"},"site_description":{"type":"string"},"commission_rate":{"type":"number"},"delivery_charge":{"type":"number"}}}}}},"responses":{"200":{"description":"Settings updated successfully"}}}},"/admin/notifications":{"get":{"summary":"Get admin notifications","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"limit","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"List of notifications"}}}},"/admin/notifications/send":{"post":{"summary":"Send notification to users","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","message","type"],"properties":{"title":{"type":"string"},"message":{"type":"string"},"type":{"type":"string","enum":["all","customers","sellers","admins"]}}}}}},"responses":{"200":{"description":"Notification sent successfully"}}}},"/admin/system/health":{"get":{"summary":"Get system health status","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"System health information"}}}},"/admin/reports/sales":{"get":{"summary":"Generate sales report","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"start_date","schema":{"type":"string","format":"date"}},{"in":"query","name":"end_date","schema":{"type":"string","format":"date"}},{"in":"query","name":"format","schema":{"type":"string","enum":["json","csv","pdf"],"default":"json"}}],"responses":{"200":{"description":"Sales report data"}}}},"/admin/inventory/overview":{"get":{"summary":"Get inventory overview","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"Inventory overview data"}}}},"/admin/inventory/bulk-update":{"post":{"summary":"Bulk update inventory","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["updates"],"properties":{"updates":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"integer"},"qty":{"type":"integer"}}}}}}}}},"responses":{"200":{"description":"Inventory updated successfully"}}}},"/admin/customers/analytics":{"get":{"summary":"Get customer analytics","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"period","schema":{"type":"string","enum":["week","month","year"]},"description":"Analytics period"}],"responses":{"200":{"description":"Customer analytics data"}}}},"/admin/customers/{id}/orders":{"get":{"summary":"Get customer orders","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"limit","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Customer orders"}}}},"/admin/sellers/analytics":{"get":{"summary":"Get seller analytics","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"period","schema":{"type":"string","enum":["week","month","year"]},"description":"Analytics period"}],"responses":{"200":{"description":"Seller analytics data"}}}},"/admin/sellers/approval-requests":{"get":{"summary":"Get seller approval requests","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","default":1}},{"in":"query","name":"limit","schema":{"type":"integer","default":10}}],"responses":{"200":{"description":"Seller approval requests"}}}},"/admin/sellers/{id}/approve":{"put":{"summary":"Approve seller","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Seller approved successfully"}}}},"/admin/sellers/{id}/reject":{"put":{"summary":"Reject seller","tags":["Admin"],"security":[{"adminAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["reason"],"properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Seller rejected successfully"}}}},"/admin/cms/pages":{"get":{"summary":"Get CMS pages","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"List of CMS pages"}}},"post":{"summary":"Create CMS page","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","content","slug"],"properties":{"title":{"type":"string"},"content":{"type":"string"},"slug":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"status":{"type":"integer","enum":[0,1]}}}}}},"responses":{"201":{"description":"CMS page created successfully"}}}},"/admin/cms/banners":{"get":{"summary":"Get banners","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"List of banners"}}},"post":{"summary":"Create banner","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","image_url"],"properties":{"title":{"type":"string"},"image_url":{"type":"string"},"link_url":{"type":"string"},"sort_order":{"type":"integer"},"status":{"type":"integer","enum":[0,1]}}}}}},"responses":{"201":{"description":"Banner created successfully"}}}},"/admin/cms/faqs":{"get":{"summary":"Get FAQs","tags":["Admin"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"List of FAQs"}}},"post":{"summary":"Create FAQ","tags":["Admin"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question","answer"],"properties":{"question":{"type":"string"},"answer":{"type":"string"},"category":{"type":"string"},"sort_order":{"type":"integer"},"status":{"type":"integer","enum":[0,1]}}}}}},"responses":{"201":{"description":"FAQ created successfully"}}}},"/admin/register":{"post":{"tags":["Admin Authentication"],"summary":"Register new admin","description":"Create a new admin account","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRegisterRequest"}}}},"responses":{"201":{"description":"Admin registered successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRegisterResponse"}}}},"400":{"description":"Bad request - validation error or admin already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict - admin already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/profile":{"get":{"tags":["Admin Profile"],"summary":"Get admin profile","description":"Retrieve current admin's profile information","security":[{"adminAuth":[]}],"responses":{"200":{"description":"Profile retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/AdminProfile"}}}}}},"401":{"description":"Unauthorized - invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"tags":["Admin Profile"],"summary":"Update admin profile","description":"Update current admin's profile information","security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/change-password":{"patch":{"tags":["Admin Profile"],"summary":"Change admin password","description":"Change current admin's password","security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Password changed successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request - validation error or incorrect current password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Admin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/forgot-password":{"post":{"tags":["Admin Authentication"],"summary":"Request password reset","description":"Send password reset link to admin's email","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}}},"responses":{"200":{"description":"Password reset link sent successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Password reset link sent to your email"},"data":{"type":"object","properties":{"message":{"type":"string","example":"Check your email for password reset instructions"},"emailSent":{"type":"boolean","example":true}}}}}}}},"400":{"description":"Bad request - email required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Admin not found with this email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/reset-password":{"post":{"tags":["Admin Authentication"],"summary":"Reset password","description":"Reset admin password using reset token","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}}},"responses":{"200":{"description":"Password reset successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"400":{"description":"Bad request - invalid or expired reset token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/logout":{"post":{"tags":["Admin Authentication"],"summary":"Admin logout","description":"Logout admin and invalidate token","security":[{"adminAuth":[]}],"responses":{"200":{"description":"Logout successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}},"401":{"description":"Unauthorized - invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/dashboard":{"get":{"tags":["Admin Dashboard"],"summary":"Get dashboard statistics","description":"Retrieve dashboard overview with counts and statistics","security":[{"adminAuth":[]}],"responses":{"200":{"description":"Dashboard data retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"totalCustomers":{"type":"integer","description":"Total number of customers","example":1250},"totalSellers":{"type":"integer","description":"Total number of sellers","example":85},"totalProducts":{"type":"integer","description":"Total number of products","example":2500},"totalOrders":{"type":"integer","description":"Total number of orders","example":3200},"totalRevenue":{"type":"number","format":"decimal","description":"Total revenue amount","example":125000.5},"pendingOrders":{"type":"integer","description":"Number of pending orders","example":45},"activeOffers":{"type":"integer","description":"Number of active offers","example":12}},"additionalProperties":false}},"additionalProperties":false}}}},"401":{"description":"Unauthorized - invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/category/list":{"get":{"tags":["Admin Categories"],"summary":"Get categories list","description":"Retrieve paginated list of categories with all database fields","security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Items per page"},{"in":"query","name":"parent_id","schema":{"type":"integer"},"description":"Filter by parent category ID"},{"in":"query","name":"status","schema":{"type":"integer","enum":[0,1]},"description":"Filter by status (0=inactive, 1=active)"}],"responses":{"200":{"description":"Categories retrieved successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}}}]}}}}}}},"/admin/category/addnew":{"post":{"tags":["Admin Categories"],"summary":"Create new category","description":"Add a new product category with all required fields","security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryRequest"}}}},"responses":{"201":{"description":"Category created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Category created successfully"},"data":{"$ref":"#/components/schemas/Category"}},"additionalProperties":false}}}},"400":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/product/list":{"get":{"tags":["Admin Products"],"summary":"Get products list","description":"Retrieve paginated list of products with all database fields","security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Items per page"},{"in":"query","name":"cat_id","schema":{"type":"integer"},"description":"Filter by category ID"},{"in":"query","name":"brand_id","schema":{"type":"integer"},"description":"Filter by brand ID"},{"in":"query","name":"status","schema":{"type":"integer","enum":[0,1]},"description":"Filter by status (0=inactive, 1=active)"},{"in":"query","name":"is_trending","schema":{"type":"integer","enum":[0,1]},"description":"Filter by trending status"},{"in":"query","name":"is_price_saver","schema":{"type":"integer","enum":[0,1]},"description":"Filter by price saver status"}],"responses":{"200":{"description":"Products retrieved successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}]}}}}}}},"/admin/product/addnew":{"post":{"tags":["Admin Products"],"summary":"Create new product","description":"Add a new product to the system with all required fields","security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}}},"responses":{"201":{"description":"Product created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Product created successfully"},"data":{"$ref":"#/components/schemas/Product"}},"additionalProperties":false}}}}}}},"/admin/customer/list":{"get":{"tags":["Admin Customers"],"summary":"Get customers list","description":"Retrieve paginated list of customers with all database fields","security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Items per page"},{"in":"query","name":"status","schema":{"type":"integer","enum":[0,1]},"description":"Filter by status (0=inactive, 1=active)"},{"in":"query","name":"pincode","schema":{"type":"string"},"description":"Filter by pincode"}],"responses":{"200":{"description":"Customers retrieved successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}}}]}}}}}}},"/admin/seller/list":{"get":{"tags":["Admin Sellers"],"summary":"Get sellers list","description":"Retrieve paginated list of sellers with all database fields","security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Items per page"},{"in":"query","name":"status","schema":{"type":"integer","enum":[0,1]},"description":"Filter by status (0=inactive, 1=active)"},{"in":"query","name":"pincode","schema":{"type":"string"},"description":"Filter by pincode"}],"responses":{"200":{"description":"Sellers retrieved successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Seller"}}}}]}}}}}}},"/admin/order/list":{"get":{"tags":["Admin Orders"],"summary":"Get orders list","description":"Retrieve paginated list of orders with all database fields","security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","minimum":1,"default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100,"default":10},"description":"Items per page"},{"in":"query","name":"order_status","schema":{"type":"string","enum":["pending","processing","shipped","delivered","cancelled"]},"description":"Filter by order status"},{"in":"query","name":"payment_status","schema":{"type":"string","enum":["pending","paid","failed"]},"description":"Filter by payment status"},{"in":"query","name":"customer_id","schema":{"type":"integer"},"description":"Filter by customer ID"},{"in":"query","name":"pincode_id","schema":{"type":"integer"},"description":"Filter by pincode ID"}],"responses":{"200":{"description":"Orders retrieved successfully","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}}]}}}}}}},"/api/v1/delivery/register":{"post":{"summary":"Register a new delivery partner","tags":["Delivery Partner"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/DeliveryRegistration"}}}},"responses":{"200":{"description":"Registration successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Validation error or account already exists"}}}},"/api/v1/delivery/login":{"post":{"summary":"Delivery partner login","tags":["Delivery Partner"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["mobile","password"],"properties":{"mobile":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"status":{"type":"string"}}}}}}}}},"/api/v1/delivery/refresh-token":{"post":{"summary":"Refresh access token","tags":["Delivery Partner"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string"}}}}}},"responses":{"200":{"description":"New token pair"}}}},"/api/v1/delivery/availability":{"post":{"summary":"Toggle online/offline status","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"is_available":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Status updated"}}}},"/api/v1/delivery/location":{"post":{"summary":"Update real-time location","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}}},"responses":{"200":{"description":"Location updated"}}}},"/api/v1/delivery/profile":{"get":{"summary":"Get delivery partner profile","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"responses":{"200":{"description":"Profile data"}}},"patch":{"summary":"Update profile details","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"vehicle_details":{"type":"string"},"profile_image":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Profile updated"}}}},"/api/v1/delivery/tasks/available":{"get":{"summary":"List nearby available tasks","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"responses":{"200":{"description":"List of tasks"}}}},"/api/v1/delivery/tasks/my":{"get":{"summary":"Get current active tasks","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"responses":{"200":{"description":"Active tasks"}}}},"/api/v1/delivery/tasks/accept":{"post":{"summary":"Accept a delivery task","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"integer"}}}}}},"responses":{"200":{"description":"Task accepted"}}}},"/api/v1/delivery/tasks/status":{"post":{"summary":"Update task status (PICKED_UP/DELIVERED)","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"taskId":{"type":"integer"},"status":{"type":"string","enum":["PICKED_UP","DELIVERED"]},"otp":{"type":"string"}}}}}},"responses":{"200":{"description":"Status updated"}}}},"/api/v1/delivery/payouts":{"get":{"summary":"Get earnings and payout history","tags":["Delivery Partner"],"security":[{"deliveryAuth":[]}],"responses":{"200":{"description":"Payout history"}}}},"/api/v1/food-admin/restaurant/status":{"post":{"summary":"Update Restaurant Status","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","status"],"properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["APPROVED","REJECTED","SUSPENDED"]}}}}}},"responses":{"200":{"description":"Status updated successfully"}}}},"/api/v1/food-admin/delivery/status":{"post":{"summary":"Update Delivery Partner Status","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","status"],"properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["APPROVED","REJECTED","SUSPENDED"]}}}}}},"responses":{"200":{"description":"Status updated successfully"}}}},"/api/v1/food-admin/refund/process":{"post":{"summary":"Process Refund","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["refundId","action"],"properties":{"refundId":{"type":"integer"},"action":{"type":"string","enum":["APPROVE","REJECT"]}}}}}},"responses":{"200":{"description":"Refund processed"}}}},"/api/v1/food-admin/penalty":{"post":{"summary":"Apply Penalty","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_type","entity_id","amount","reason"],"properties":{"entity_type":{"type":"string","enum":["RESTAURANT","DELIVERY"]},"entity_id":{"type":"integer"},"amount":{"type":"number"},"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Penalty applied"}}}},"/api/v1/food-admin/payouts/generate":{"post":{"summary":"Generate Payouts","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["RESTAURANT","DELIVERY"]}}}}}},"responses":{"200":{"description":"Payouts generated"}}}},"/api/v1/food-admin/payouts/restaurant/mark-paid":{"post":{"summary":"Mark Restaurant Payout as Paid","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payout_id","transaction_reference"],"properties":{"payout_id":{"type":"integer"},"transaction_reference":{"type":"string"},"payment_method":{"type":"string","default":"BANK_TRANSFER"},"notes":{"type":"string"}}}}}},"responses":{"200":{"description":"Payout marked as paid"}}}},"/api/v1/food-admin/payouts/delivery/mark-paid":{"post":{"summary":"Mark Delivery Payout as Paid","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payout_id","transaction_reference"],"properties":{"payout_id":{"type":"integer"},"transaction_reference":{"type":"string"},"payment_method":{"type":"string","default":"BANK_TRANSFER"},"notes":{"type":"string"}}}}}},"responses":{"200":{"description":"Payout marked as paid"}}}},"/api/v1/food-admin/ops/orders-stuck":{"get":{"summary":"Get Stuck Orders","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"hours","schema":{"type":"integer","default":2}}],"responses":{"200":{"description":"List of stuck orders"}}}},"/api/v1/food-admin/ops/sla-violations":{"get":{"summary":"Get SLA Violations","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"responses":{"200":{"description":"List of SLA violations"}}}},"/api/v1/food-admin/ops/restaurant-rejection-ratio":{"get":{"summary":"Get Restaurant Rejection Ratio","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"restaurant_id","schema":{"type":"integer"}},{"in":"query","name":"days","schema":{"type":"integer","default":7}}],"responses":{"200":{"description":"List of rejection ratios"}}}},"/api/v1/food-admin/ops/delivery-cancellation-rate":{"get":{"summary":"Get Delivery Cancellation Rate","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"delivery_boy_id","schema":{"type":"integer"}},{"in":"query","name":"days","schema":{"type":"integer","default":7}}],"responses":{"200":{"description":"List of cancellation rates"}}}},"/api/v1/admin/login":{"post":{"summary":"Admin Login","tags":["Food Admin Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string","default":"foodadmin"},"password":{"type":"string","default":"password"}}}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"token":{"type":"string"}}}}}}}}}}},"/api/v1/admin/register":{"post":{"summary":"Admin Registration","tags":["Food Admin Authentication"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","username","password","email","mobile"],"properties":{"name":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"mobile":{"type":"string"},"role_id":{"type":"integer","default":1}}}}}},"responses":{"201":{"description":"Admin registered"}}}},"/api/v1/food-admin/restaurants":{"get":{"summary":"List all restaurants","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED","SUSPENDED"]}},{"in":"query","name":"search","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"type":"integer"}}],"responses":{"200":{"description":"List of restaurants"}}}},"/api/v1/food-admin/delivery-partners":{"get":{"summary":"List all delivery partners","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"is_available","schema":{"type":"boolean"}},{"in":"query","name":"search","schema":{"type":"string"}}],"responses":{"200":{"description":"List of delivery partners"}}}},"/api/v1/food-admin/orders":{"get":{"summary":"List all food orders","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string"}},{"in":"query","name":"restaurant_id","schema":{"type":"integer"}},{"in":"query","name":"start_date","schema":{"type":"string","format":"date"}},{"in":"query","name":"end_date","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"List of food orders"}}}},"/api/v1/food-admin/orders/{id}":{"get":{"summary":"Get food order details","tags":["Food Admin Operations"],"security":[{"adminAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Order details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodOrder"}}}}}}},"/api/v1/food/home":{"get":{"summary":"Food Home Screen (Aggregated)","description":"Returns all home screen sections in one call: offers, cuisines, popular dishes, and nearby restaurants.\nUses graceful degradation — if a section fails, it returns an empty array instead of failing entirely.\n","tags":["Food Discovery"],"parameters":[{"in":"query","name":"lat","required":true,"schema":{"type":"number","example":28.5355},"description":"User latitude"},{"in":"query","name":"lng","required":true,"schema":{"type":"number","example":77.391},"description":"User longitude"},{"in":"query","name":"pincode","schema":{"type":"string","example":"201301"},"description":"Optional pincode for filtering"},{"in":"query","name":"business_type","schema":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"]},"description":"Filter the home feed by specific business type"}],"responses":{"200":{"description":"Home screen data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"offers":{"type":"array","items":{"type":"object"}},"quick_cuisines":{"type":"array","items":{"type":"object"}},"popular_dishes":{"type":"array","items":{"type":"object"}},"nearby_restaurants":{"type":"array","items":{"type":"object"}},"explore_cuisines":{"type":"array","items":{"type":"object"}}}}}}}}},"400":{"description":"Missing or invalid lat/lng"}}}},"/api/v1/food/home/offers":{"get":{"summary":"Get Food Offers","description":"Standalone endpoint for offers (for refresh/pagination).","tags":["Food Discovery"],"responses":{"200":{"description":"List of active offers"}}}},"/api/v1/food/home/cuisines":{"get":{"summary":"Get Quick Cuisines","description":"Standalone endpoint for quick cuisine categories.","tags":["Food Discovery"],"responses":{"200":{"description":"List of cuisine categories"}}}},"/api/v1/food/home/popular-dishes":{"get":{"summary":"Get Popular Dishes","description":"Standalone endpoint for trending/popular dishes.","tags":["Food Discovery"],"responses":{"200":{"description":"List of popular dishes"}}}},"/api/v1/food/home/nearby-restaurants":{"get":{"summary":"Get Nearby Restaurants","description":"Standalone endpoint for nearby restaurants based on location.","tags":["Food Discovery"],"parameters":[{"in":"query","name":"lat","required":true,"schema":{"type":"number","example":28.5355}},{"in":"query","name":"lng","required":true,"schema":{"type":"number","example":77.391}},{"in":"query","name":"limit","schema":{"type":"integer","default":20,"example":20}},{"in":"query","name":"business_type","schema":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"]},"description":"Filter by precise business type"}],"responses":{"200":{"description":"List of nearby restaurants with distance"},"400":{"description":"Missing lat/lng parameters"}}}},"/api/v1/food/restaurants/search":{"get":{"summary":"Search Restaurants","description":"Search restaurants by keyword, location, or pincode within a 20km radius.","tags":["Food Discovery"],"parameters":[{"in":"query","name":"lat","schema":{"type":"number","example":28.5355},"description":"User latitude (for distance calculation)"},{"in":"query","name":"lng","schema":{"type":"number","example":77.391},"description":"User longitude"},{"in":"query","name":"keyword","schema":{"type":"string","example":"pizza"},"description":"Search keyword (restaurant name)"},{"in":"query","name":"pincode","schema":{"type":"string","example":"201301"},"description":"Filter by pincode"},{"in":"query","name":"business_type","schema":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"]},"description":"Filter to specific types like CATERING or RO_WATER"}],"responses":{"200":{"description":"List of matching restaurants with distance","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"distance":{"type":"number","description":"Distance in km"}}}}}}}}}}}},"/api/v1/food/dishes/search":{"get":{"summary":"Search by Dish / Food Item","description":"Search restaurants by dish name. Returns restaurants that serve matching dishes.","tags":["Food Discovery"],"parameters":[{"in":"query","name":"query","required":true,"schema":{"type":"string","example":"biryani"},"description":"Dish name to search"},{"in":"query","name":"lat","schema":{"type":"number","example":28.5355}},{"in":"query","name":"lng","schema":{"type":"number","example":77.391}},{"in":"query","name":"pincode","schema":{"type":"string","example":"201301"}},{"in":"query","name":"business_type","schema":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"]},"description":"Filter dishes by specific business area"}],"responses":{"200":{"description":"Restaurants serving the searched dish","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"matching_dishes":{"type":"string","description":"Comma-separated matching dish names"},"dish_count":{"type":"integer"},"distance":{"type":"number"}}}},"meta":{"type":"object","properties":{"searchQuery":{"type":"string"},"resultCount":{"type":"integer"}}}}}}}},"400":{"description":"Missing search query"}}}},"/api/v1/food/restaurants/{id}":{"get":{"summary":"Get Restaurant Details","description":"Get full details of a specific restaurant including address, rating, and preparation time.","tags":["Food Discovery"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Restaurant ID"}],"responses":{"200":{"description":"Restaurant details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"rating":{"type":"number"},"preparation_time":{"type":"integer","description":"Avg preparation time in minutes"},"address_line":{"type":"string"},"city":{"type":"string"},"pincode":{"type":"string"}}}}}}}},"404":{"description":"Restaurant not found or not approved"}}}},"/api/v1/food/restaurants/{id}/menu":{"get":{"summary":"Get Restaurant Menu","description":"Returns menu grouped by categories with all active items.","tags":["Food Discovery"],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Restaurant ID"}],"responses":{"200":{"description":"Menu categorized with items","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","example":"Starters"},"sort_order":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","example":"Paneer Tikka"},"price":{"type":"number","example":199},"description":{"type":"string"},"is_veg":{"type":"boolean"},"image_url":{"type":"string"}}}}}}}}}}}},"404":{"description":"Restaurant not found or inactive"}}}},"/api/v1/food/cart":{"get":{"summary":"Get Cart","description":"Get current cart with items, restaurant info, and total.","tags":["Food Cart"],"security":[{"userAuth":[]}],"responses":{"200":{"description":"Cart details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"cart_id":{"type":"integer"},"restaurant":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"image_url":{"type":"string"}}},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"menu_item_id":{"type":"integer"},"name":{"type":"string"},"price":{"type":"number"},"quantity":{"type":"integer"},"is_veg":{"type":"boolean"},"image_url":{"type":"string"}}}},"total":{"type":"number"}}}}}}}}}}},"/api/v1/food/cart/summary":{"get":{"summary":"Get Cart Summary","description":"Full checkout summary with item breakdown, taxes, delivery fee, and grand total.","tags":["Food Cart"],"security":[{"userAuth":[]}],"responses":{"200":{"description":"Cart summary with pricing breakdown"}}}},"/api/v1/food/cart/add":{"post":{"summary":"Add Item to Cart","description":"Add a menu item to the cart. Enforces single-restaurant rule — if cart has items from another restaurant, returns 409 error.\nSupports both `menu_item_id` and `item_id` parameter names.\n","tags":["Food Cart"],"security":[{"userAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["restaurant_id","menu_item_id","quantity"],"properties":{"restaurant_id":{"type":"integer","example":39,"description":"Restaurant ID"},"menu_item_id":{"type":"integer","example":43,"description":"Menu item ID"},"quantity":{"type":"integer","example":1,"description":"Quantity to add"}}}}}},"responses":{"200":{"description":"Item added to cart","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Added to cart"}}}}}},"400":{"description":"Item not available or restaurant not active"},"409":{"description":"Cart contains items from another restaurant"}}}},"/api/v1/food/cart/update":{"post":{"summary":"Update Cart Item Quantity","description":"Update quantity of an existing cart item. Set quantity to 0 to remove the item.","tags":["Food Cart"],"security":[{"userAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["cart_item_id","quantity"],"properties":{"cart_item_id":{"type":"integer","description":"Cart item ID (not menu item ID)"},"quantity":{"type":"integer","description":"New quantity (0 to remove)"}}}}}},"responses":{"200":{"description":"Cart updated"}}}},"/api/v1/food/cart/item/{itemId}":{"delete":{"summary":"Remove Cart Item","description":"Remove a specific item from the cart.","tags":["Food Cart"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"itemId","required":true,"schema":{"type":"integer"},"description":"Cart item ID to remove"}],"responses":{"200":{"description":"Item removed from cart"}}}},"/api/v1/food/cart/clear":{"delete":{"summary":"Clear Entire Cart","description":"Remove all items and reset the cart.","tags":["Food Cart"],"security":[{"userAuth":[]}],"responses":{"200":{"description":"Cart cleared"}}}},"/api/v1/food/orders/validate":{"post":{"summary":"Validate Order (Pre-check)","description":"Validate cart before placing the order. Checks item availability, restaurant status,\ndelivery distance, and calculates final pricing.\n","tags":["Food Orders"],"security":[{"userAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"address_id":{"type":"integer","description":"Delivery address ID"}}}}}},"responses":{"200":{"description":"Validation result with price breakdown"},"400":{"description":"Validation failed (items unavailable, out of range, etc.)"}}}},"/api/v1/food/orders":{"post":{"summary":"Place Order","description":"Place a food order from the current cart. ACID-hardened with state machine guards.\nSupports idempotency via `X-Idempotency-Key` header.\nCreates a delivery task automatically upon order placement.\n","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"header","name":"X-Idempotency-Key","schema":{"type":"string"},"description":"Optional idempotency key to prevent duplicate orders"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address_id":{"type":"integer","description":"Delivery address ID (uses primary address if not provided)"},"payment_method":{"type":"string","enum":["COD","ONLINE","WALLET"],"example":"COD","description":"Payment method (also accepts payment_mode)"},"payment_transaction_id":{"type":"string","description":"Transaction ID for online payments"}}}}}},"responses":{"200":{"description":"Order placed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"orderId":{"type":"integer","example":35},"orderCode":{"type":"string","example":"FO1771015581553476"},"finalAmount":{"type":"number","example":162.9},"paymentStatus":{"type":"string","example":"PENDING"},"taskId":{"type":"integer","description":"Auto-created delivery task ID"}}}}}}}},"400":{"description":"Cart empty, items unavailable, or out of delivery range"}}},"get":{"summary":"Get Order History","description":"Get all food orders for the authenticated user.","tags":["Food Orders"],"security":[{"userAuth":[]}],"responses":{"200":{"description":"List of past orders"}}}},"/api/v1/food/orders/{id}":{"get":{"summary":"Get Order Details","description":"Get detailed information about a specific order including items.","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"},"description":"Order ID"}],"responses":{"200":{"description":"Order details with items"},"404":{"description":"Order not found"}}}},"/api/v1/food/orders/{id}/track":{"get":{"summary":"Track Order","description":"Get real-time order status including delivery partner info and location.\nStatus flow: PLACED → ACCEPTED → PREPARING → READY_FOR_PICKUP → OUT_FOR_DELIVERY → DELIVERED\n","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Order tracking information","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"order_status":{"type":"string","enum":["PLACED","ACCEPTED","PREPARING","READY_FOR_PICKUP","OUT_FOR_DELIVERY","DELIVERED","CANCELLED"]},"delivery_partner":{"type":"object"},"estimated_time":{"type":"string"}}}}}}}}}}},"/api/v1/food/orders/{id}/payment-status":{"get":{"summary":"Get Payment Status","description":"Check the payment status for a specific order.","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Payment status details"}}}},"/api/v1/food/orders/{id}/cancel":{"post":{"summary":"Cancel Order","description":"Cancel an order. ACID-hardened with state machine guards.\nOnly cancellable in PLACED or ACCEPTED state.\nAutomatically initiates refund if payment was made and cancels delivery task.\n","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Order cancelled successfully"},"400":{"description":"Order cannot be cancelled in current state"},"404":{"description":"Order not found"}}}},"/api/v1/food/orders/{id}/reorder":{"post":{"summary":"Reorder","description":"Re-add items from a previous order to the cart for quick reordering.","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Items added to cart from previous order"},"404":{"description":"Order not found"}}}},"/api/v1/food/orders/{id}/retry-payment":{"post":{"summary":"Retry Payment","description":"Retry a failed payment for an existing order.\nACID-hardened with strict guards. Only works for orders with FAILED payment status.\n","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_method":{"type":"string","enum":["COD","ONLINE","WALLET"]},"payment_transaction_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Payment retried successfully"},"400":{"description":"Payment retry not applicable"}}}},"/api/v1/food/orders/{id}/rate":{"post":{"summary":"Rate Order","description":"Rate a delivered order (1-5 stars). Updates the restaurant's average rating.","tags":["Food Orders"],"security":[{"userAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["rating"],"properties":{"rating":{"type":"integer","minimum":1,"maximum":5,"example":4,"description":"Rating from 1 to 5"},"comment":{"type":"string","example":"Great food, loved the paneer tikka!","description":"Optional review comment"}}}}}},"responses":{"200":{"description":"Rating submitted successfully"},"400":{"description":"Invalid rating or order not delivered yet"},"404":{"description":"Order not found"}}}},"/api/v1/restaurant/register":{"post":{"summary":"Register a new restaurant (with document upload)","tags":["Restaurant (Food Seller)"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["name","email","password","contact_phone","fssai_certificate","business_license","owner_id_proof"],"properties":{"name":{"type":"string","example":"Flavor Junction"},"owner_name":{"type":"string","example":"Amit Sharma"},"email":{"type":"string","example":"contact@flavorjunction.com"},"password":{"type":"string","example":"Pass@123"},"contact_phone":{"type":"string","example":"9876543210"},"fssai_license":{"type":"string","example":"12345678901234"},"profile_image":{"type":"string","format":"binary"},"fssai_certificate":{"type":"string","format":"binary"},"business_license":{"type":"string","format":"binary"},"owner_id_proof":{"type":"string","format":"binary"},"business_type":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"],"example":"FOOD","description":"Type of business, e.g. FOOD, CATERING, RO_WATER, ICE_CREAM."},"address":{"type":"object","properties":{"line":{"type":"string","example":"Shop 4, Civil Lines"},"city":{"type":"string","example":"Lucknow"},"pincode":{"type":"string","example":"226001"},"lat":{"type":"number","example":26.8467},"lng":{"type":"number","example":80.9462}}}}}}}},"responses":{"200":{"description":"Registration successful, awaiting approval."},"400":{"description":"Missing fields or email already exists."}}}},"/api/v1/restaurant/login":{"post":{"summary":"Restaurant Login","tags":["Restaurant (Food Seller)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","example":"test.restaurant@ilbmart.com"},"password":{"type":"string","example":"Password@123"}}}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","example":"APPROVED"}}}}}}}}},"/api/v1/restaurant/refresh-token":{"post":{"summary":"Refresh Access Token","tags":["Restaurant (Food Seller)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string"}}}}}},"responses":{"200":{"description":"Token refreshed"}}}},"/api/v1/restaurant/profile":{"get":{"summary":"Get Restaurant Profile","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"responses":{"200":{"description":"Detailed restaurant profile and address."}}},"patch":{"summary":"Update Restaurant Profile (Preferred)","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"owner_name":{"type":"string"},"description":{"type":"string"},"contact_phone":{"type":"string"},"business_type":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"]},"profile_image":{"type":"string","format":"binary"},"profile_image_key":{"type":"string"},"banner_image_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Profile updated."}}},"post":{"summary":"Update Restaurant Profile (Alias for compatibility)","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"owner_name":{"type":"string"},"description":{"type":"string"},"contact_phone":{"type":"string"},"business_type":{"type":"string","enum":["FOOD","CATERING","RO_WATER","ICE_CREAM"]},"profile_image":{"type":"string","format":"binary"},"profile_image_key":{"type":"string"},"banner_image_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Profile updated."}}}},"/api/v1/restaurant/menu":{"get":{"summary":"Get Menu Structure","description":"Returns all categories and menu items for this restaurant.","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"responses":{"200":{"description":"Menu data."}}}},"/api/v1/restaurant/menu/category":{"post":{"summary":"Add Menu Category","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Beverages"},"sort_order":{"type":"integer","example":1},"image":{"type":"string","format":"binary"},"image_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Category created."}}}},"/api/v1/restaurant/menu/category/{id}":{"delete":{"summary":"Delete Menu Category","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Category deleted successfully."}}}},"/api/v1/restaurant/menu/item":{"post":{"summary":"Add Menu Item","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["category_id","name","price"],"properties":{"category_id":{"type":"integer","example":5},"name":{"type":"string","example":"Mango Lassi"},"description":{"type":"string","example":"Fresh creamy mango lassi"},"price":{"type":"number","example":89},"is_veg":{"type":"boolean","default":true},"image":{"type":"string","format":"binary"},"image_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Item created."}}}},"/api/v1/restaurant/menu/item/{id}":{"patch":{"summary":"Update Menu Item","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number"},"is_veg":{"type":"boolean"},"category_id":{"type":"integer"},"image":{"type":"string","format":"binary"},"image_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Item updated."}}},"post":{"summary":"Update Menu Item (Alias for compatibility)","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number"},"is_veg":{"type":"boolean"},"category_id":{"type":"integer"},"image":{"type":"string","format":"binary"},"image_key":{"type":"string"}}}}}},"responses":{"200":{"description":"Item updated."}}},"delete":{"summary":"Delete Menu Item","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Menu item deleted successfully."}}}},"/api/v1/restaurant/menu/item/toggle":{"patch":{"summary":"Toggle Stock Availability","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["item_id","is_active"],"properties":{"item_id":{"type":"integer"},"is_active":{"type":"boolean","description":"True for In Stock, False for Out of Stock"}}}}}},"responses":{"200":{"description":"Availability toggled."}}}},"/api/v1/restaurant/orders":{"get":{"summary":"Get Orders","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["PLACED","ACCEPTED","PREPARING","READY_FOR_PICKUP","DELIVERED","CANCELLED"]}}],"responses":{"200":{"description":"List of restaurant orders."}}}},"/api/v1/restaurant/orders/status":{"post":{"summary":"Update Order Status","description":"Enforces state machine transitions (PLACED -> ACCEPTED -> PREPARING -> READY_FOR_PICKUP).","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["orderId","status"],"properties":{"orderId":{"type":"integer"},"status":{"type":"string","enum":["ACCEPTED","PREPARING","READY_FOR_PICKUP"]}}}}}},"responses":{"200":{"description":"Order moved to next state."}}}},"/api/v1/restaurant/wallet":{"get":{"summary":"Get Wallet & Transactions","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"responses":{"200":{"description":"Balance and transaction history."}}}},"/api/v1/restaurant/payouts":{"get":{"summary":"Get Payout History","tags":["Restaurant (Food Seller)"],"security":[{"restaurantAuth":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["PROCESSING","PAID"]}}],"responses":{"200":{"description":"List of payouts."}}}}}}