Register multiple students in a single operation with comprehensive academic information. Requires admin or lecturer privileges for batch operations.
POST
/api/v1/register/batch/students
curl \
--request POST 'https://api.echoplain.social/api/v1/register/batch/students' \
--header "Content-Type: application/json" \
--data '{"students":[{"role":"STUDENT","email":"alice.johnson@student.edu","phone":"+254712345684","cohortId":"cohort-2024-uuid","lastname":"Johnson","password":"StudentPass123!","firstname":"Alice","instituteid":"institute-uuid-here","departmentId":"cs-department-uuid","Registration_number":"CS/2024/001"},{"role":"STUDENT","email":"bob.smith@student.edu","phone":"+254712345685","cohortId":"cohort-2024-uuid","lastname":"Smith","password":"StudentPass456!","firstname":"Bob","instituteid":"institute-uuid-here","departmentId":"cs-department-uuid","Registration_number":"CS/2024/002"}]}'
Request example
Register multiple students with academic details
{
"students": [
{
"role": "STUDENT",
"email": "alice.johnson@student.edu",
"phone": "+254712345684",
"cohortId": "cohort-2024-uuid",
"lastname": "Johnson",
"password": "StudentPass123!",
"firstname": "Alice",
"instituteid": "institute-uuid-here",
"departmentId": "cs-department-uuid",
"Registration_number": "CS/2024/001"
},
{
"role": "STUDENT",
"email": "bob.smith@student.edu",
"phone": "+254712345685",
"cohortId": "cohort-2024-uuid",
"lastname": "Smith",
"password": "StudentPass456!",
"firstname": "Bob",
"instituteid": "institute-uuid-here",
"departmentId": "cs-department-uuid",
"Registration_number": "CS/2024/002"
}
]
}
Response examples (201)
{
"message": "Batch student registration completed",
"results": [
{
"status": "success",
"userId": "student-uuid-1",
"registrationNumber": "CS/2024/001"
},
{
"status": "success",
"userId": "student-uuid-2",
"registrationNumber": "CS/2024/002"
}
],
"failureCount": 0,
"successCount": 2
}
Response examples (400)
{
"error": "Bad Request",
"message": "Duplicate registration numbers found in batch",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 401
}
Response examples (403)
{
"error": "Forbidden",
"message": "Insufficient permissions for batch operations",
"statusCode": 403
}