Records

Read, create and correct individual attendance records.

ProposedNot yet callable

This documents a design under review. Endpoints, payloads and field names may change before release.

List records

GET /v1/attendance?from=2026-07-01&to=2026-07-19&course_code=CS101
ParameterTypeNotes
from, todateYYYY-MM-DD, inclusive. Defaults to the last 7 days.
course_codestringFilter to one course.
session_idstringFilter to one session.
student_idstringOnetap student id.
external_idstringYour identifier for the student.
statusenumpresent | late | absent | excused
limitinteger1–200. Defaults to 50.
cursorstringOpaque cursor from the previous page.

Retrieve a record

GET /v1/attendance/att_7d3e91

Returns the full record including its correction history — useful when an audit asks who changed a mark and when.

{
  "id": "att_7d3e91",
  "status": "present",
  "recorded_at": "2026-07-19T09:14:58Z",
  "method": "device",
  "student": { "id": "stu_2a77c1", "external_id": "2024CS118", "name": "Priya Nair" },
  "session": { "id": "ses_55ab20", "course_code": "CS101", "room": "Block C / 204" },
  "device": { "id": "dev_r2_0091", "model": "R2" },
  "history": [
    {
      "at": "2026-07-19T11:02:10Z",
      "from": "absent",
      "to": "present",
      "reason": "Late arrival confirmed by faculty",
      "actor": { "type": "user", "id": "usr_31a9", "name": "R. Menon" }
    }
  ]
}

Create a record

Records captured by a device are authoritative. Writes exist for the cases hardware cannot see: a field trip, an exam in another building, a student the reader missed.

POST /v1/attendance
Authorization: Bearer sk_live_...
Idempotency-Key: roll-2026-07-19-CS101-2024CS118

{
  "session_id": "ses_55ab20",
  "external_id": "2024CS118",
  "status": "excused",
  "reason": "Inter-college sports fixture"
}

Send an Idempotency-Key on every write. Retrying a request with the same key returns the original result instead of double-marking a student. Build the key from something stable — session and student, as above — not a random value per attempt.

Correct a record

Corrections are a PATCH and always require a reason. The reason lands in history and in the attendance.updated webhook, so your system and ours agree on why a mark moved.

PATCH /v1/attendance/att_7d3e91

{ "status": "present", "reason": "Late arrival confirmed by faculty" }

Records are never destroyed by a correction. The previous value stays in history permanently.