{"message":"Welcome to the SodaPOS API","version":"1.0.0","status":"running","documentation":{"description":"Complete Point of Sale System API with authentication, inventory management, and RBAC","base_url":"www.cm-service.softdaemon.com","endpoints":{"System":{"GET /":"API documentation and available endpoints","GET /health":"System health check"},"Authentication":{"POST /api/auth/login":"User login (returns JWT token)","POST /api/auth/register":"User registration","POST /api/auth/refresh":"Refresh JWT token","POST /api/auth/logout":"User logout"},"Category Management":{"GET /api/categories":"List categories (pagination, filtering supported)","GET /api/categories/{id}":"Get single category by ID","POST /api/categories":"Create new category","PUT /api/categories/{id}":"Update category","DELETE /api/categories/{id}":"Delete category"},"Expense Category Management":{"GET /api/expense-categories":"List expense categories (pagination, filtering supported)","GET /api/expense-categories/{id}":"Get single expense category by ID","POST /api/expense-categories":"Create new expense category","PUT /api/expense-categories/{id}":"Update expense category","DELETE /api/expense-categories/{id}":"Delete expense category","GET /api/expense-categories/dropdown":"Get expense categories for dropdown"},"Expense Management":{"GET /api/expenses":"List expenses (pagination, filtering supported)","GET /api/expenses/{id}":"Get single expense by ID","POST /api/expenses":"Create new expense","PUT /api/expenses/{id}":"Update expense","DELETE /api/expenses/{id}":"Delete expense","GET /api/expenses/statistics":"Get expense statistics","GET /api/expenses/by-category":"Get expenses grouped by category"},"Product Management":{"GET /api/products":"List products (pagination, filtering supported)","GET /api/products/{id}":"Get single product by ID","GET /api/products/{id}/cost-history":"Get product cost history (WAC changes)","POST /api/products":"Create new product","PUT /api/products/{id}":"Update product","DELETE /api/products/{id}":"Delete product"},"Product Assembly Management":{"GET /api/product-assemblies":"List product assemblies/recipes (pagination, filtering supported)","GET /api/product-assemblies/{productId}":"Get assembly by finished product ID","POST /api/product-assemblies":"Create or update product assembly/recipe","DELETE /api/product-assemblies/{productId}":"Delete product assembly","GET /api/product-assemblies/{productId}/requirements":"Calculate material requirements for production","GET /api/product-assemblies/{productId}/details":"Get detailed assembly information with costs"},"Supplier Management":{"GET /api/suppliers":"List suppliers (pagination, filtering supported)","GET /api/suppliers/{id}":"Get single supplier by ID","POST /api/suppliers":"Create new supplier","PUT /api/suppliers/{id}":"Update supplier","DELETE /api/suppliers/{id}":"Delete supplier"},"Purchase Management":{"GET /api/purchases":"List purchases (pagination, filtering supported)","GET /api/purchases/{id}":"Get single purchase by ID","POST /api/purchases":"Create new purchase","PUT /api/purchases/{id}":"Update purchase"},"Sales Management":{"GET /api/sales":"List sales (pagination, filtering supported)","GET /api/sales/{id}":"Get single sale by ID","POST /api/sales":"Create new sale","PUT /api/sales/{id}":"Update sale","DELETE /api/sales/{id}":"Delete sale"},"User Management":{"GET /api/users":"List users (Admin only, pagination supported)","GET /api/users/{id}":"Get single user by ID","POST /api/users":"Create new user (Admin only)","PUT /api/users/{id}":"Update user (Admin only)","DELETE /api/users/{id}":"Delete user (Admin only)","GET /api/users/{id}/permissions":"Get user permissions"},"Profile Management":{"GET /api/profile":"Get current user profile","PUT /api/profile":"Update current user profile (name, email, phone)","PUT /api/profile/password":"Change current user password"},"Account Management":{"GET /api/accounts":"List accounts (pagination, filtering supported)","GET /api/accounts/{id}":"Get single account by ID","POST /api/accounts":"Create new account","PUT /api/accounts/{id}":"Update account","DELETE /api/accounts/{id}":"Delete account"},"Transaction Management":{"GET /api/transactions":"List transactions with filtering (pagination supported)","GET /api/transactions/{id}":"Get single transaction by ID"},"Inventory Log Management":{"GET /api/inventory-logs":"List inventory logs with filtering (pagination supported)","GET /api/inventory-logs/{id}":"Get single inventory log by ID","GET /api/inventory-logs/summary":"Get inventory log summary with statistics","GET /api/inventory-logs/export":"Export inventory logs to CSV"},"Inventory Management":{"GET /api/inventory/low-stock":"Get products with low stock levels","GET /api/inventory/summary":"Get inventory summary report"}},"authentication":{"type":"Bearer Token (JWT)","header":"Authorization: Bearer {your-jwt-token}","note":"All endpoints except /health, /, and auth endpoints require authentication"},"pagination":{"query_params":{"page":"Page number (default: 1)","limit":"Items per page (default: 10, max: 100)"}},"filtering":{"categories":{"search":"Search by name","parent_id":"Filter by parent category","is_active":"Filter by active status (true/false)"},"expense_categories":{"search":"Search by category name, code, or description","is_active":"Filter by active status (true/false)"},"products":{"search":"Search by name","category_id":"Filter by category","product_type":"Filter by type (finished, raw_material, semi_finished)","is_sellable":"Filter by sellable status (true/false)","is_active":"Filter by active status (true/false)"},"users":{"search":"Search by name, username, or email","user_status":"Filter by status (active, inactive, suspended)","role_id":"Filter by role"},"suppliers":{"search":"Search by name","status":"Filter by status (active, inactive, suspended)","created_by":"Filter by creator"},"accounts":{"search":"Search by account name, account code, or bank name","account_type":"Filter by type (cash, bank, mobile_banking)","is_active":"Filter by active status (true/false)"},"transactions":{"account_id":"Filter by account ID","reference_type":"Filter by type (sale, purchase, expense, refund, transfer, manual)","date_from":"Filter by start date (YYYY-MM-DD)","date_to":"Filter by end date (YYYY-MM-DD)","amount_min":"Filter by minimum transaction amount (absolute value)","amount_max":"Filter by maximum transaction amount (absolute value)","search":"Search by description, account name, or created by user"},"inventory_logs":{"product_id":"Filter by product ID","change_type":"Filter by change type (sale, restock, adjustment, production_consume, production_create, waste, return)","reference_type":"Filter by reference type (sale, purchase, production, manual)","date_from":"Filter by start date (YYYY-MM-DD)","date_to":"Filter by end date (YYYY-MM-DD)","quantity_min":"Filter by minimum quantity change (absolute value)","quantity_max":"Filter by maximum quantity change (absolute value)","search":"Search by product name, category, notes, or user name"}},"permissions":{"inventory.view":"View inventory items","inventory.create":"Create inventory items","inventory.edit":"Edit inventory items","inventory.delete":"Delete inventory items","users.view":"View users","users.create":"Create users","users.edit":"Edit users","users.delete":"Delete users","reports.inventory":"View inventory reports"}}}