Docs home

Remove Student from Enrolled Course

Removes a learner from a course they are enrolled in: cancels the enrollment and takes them out of the course's batches. Use it when a learner drops out or a refund is processed elsewhere.

POST/bundle/student/remove
Remove Student from Enrolled Course
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/bundle/student/remove' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={
  "student_id": 38311827,
  "bundle_id": 12477,
  "academic_year": 4,
  "institution_id": <institutionId>,
  "enrollment_id": 352096
}'
{
  "code": 200,
  "message": "Success"
}

Access: Institute admins, admins and tutors, plus custom roles that can manage learners.

Request body: form-data with one field, JSONString, containing this JSON:

BodyJSONString
student_idintegerrequired
The learner's user ID.
bundle_idintegerrequired
The course the learner is enrolled in (package_id in the learner's purchase list).
enrollment_idintegerrequired
The enrollment to cancel (enrollment_id in the learner's purchase list).
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success

Notes:

  • The enrollment is marked cancelled and the learner is archived from all batches of that course and from its batch communities.
  • Unpaid instalment invoices for the enrollment are deleted (only when an institute admin or a custom role makes the call). Paid invoices and recorded payments are kept.
  • If enrollment_id and student_id don't match an enrollment, nothing changes and the call still returns "Success".
  • Rate limit: 100 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI