{"success":true,"data":{"api_name":"Mantri Mobile App API","version":"1.0.0","description":"Unified API endpoint for mobile app offline data synchronization","base_url":"https:\/\/api.mantrijii.com\/","endpoint":{"data":{"url":"\/data.php","method":"GET","description":"Get all candidate-specific data in unified format for offline storage","parameters":{"candidate_id":"(required) Candidate ID","election_id":"(required) Election ID","user_id":"(required) User ID","page":"(optional) Page number for pagination (default: 1)","limit":"(optional) Records per page (default: 1000, max: 10000)"},"example":"\/data.php?candidate_id=1&election_id=1&user_id=123&page=1&limit=100","response_structure":{"meta":{"candidate":"Candidate information with party and election details","user":"User information and sync metadata","sync":"Sync timestamp and version information"},"data":{"voters":"Array of voter records with all metadata","survey_questions":"Array of survey questions for the election","families":"Array of family groupings","print_logs":"Array of print activity logs"}}}},"response_format":{"success":true,"data":"Response data object","message":"Human readable message","timestamp":"ISO 8601 timestamp"},"error_codes":{"400":"Bad Request - Invalid parameters","401":"Unauthorized - Invalid user","403":"Forbidden - Access denied","404":"Not Found - Resource not found","405":"Method Not Allowed - Wrong HTTP method","422":"Unprocessable Entity - Missing required fields","500":"Internal Server Error"},"data_types":{"elections":{"id":"integer","type":"string","year":"integer","election_name_en":"string","election_name_local":"string","start_date":"date","end_date":"date","is_active":"boolean"},"candidates":{"id":"integer","election_id":"integer","party_id":"integer","candidate_name":"string","name_en":"string","name_local":"string","party_name_en":"string","party_name_local":"string"},"voters":{"id":"integer","epic_number":"string","first_name_en":"string","last_name_en":"string","house_no":"string","assembly_no":"integer","part_no":"integer","voter_color":"enum(red,green,yellow,white)","is_vip":"boolean","is_dead":"boolean","has_voted":"boolean"}},"authentication":"Pass user_id parameter. User must exist and have role candidate_admin or superadmin.","rate_limiting":"Not implemented - consider adding in production","cors":"Enabled for all origins - restrict in production"},"message":"API documentation retrieved successfully","timestamp":"2026-05-30 11:17:56"}