Skip to main content
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
}

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.

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

studentId
string
required
The MongoDB ObjectId of the student. Must be a valid 24-character hex string.
date
string
required
The date of the attendance record in ISO 8601 format (e.g., 2026-03-18T00:00:00.000Z).
status
string
required
The attendance status for the student. Accepted values: PRESENT, ABSENT, LATE.

Response

Returns the created attendance document.
_id
string
The MongoDB ObjectId of the newly created 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.
__v
number
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
}

Build docs developers (and LLMs) love