# Attendance

Per-session attendance rosters and marks.

Generated from `apps/api/openapi.json`. HTML version: https://docs.institflow.com/en/reference/attendance

5 operations.

## GET /api/v1/groups/{id}/attendance/summary

Per-student attendance rates and totals for one group, sorted by rate ascending.

- Operation id: `GroupAttendanceController_getSummary_v1`
- Permission: `attendance.read`
- Auth: credential required
- `Idempotency-Key`: not required

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
| `from` | query | string (date) | no |  |
| `to` | query | string (date) | no |  |

### Responses

**200** — Success.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `groupId` | string (uuid) | yes |  |
| `from` | string (date) | yes |  |
| `to` | string (date) | yes |  |
| `students` | array<object> | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X GET "https://your-institute.example/api/v1/groups/37386ae0-3738-7738-8386-37386ae03738/attendance/summary" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY"
```

## GET /api/v1/me/attendance

Self attendance (student) or one linked child’s attendance (guardian, via `?studentId`).

- Operation id: `MeAttendanceController_getMe_v1`
- Permission: —
- Auth: credential required
- `Idempotency-Key`: not required

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | query | string | no |  |
| `limit` | query | integer | no | 1–100 · default: 25 |
| `from` | query | string (date) | no |  |
| `to` | query | string (date) | no |  |
| `studentId` | query | string (uuid) | no |  |

### Responses

**200** — Success.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `data` | array<object> | yes |  |
| `nextCursor` | string \| null | yes |  |
| `rate` | object | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X GET "https://your-institute.example/api/v1/me/attendance" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY"
```

## GET /api/v1/sessions/{id}/attendance

Roster for one session: every actively-enrolled student, merged with any existing attendance records.

- Operation id: `SessionAttendanceController_getRoster_v1`
- Permission: `attendance.read`
- Auth: credential required
- `Idempotency-Key`: not required

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

**200** — Success.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `sessionId` | string (uuid) | yes |  |
| `groupId` | string (uuid) | yes |  |
| `scheduledStart` | string (date-time) | yes |  |
| `status` | enum: "scheduled" \| "held" \| "cancelled" | yes |  |
| `entries` | array<object> | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X GET "https://your-institute.example/api/v1/sessions/37386ae0-3738-7738-8386-37386ae03738/attendance" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY"
```

## PUT /api/v1/sessions/{id}/attendance

Bulk upsert one session’s attendance. Marks the session held; idempotent (re-PUT updates statuses).

- Operation id: `SessionAttendanceController_markAttendance_v1`
- Permission: `attendance.mark`
- Auth: credential required
- `Idempotency-Key`: required for API-key callers

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `entries` | array<object> | yes |  |

```json
{
  "entries": [
    {
      "studentId": "a4a70332-a4a7-74a7-8a70-a4a70332a4a7",
      "status": "present",
      "minutesLate": 0,
      "note": "string"
    }
  ]
}
```

### Responses

**200** — Success.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `sessionId` | string (uuid) | yes |  |
| `groupId` | string (uuid) | yes |  |
| `scheduledStart` | string (date-time) | yes |  |
| `status` | enum: "scheduled" \| "held" \| "cancelled" | yes |  |
| `entries` | array<object> | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X PUT "https://your-institute.example/api/v1/sessions/37386ae0-3738-7738-8386-37386ae03738/attendance" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "entries": [
      {
        "studentId": "a4a70332-a4a7-74a7-8a70-a4a70332a4a7",
        "status": "present",
        "minutesLate": 0,
        "note": "string"
      }
    ]
  }'
```

## GET /api/v1/students/{id}/attendance

One student’s attendance history (cursor-paginated) plus rate summary.

- Operation id: `StudentAttendanceController_getHistory_v1`
- Permission: `attendance.read`
- Auth: credential required
- `Idempotency-Key`: not required

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |
| `cursor` | query | string | no |  |
| `limit` | query | integer | no | 1–100 · default: 25 |
| `from` | query | string (date) | no |  |
| `to` | query | string (date) | no |  |

### Responses

**200** — Success.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `data` | array<object> | yes |  |
| `nextCursor` | string \| null | yes |  |
| `rate` | object | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X GET "https://your-institute.example/api/v1/students/37386ae0-3738-7738-8386-37386ae03738/attendance" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY"
```
