Student Enrollment Expiry Set
Sets or clears the enrollment expiry date for learners in a course, either for a list of learner IDs or in bulk from a CSV file. After the expiry date the learner loses access to the course.
POST
/student/course/validity/updateStudent Enrollment Expiry Set
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/student/course/validity/update' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"student_ids":["90667848"],"bundle_id":1377,"valid_till":1716336000}'{
"code": 200,
"message": "Students course validity updated successfully!"
}Access: Institute admins and admins, plus custom roles that can manage learners.
Option 1, JSON. Request body: form-data with one field, JSONString, containing this JSON:
Body
JSONStringCourse ID.
Learners to update, up to 500. All must be actively enrolled in the course.
New expiry date.
0 removes the expiry.Option 2, CSV file. Send a file in the form-data field uploaded_file (CSV or Excel, up to 50 MB) instead of the JSON fields. Columns, in this order: Sr No. (1, 2, 3 … with no gaps), Course Bundle ID, Email, Valid Till (dd-mm-yyyy or dd/mm/yyyy; empty removes the expiry). Up to 500 rows.
Notes:
- JSON errors: "One or more students are not active/enrolled in given course!" (nothing is updated), "500 students are allowed at a time!".
- CSV: rows are checked one by one ("Email is Invalid", "Student is not active or registered in respective course", "Invalid date format…", "Invalid date cannot be before today!"). If any row has an error, nothing is updated and the error lists each problem as "Issues for Serial Number. N are - …".
- Only enrollments in your organization (
ORGID) are matched. - Rate limit: 30 requests per minute; going over locks you out for 30 minutes.