- Development:
http://localhost:9000
- URL:
/registration/insert_aadhar - Method:
POST - Description: Register a new Aadhaar user
- Request Body: JSON object containing user details
{ "first_name": "string", "last_name": "string", "dob": "YYYY-MM-DD", "gender": "string", "mobile_number": "string", "email_id": "string", "address": "string", "city_id": "number", "state_id": "number", "preferences": "json" }
- URL:
/registration/update_profile_picture - Method:
POST - Description: Upload or update user's profile picture
- Request Body: Form-data
profile: Image filetid: User ID (Aadhaar user's tid)
- URL:
/registration/generate_random_data - Method:
POST - Description: Generate random Aadhaar user data
- Request Body: JSON
{ "count": "number" // Optional, defaults to 100 }
- URL:
/dashboard/city_wise_count - Method:
GET - Description: Get count of Aadhaar users by city
- URL:
/dashboard/state_wise_count - Method:
GET - Description: Get count of Aadhaar users by state
- URL:
/dashboard/state_city_wise_count - Method:
GET - Description: Get count of Aadhaar users by state and city
- URL:
/dashboard/count_above_60 - Method:
GET - Description: Get total count of users above 60 years
- URL:
/dashboard/state_wise_above_60 - Method:
GET - Description: Get count of users above 60 years by state
- URL:
/dashboard/age_category_counts - Method:
GET - Description: Get count of users by age categories (<10, 10-20, 20-60, >60)
- URL:
/dashboard/percentage_below_20 - Method:
GET - Description: Get percentage of users below 20 years
- URL:
/dashboard/state_wise_percentage - Method:
GET - Description: Get percentage of Aadhaar holders by state
- URL:
/dashboard/state_wise_percentage_above_60 - Method:
GET - Description: Get percentage of users above 60 years by state
- URL:
/dashboard/one_dose_count - Method:
GET - Description: Get count of users with only one vaccine dose
- URL:
/dashboard/two_dose_count - Method:
GET - Description: Get count of users with both vaccine doses
- URL:
/dashboard/percentage_two_vs_one - Method:
GET - Description: Get percentage of users with two doses compared to one dose
- URL:
/dashboard/percentage_not_vaccinated - Method:
GET - Description: Get percentage of users not vaccinated
- URL:
/dashboard/state_wise_one_dose - Method:
GET - Description: Get percentage of users with one dose by state
- URL:
/dashboard/state_wise_not_vaccinated - Method:
GET - Description: Get percentage of unvaccinated users by state
- URL:
/dashboard/not_vaccinated_by_state/:state - Method:
GET - Description: Get list of unvaccinated users in a specific state
- URL Parameters:
state: State name
- URL:
/dashboard/state_wise_not_vaccinated_overall - Method:
GET - Description: Get percentage of unvaccinated users by state compared to national total
- URL:
/dashboard/gender_count - Method:
GET - Description: Get count of users by gender
- URL:
/dashboard/state_gender_count - Method:
GET - Description: Get count of users by state and gender
- URL:
/dashboard/state_gender_percentage - Method:
GET - Description: Get gender distribution percentage by state
- URL:
/dashboard/state_gender_comparison - Method:
GET - Description: Get gender comparison between states and country
- URL:
/dashboard/vaccinated_both_doses_by_gender - Method:
GET - Description: Get count of fully vaccinated users by gender
- URL:
/dashboard/state_gender_vaccination_ratio - Method:
GET - Description: Get vaccination ratio by state and gender
- URL:
/dashboard/all_aadhar_data - Method:
GET - Description: Retrieve all Aadhaar user data with city and state information
- Response Format:
{ "success": true, "count": 1, "data": [ { "tid": 1, "aadhar_number": "123456789012", "first_name": "John", "last_name": "Doe", "dob": "1990-01-01", "gender": "Male", "mobile_number": "9876543210", "email_id": "john.doe@example.com", "address": "123 Main St", "city_id": 1, "state_id": 1, "city_name": "Mumbai", "state_name": "Maharashtra", "preferences": {}, "created_at": "2024-03-20T10:00:00Z", "updated_at": "2024-03-20T10:00:00Z" } ] } - Error Response:
{ "success": false, "error": "Failed to fetch Aadhaar data" }
All endpoints return JSON responses. Error responses follow the format:
{
"error": "error message"
}- All endpoints require proper authentication (to be implemented)
- File uploads are stored in the
/uploadsdirectory - Date formats should be in YYYY-MM-DD format
- All percentages are rounded to 2 decimal places
- The server automatically sends birthday wishes to Aadhaar users