{"service":"PDF Converter Backend","version":"1.0.0","status":"running","features":{"multi_company":true,"role_based_access":true,"usage_tracking":true,"subscription_plans":true,"custom_branding":true},"documentation":{"swagger_ui":"/docs","redoc":"/redoc","openapi_json":"/openapi.json"},"endpoints":{"authentication":{"description":"User authentication and registration","endpoints":{"register":{"method":"POST","path":"/auth/register","description":"Register new user (requires company admin or super admin)","auth_required":true,"roles":["company_admin","superadmin"]},"login":{"method":"POST","path":"/auth/login","description":"Login and get JWT token","auth_required":false},"me":{"method":"GET","path":"/auth/me","description":"Get current user profile with company info","auth_required":true},"logout":{"method":"POST","path":"/auth/logout","description":"Logout user","auth_required":true}}},"super_admin_companies":{"description":"Company management (Super Admin only)","endpoints":{"list_companies":{"method":"GET","path":"/companies","description":"List all companies with pagination","auth_required":true,"roles":["superadmin"],"query_params":["skip","limit","is_active"]},"get_company":{"method":"GET","path":"/companies/{company_id}","description":"Get specific company details","auth_required":true,"roles":["superadmin"]},"create_company":{"method":"POST","path":"/companies","description":"Create new company","auth_required":true,"roles":["superadmin"]},"update_company":{"method":"PUT","path":"/companies/{company_id}","description":"Update company details","auth_required":true,"roles":["superadmin"]},"deactivate_company":{"method":"DELETE","path":"/companies/{company_id}","description":"Deactivate company (soft delete)","auth_required":true,"roles":["superadmin"]},"assign_plan":{"method":"PUT","path":"/companies/{company_id}/plan","description":"Assign subscription plan to company","auth_required":true,"roles":["superadmin"]},"get_company_usage":{"method":"GET","path":"/companies/{company_id}/usage","description":"Get company usage statistics","auth_required":true,"roles":["superadmin"],"query_params":["month","year"]},"get_company_users":{"method":"GET","path":"/companies/{company_id}/users","description":"Get all users in a company","auth_required":true,"roles":["superadmin"]}}},"super_admin_plans":{"description":"Subscription plan management (Super Admin only)","endpoints":{"list_plans":{"method":"GET","path":"/plans","description":"List all subscription plans","auth_required":true,"roles":["superadmin"]},"get_plan":{"method":"GET","path":"/plans/{plan_id}","description":"Get specific plan details","auth_required":true,"roles":["superadmin"]},"create_plan":{"method":"POST","path":"/plans","description":"Create new subscription plan","auth_required":true,"roles":["superadmin"]},"update_plan":{"method":"PUT","path":"/plans/{plan_id}","description":"Update plan details and limits","auth_required":true,"roles":["superadmin"]},"deactivate_plan":{"method":"DELETE","path":"/plans/{plan_id}","description":"Deactivate plan (soft delete)","auth_required":true,"roles":["superadmin"]}}},"company_admin":{"description":"Company settings and management (Company Admin)","endpoints":{"get_settings":{"method":"GET","path":"/company/settings","description":"Get own company settings","auth_required":true,"roles":["company_admin","superadmin"]},"update_settings":{"method":"PUT","path":"/company/settings","description":"Update company name and settings","auth_required":true,"roles":["company_admin","superadmin"]},"get_usage":{"method":"GET","path":"/company/usage","description":"Get company usage statistics","auth_required":true,"roles":["company_admin","superadmin"],"query_params":["month","year"]},"get_users":{"method":"GET","path":"/company/users","description":"List all company users","auth_required":true,"roles":["company_admin","superadmin"]},"get_plan":{"method":"GET","path":"/company/plan","description":"Get assigned plan details and limits","auth_required":true,"roles":["company_admin","superadmin"]},"upload_branding":{"method":"POST","path":"/company/branding","description":"Upload custom header/footer images","auth_required":true,"roles":["company_admin","superadmin"],"content_type":"multipart/form-data"},"get_branding":{"method":"GET","path":"/company/branding","description":"Get branding image URLs","auth_required":true,"roles":["company_admin","superadmin"]},"delete_branding":{"method":"DELETE","path":"/company/branding/{image_type}","description":"Delete header or footer image","auth_required":true,"roles":["company_admin","superadmin"]}}},"documents":{"description":"Document upload and processing (All authenticated users)","endpoints":{"upload":{"method":"POST","path":"/upload","description":"Upload and process document (JSON/PDF)","auth_required":true,"roles":["user","company_admin","superadmin"],"content_type":"multipart/form-data","usage_tracked":true,"limit_enforced":"max_uploads_per_month"},"extract_structured":{"method":"POST","path":"/extract/structured","description":"Extract structured data from uploaded document","auth_required":true,"roles":["user","company_admin","superadmin"]}}},"history":{"description":"Document history and management (All authenticated users)","endpoints":{"list_history":{"method":"GET","path":"/history/","description":"List user's document history (company-scoped)","auth_required":true,"roles":["user","company_admin","superadmin"],"query_params":["skip","limit"]},"create_history":{"method":"POST","path":"/history/","description":"Create new history entry","auth_required":true,"roles":["user","company_admin","superadmin"]},"get_history":{"method":"GET","path":"/history/{doc_id}","description":"Get specific document details","auth_required":true,"roles":["user","company_admin","superadmin"]},"update_history":{"method":"PUT","path":"/history/{doc_id}","description":"Update document metadata","auth_required":true,"roles":["user","company_admin","superadmin"]},"delete_history":{"method":"DELETE","path":"/history/{doc_id}","description":"Delete document from history","auth_required":true,"roles":["user","company_admin","superadmin"]},"share_document":{"method":"POST","path":"/history/{doc_id}/share","description":"Generate shareable link for document","auth_required":true,"roles":["user","company_admin","superadmin"]},"export_document":{"method":"POST","path":"/history/{doc_id}/export","description":"Export document in various formats","auth_required":true,"roles":["user","company_admin","superadmin"],"query_params":["format"],"usage_tracked":true,"limit_enforced":"max_exports_per_month"}}},"pdf":{"description":"PDF generation service","endpoints":{"generate_pdf":{"method":"POST","path":"/api/pdf/generate","description":"Generate PDF from structured data with company branding","auth_required":true,"roles":["user","company_admin","superadmin"],"usage_tracked":true,"limit_enforced":"max_pages_per_document"},"pdf_health":{"method":"GET","path":"/api/pdf/health","description":"Check PDF service health","auth_required":false}}},"health":{"description":"System health and readiness checks","endpoints":{"health":{"method":"GET","path":"/health","description":"Basic health check","auth_required":false},"readiness":{"method":"GET","path":"/ready","description":"Kubernetes readiness probe","auth_required":false}}}},"usage_limits":{"description":"Plan-based usage limits enforced per company","tracked_metrics":["uploads_per_month","exports_per_month","pages_per_document","active_users"],"free_trial_defaults":{"max_uploads_per_month":10,"max_exports_per_month":10,"max_pages_per_document":50,"max_users":3}},"timestamp":1775337996.7141817}