Add Student to Batch
Enrols one or more learners into one or more batches in a single call. Each learner is added to every class of each batch.
POST
/students/batches/addAdd Student to Batch
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/students/batches/add' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"student_ids":["studentId"],"class_ids":["classid"],"force_add":true}'{
"code": 200,
"message": "Success",
"conflicting_students": []
}Access: Institute admins.
Request body: form-data with one field, JSONString, containing this JSON:
Body
JSONStringBatch IDs (
master_batch_id) to enrol into.User IDs of the learners.
force_addinteger
1 enrols learners even if a class clashes with another class in their timetable.Notes: All or nothing: if any learner has a timetable clash and force_add is not 1, the call fails with "User could not be enrolled in one or more class due to schedule conflict." and nobody is added. Learners already in the batch are re-activated. Empty or zero IDs give "Class or student selection is missing. Please make sure both are selected before proceeding.". Learners are also added to the batch's community, if it has one. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.