{"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"}],"tags":[{"name":"Admin","description":"Admin-specific endpoints (requires admin authentication)"}],"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"}}}}},"paths":{"/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/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"}}}}}}}}}