# Classes API The Classes module manages homeroom classes (not subject courses). ## Model ```json { "id": "uuid", "name": "Class 10A", "code": "10A-2024", "academic_session_id": "session-uuid", "academic_session": {...}, "grade_level_id": "grade-uuid", "grade_level": {"id": "...", "name": "Grade 10"}, "homeroom_teacher_id": "teacher-uuid", "homeroom_teacher": {...}, "facility_id": "facility-uuid", "room_id": "room-uuid", "capacity": 35, "status": "active", "team_id": "team-uuid" } ``` ## Endpoints ### Standard CRUD | Method | Endpoint | Description | |--------|----------|-------------| | POST | `/api/classes/list` | List classes | | GET | `/api/classes/:id` | Get class details | | POST | `/api/classes` | Create class | | PUT | `/api/classes/:id` | Update class | | DELETE | `/api/classes/:id` | Delete class | ### Get Enrolled Students **Endpoint:** `GET /api/classes/:id/students` **Query Parameters:** - `attendance_date` - Include attendance for date - `page`, `limit` - Pagination **Response:** ```json { "data": { "students": [ { "id": "student-uuid", "name": "John Doe", "code": "STD001", "attendance": { "status": "Present", "id": "attendance-uuid" } } ], "pagination": {...} } } ``` ### Import Classes **Endpoint:** `POST /api/classes/import` ### Import Enrollments **Endpoint:** `POST /api/classes/import-enroll` Bulk enroll students into classes from Excel. ### Export Classes **Endpoint:** `POST /api/classes/export` ## Enrollment Students enroll in classes via `StudentEnrollClass`: ```json { "student_id": "student-uuid", "class_id": "class-uuid", "enrollment_date": "2024-09-01", "status": "active" } ``` See [Student Enroll Classes API](student-enroll-classes.md) for enrollment endpoints.