Update Session Attendance
Marks or updates student attendance for one session. Put the session's `attendance_id` in the URL and send one row per student.
POST
/class/attendance/{attendance_Id}Update Session Attendance
curl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/class/attendance/{attendance_Id}' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"records":[[91328216,1,""],[91409337,1,""]],"send_sms":0,"individual_batch_attendance":0,"master_batch_id":150138}'{
"code": 200,
"message": "Attendance Taken",
"instant": true
}Access: Institute admins, tutors, students and parents, plus custom roles that can sign in to sessions or manage mentoring sessions. The session must belong to a class in your organizations, or one you teach or created.
Request body: form-data with one field, JSONString, containing this JSON:
Path parameters
The session.
Body
JSONStringOne row per student, each an array
[student_id, status, remarks] (fields below).send_notificationinteger
0 stops the absence notification. Default 1.Fields in each records row (by position):
| Name | Required | Type | Description |
|---|---|---|---|
| 0: student_id | Yes | integer | The student's user ID. |
| 1: status | Yes | integer | -1 Not marked yet, 0 Absent, 1 Present, 2 Late, 3 Excused, 4 Leave, 5 Not applicable. |
| 2: remarks | Yes | string | A note, or "". |
Example:
{"records": [[101234, 1, ""], [101235, 0, "Absent without notice"], [101236, 2, "Came 10 mins late"]], "send_notification": 1}
Notes:
- Only rows whose status or remarks changed are written. Students you leave out keep their current status.
- Students marked Absent are notified (and, by your settings, their parents), unless
send_notificationis0. - For batches with common (not per-subject) attendance, the same records are applied to the offline sessions of all the batch's subjects at that time.
- If the session uses Zoom threshold attendance and that processing hasn't finished, the request fails: "Attendance threshold processing for this session is still in progress...".
- Fails with code
25001"Invalid Attendance ID" if the session isn't found or isn't yours. Rate limit: 100 requests per minute; going over locks you out for 30 minutes.