curl --request POST \
--url http://localhost:5000/api/attendance/mark \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT"
}'
{
"_id": "64c9a3b7d2e1f0a987654321",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT",
"__v": 0
}
Attendance
Mark attendance
Record a student attendance entry for a given date and status.
POST
/
api
/
attendance
/
mark
curl --request POST \
--url http://localhost:5000/api/attendance/mark \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT"
}'
{
"_id": "64c9a3b7d2e1f0a987654321",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT",
"__v": 0
}
Creates a new attendance record for a student. Pass the student’s MongoDB ObjectId, the date of attendance, and the attendance status.
This endpoint requires no authentication.
Request
Body parameters
The MongoDB ObjectId of the student. Must be a valid 24-character hex string.
The date of the attendance record in ISO 8601 format (e.g.,
2026-03-18T00:00:00.000Z).The attendance status for the student. Accepted values:
PRESENT, ABSENT, LATE.Response
Returns the created attendance document.The MongoDB ObjectId of the newly created attendance record.
The MongoDB ObjectId of the student.
The attendance date in ISO 8601 format.
The recorded attendance status.
Mongoose internal version key.
curl --request POST \
--url http://localhost:5000/api/attendance/mark \
--header 'Content-Type: application/json' \
--data '{
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT"
}'
{
"_id": "64c9a3b7d2e1f0a987654321",
"studentId": "64b8f1a2c3d4e5f678901234",
"date": "2026-03-18T00:00:00.000Z",
"status": "PRESENT",
"__v": 0
}
⌘I