Skip to main content
GET
/
api
/
attendance
/
student
/
{id}
curl --request GET \
  --url http://localhost:5000/api/attendance/student/64b8f1a2c3d4e5f678901234
[
  {
    "_id": "64c9a3b7d2e1f0a987654321",
    "studentId": "64b8f1a2c3d4e5f678901234",
    "date": "2026-03-18T00:00:00.000Z",
    "status": "PRESENT",
    "__v": 0
  },
  {
    "_id": "64c9a3b7d2e1f0a987654322",
    "studentId": "64b8f1a2c3d4e5f678901234",
    "date": "2026-03-17T00:00:00.000Z",
    "status": "LATE",
    "__v": 0
  },
  {
    "_id": "64c9a3b7d2e1f0a987654323",
    "studentId": "64b8f1a2c3d4e5f678901234",
    "date": "2026-03-16T00:00:00.000Z",
    "status": "ABSENT",
    "__v": 0
  }
]

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/praveenarya123/sps-backend/llms.txt

Use this file to discover all available pages before exploring further.

Returns all attendance records associated with a given student ID. Records are returned in the order they were inserted.
This endpoint requires no authentication.

Request

Path parameters

id
string
required
The MongoDB ObjectId of the student whose attendance records you want to retrieve. Must be a valid 24-character hex string.

Response

Returns an array of attendance record objects. Returns an empty array if no records exist for the given student.
_id
string
The MongoDB ObjectId of the attendance record.
studentId
string
The MongoDB ObjectId of the student.
date
string
The attendance date in ISO 8601 format.
status
string
The recorded attendance status (e.g., PRESENT, ABSENT, LATE).
__v
number
Mongoose internal version key.
curl --request GET \
  --url http://localhost:5000/api/attendance/student/64b8f1a2c3d4e5f678901234
[
  {
    "_id": "64c9a3b7d2e1f0a987654321",
    "studentId": "64b8f1a2c3d4e5f678901234",
    "date": "2026-03-18T00:00:00.000Z",
    "status": "PRESENT",
    "__v": 0
  },
  {
    "_id": "64c9a3b7d2e1f0a987654322",
    "studentId": "64b8f1a2c3d4e5f678901234",
    "date": "2026-03-17T00:00:00.000Z",
    "status": "LATE",
    "__v": 0
  },
  {
    "_id": "64c9a3b7d2e1f0a987654323",
    "studentId": "64b8f1a2c3d4e5f678901234",
    "date": "2026-03-16T00:00:00.000Z",
    "status": "ABSENT",
    "__v": 0
  }
]

Build docs developers (and LLMs) love