> For the complete documentation index, see [llms.txt](https://guide.fariaedu.com/integrations-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.fariaedu.com/integrations-portal/managebac/public-rest-apis/v2/attendance.md).

# Attendance

This group describes all the APIs relating to attendance records

## Set or Update an Attendance Settings for a Class in an Academic Year

> Define the rotation slots for when and where the given class meets. This operation enables slots in the payload and disables slots not in the payload.\
> \
> While it does not delete any individual attendance records,\
> it does directly affect how class attendance records for students are counted over the given academic year.\
> For example, if absent records exist at a given slot, they will no longer be tallied when disabled.\
> \
> Note that the “Start period count from 0” setting should be ignored when forming the payload; the first slot in a day will always be \`period: 1\`.\
> There is a known incompatibility with “Get Class Timetable” endpoint that responds with periods zero- or one-indexed, depending on that setting,\
> but will be fixed in \`v2p3\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"SetAttendanceSettingsRequest":{"type":"object","required":["settings"],"properties":{"settings":{"type":"array","items":{"type":"object","required":["period","day"],"properties":{"period":{"type":"integer","description":"Attendance period number."},"day":{"type":"integer","description":"Day of the week or rotation day number."},"location":{"type":"string","description":"Lesson location."}}}}}}}},"paths":{"/v2/classes/{class_id}/academic-years/{academic_year_id}/attendance/settings":{"put":{"summary":"Set or Update an Attendance Settings for a Class in an Academic Year","operationId":"SetAttendanceSettings","tags":["Attendance"],"description":"Define the rotation slots for when and where the given class meets. This operation enables slots in the payload and disables slots not in the payload.\n\nWhile it does not delete any individual attendance records,\nit does directly affect how class attendance records for students are counted over the given academic year.\nFor example, if absent records exist at a given slot, they will no longer be tallied when disabled.\n\nNote that the “Start period count from 0” setting should be ignored when forming the payload; the first slot in a day will always be `period: 1`.\nThere is a known incompatibility with “Get Class Timetable” endpoint that responds with periods zero- or one-indexed, depending on that setting,\nbut will be fixed in `v2p3`.\n","parameters":[{"name":"class_id","in":"path","description":"Unique identifier for class","required":true,"schema":{"type":"integer"}},{"name":"academic_year_id","in":"path","description":"Academic Year (Term Set) ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAttendanceSettingsRequest"}}},"required":true,"description":"Attendance settings payload"}}}}}
```

## Get Attendance Categories

> Retrieves the Attendance Categories configured for a given Academic Year. Categories define the possible\
> attendance statuses (e.g. Present, Absent, Late) and their display properties such as abbreviation and color.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AttendanceCategoriesResponse":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","nullable":true},"status":{"type":"integer"},"label":{"type":"string"},"abbreviation":{"type":"string"},"enabled":{"type":"boolean","nullable":true},"color_code":{"type":"string"}}}}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"Record was not found"}}}}},"paths":{"/v2/school/academic-years/{academic_year_id}/attendance_categories":{"get":{"summary":"Get Attendance Categories","operationId":"listCategories","tags":["Attendance"],"description":"Retrieves the Attendance Categories configured for a given Academic Year. Categories define the possible\nattendance statuses (e.g. Present, Absent, Late) and their display properties such as abbreviation and color.\n","parameters":[{"name":"academic_year_id","in":"path","description":"Academic Year ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/AttendanceCategoriesResponse"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Get Class timetable

> This endpoint retrieves a class timetable specified by class ID.\
> \
> Note that the \`period\_starts\_count\_from\` response field available in earlier API versions has been removed in v2p3. Periods are now always 1-indexed.\
> \
> The response is organized by academic year and includes all timetable slots\
> with their day, period, location, and enabled status. Custom periods (e.g. Lunch)\
> are excluded from the slot listing.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2/classes/{class_id}/timetable":{"get":{"summary":"Get Class timetable","operationId":"getClassTimetable","tags":["Attendance"],"description":"This endpoint retrieves a class timetable specified by class ID.\n\nNote that the `period_starts_count_from` response field available in earlier API versions has been removed in v2p3. Periods are now always 1-indexed.\n\nThe response is organized by academic year and includes all timetable slots\nwith their day, period, location, and enabled status. Custom periods (e.g. Lunch)\nare excluded from the slot listing.\n","parameters":[{"name":"class_id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}},{"name":"include_disabled","in":"query","description":"Configure response to include or exclude disabled slots.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Get Attendance for a Class during an Academic Term

> Retrieves summary attendance data for all students within a class for an academic term.\
> Returns each student's attendance totals broken down by status (Present, Absent, Late)\
> and by attendance category. Also returns timetable configuration for period numbering.\
> Supports filtering by archived student status and specific student IDs.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2/classes/{id}/attendance/term/{term_id}":{"get":{"summary":"Get Attendance for a Class during an Academic Term","operationId":"getAttendanceForClass","tags":["Attendance"],"description":"Retrieves summary attendance data for all students within a class for an academic term.\nReturns each student's attendance totals broken down by status (Present, Absent, Late)\nand by attendance category. Also returns timetable configuration for period numbering.\nSupports filtering by archived student status and specific student IDs.\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}},{"name":"term_id","in":"path","description":"Unique identifier for academic term.","required":true,"schema":{"type":"integer"}},{"name":"archived_students","in":"query","description":"Filter students by archived status","required":false,"schema":{"type":"boolean","default":false}},{"name":"student_ids","in":"query","required":false,"description":"List of student ids. Accepts repeated params or a comma-separated string.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Get Class Attendance for a Date

> Retrieves per-period attendance data for all students in a class on a specific date.\
> The date must fall within the class's start and end term dates. Each student's attendance\
> is returned as a sparse object keyed by period number, containing the status, note, and\
> category for each recorded period. Non-working days and future dates return empty attendance.\
> For further information, see \[the help article]\(<https://faria.managebac.com/help/articles/360018804292>).<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2/classes/{id}/attendance/date/{date}":{"get":{"summary":"Get Class Attendance for a Date","operationId":"getClassAttendanceForDate","tags":["Attendance"],"description":"Retrieves per-period attendance data for all students in a class on a specific date.\nThe date must fall within the class's start and end term dates. Each student's attendance\nis returned as a sparse object keyed by period number, containing the status, note, and\ncategory for each recorded period. Non-working days and future dates return empty attendance.\nFor further information, see [the help article](https://faria.managebac.com/help/articles/360018804292).\n","parameters":[{"name":"id","in":"path","description":"Unique identifier for class.","required":true,"schema":{"type":"integer"}},{"name":"date","in":"path","description":"A date string to define required day as yyyy-mm-dd.","required":true,"schema":{"type":"string"}},{"name":"student_ids","in":"query","required":false,"description":"List of student ids. Accepts repeated params or a comma-separated string.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Get all Attendance Excusals for a date

> Retrieves all attendance excusals submitted by parents for a given date. An excusal is returned if the\
> date falls within its start and end date range (accounting for multi-day durations). Responses include\
> the student, parent, date range, duration, and the comment provided by the parent.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AttendanceExcusalsResponse":{"type":"object","properties":{"excusals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for the excusal."},"student_id":{"type":"integer","description":"Unique ID for the student."},"parent_id":{"type":"integer","description":"Unique ID for the parent."},"start_date":{"type":"string","format":"date","description":"Start date of the excusal."},"end_date":{"type":"string","format":"date","description":"End date of the excusal."},"duration":{"type":"integer","description":"Duration of the excusal in days."},"comment":{"type":"string","description":"Comment or reason for the excusal."},"created_at":{"type":"string","description":"Created datetime."},"updated_at":{"type":"string","description":"Updated datetime."}}}}}},"Meta":{"type":"object","description":"Pagination metadata included in all list (index) responses.","properties":{"current_page":{"type":"integer","description":"The page number of the current result set, starting from 1."},"total_pages":{"type":"integer","description":"The total number of pages available for this query."},"total_count":{"type":"integer","description":"The total number of records matching the query across all pages."},"per_page":{"type":"integer","description":"The number of records returned per page. Defaults to 100; can be overridden with the per_page query parameter (max 200)."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}}}},"paths":{"/v2/students/excusals/{date}":{"get":{"summary":"Get all Attendance Excusals for a date","operationId":"getDateExcusals","tags":["Attendance"],"description":"Retrieves all attendance excusals submitted by parents for a given date. An excusal is returned if the\ndate falls within its start and end date range (accounting for multi-day durations). Responses include\nthe student, parent, date range, duration, and the comment provided by the parent.\n","parameters":[{"name":"date","in":"path","description":"A date string to define required day as yyyy-mm-dd.","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"An integer defining which page to display.","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"An integer defining the number of records to display per page.","required":false,"schema":{"type":"string"}},{"name":"student_ids","in":"query","required":false,"description":"List of student ids. Accepts repeated params or a comma-separated string.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"excusals":{"type":"array","items":{"$ref":"#/components/schemas/AttendanceExcusalsResponse"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}}}}}}}
```

## Get Homeroom Attendance for a Year Group and Term

> Retrieves aggregated homeroom attendance counts for all students in a year group over a given academic term.\
> Each student's response includes a breakdown by attendance status (Present, Absent, Late) and\
> detailed counts per attendance category.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2/year-groups/{year_group_id}/homeroom/attendance/term/{term_id}":{"get":{"summary":"Get Homeroom Attendance for a Year Group and Term","operationId":"getAttendanceForYearGroupByTerm","tags":["Attendance"],"description":"Retrieves aggregated homeroom attendance counts for all students in a year group over a given academic term.\nEach student's response includes a breakdown by attendance status (Present, Absent, Late) and\ndetailed counts per attendance category.\n","parameters":[{"name":"year_group_id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}},{"name":"term_id","in":"path","description":"Unique identifier for academic term.","required":true,"schema":{"type":"integer"}},{"name":"archived_students","in":"query","description":"Filter students by archived status","required":false,"schema":{"type":"boolean","default":false}},{"name":"student_ids","in":"query","required":false,"description":"List of student ids. Accepts repeated params or a comma-separated string.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Get Homeroom Attendance for a Year Group by Date

> Retrieves per-student homeroom attendance for a year group on a specific date. Each student's response\
> includes their attendance status, any notes recorded by the teacher, and the attendance category.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2/year-groups/{year_group_id}/homeroom/attendance/date/{date}":{"get":{"summary":"Get Homeroom Attendance for a Year Group by Date","operationId":"getAttendanceForYearGroupByDate","tags":["Attendance"],"description":"Retrieves per-student homeroom attendance for a year group on a specific date. Each student's response\nincludes their attendance status, any notes recorded by the teacher, and the attendance category.\n","parameters":[{"name":"year_group_id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}},{"name":"date","in":"path","description":"A date string","required":true,"schema":{"type":"string"}},{"name":"student_ids","in":"query","required":false,"description":"List of student ids. Accepts repeated params or a comma-separated string.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Get Homeroom Attendance Adjustments for a Year Group and Term

> Retrieves attendance adjustments for all students in a year group for a given academic term.\
> Adjustments are manual corrections to attendance counts (e.g. adding or subtracting days)\
> made by administrators to reflect circumstances not captured by daily attendance records.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}}},"paths":{"/v2/year-groups/{year_group_id}/homeroom/attendance/term/{term_id}/adjustments":{"get":{"summary":"Get Homeroom Attendance Adjustments for a Year Group and Term","operationId":"getAttendanceAdjustmentsForYearGroupByTerm","tags":["Attendance"],"description":"Retrieves attendance adjustments for all students in a year group for a given academic term.\nAdjustments are manual corrections to attendance counts (e.g. adding or subtracting days)\nmade by administrators to reflect circumstances not captured by daily attendance records.\n","parameters":[{"name":"year_group_id","in":"path","description":"Unique identifier for year group.","required":true,"schema":{"type":"integer"}},{"name":"term_id","in":"path","description":"Unique identifier for academic term.","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}}}}
```

## Get all Attendance Excusals for a student

> Retrieves all attendance excusals submitted by a parent for a specific student. Optionally filter\
> by a date to return only excusals whose date range includes that day. Responses include the excusal\
> date range, duration, parent who submitted it, and the comment.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AttendanceExcusalsResponse":{"type":"object","properties":{"excusals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for the excusal."},"student_id":{"type":"integer","description":"Unique ID for the student."},"parent_id":{"type":"integer","description":"Unique ID for the parent."},"start_date":{"type":"string","format":"date","description":"Start date of the excusal."},"end_date":{"type":"string","format":"date","description":"End date of the excusal."},"duration":{"type":"integer","description":"Duration of the excusal in days."},"comment":{"type":"string","description":"Comment or reason for the excusal."},"created_at":{"type":"string","description":"Created datetime."},"updated_at":{"type":"string","description":"Updated datetime."}}}}}},"Meta":{"type":"object","description":"Pagination metadata included in all list (index) responses.","properties":{"current_page":{"type":"integer","description":"The page number of the current result set, starting from 1."},"total_pages":{"type":"integer","description":"The total number of pages available for this query."},"total_count":{"type":"integer","description":"The total number of records matching the query across all pages."},"per_page":{"type":"integer","description":"The number of records returned per page. Defaults to 100; can be overridden with the per_page query parameter (max 200)."}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"Record was not found"}}}}},"paths":{"/v2/students/{student_id}/excusals":{"get":{"summary":"Get all Attendance Excusals for a student","operationId":"getStudentExcusals","tags":["Attendance"],"description":"Retrieves all attendance excusals submitted by a parent for a specific student. Optionally filter\nby a date to return only excusals whose date range includes that day. Responses include the excusal\ndate range, duration, parent who submitted it, and the comment.\n","parameters":[{"name":"student_id","in":"path","description":"Unique identifier for a student.","schema":{"type":"integer"},"required":true},{"name":"applies_on","in":"query","description":"A date string to define required day as yyyy-mm-dd.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"An integer defining which page to display.","required":false,"schema":{"type":"string"}},{"name":"per_page","in":"query","description":"An integer defining the number of records to display per page.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"excusals":{"type":"array","items":{"$ref":"#/components/schemas/AttendanceExcusalsResponse"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Create Excusal for a Student

> Creates an attendance excusal for a student on behalf of a parent. The parent must be linked\
> to the student via a relationship. The excusal date range must not overlap with any existing\
> excusal for the same student, and the duration must be between 1 and 12 days.<br>

```json
{"openapi":"3.0.3","info":{"title":"API V2","version":"v2"},"tags":[{"name":"Attendance","description":"This group describes all the APIs relating to attendance records"}],"servers":[{"url":"https://api.managebac.com","description":"CA ManageBac API server."},{"url":"https://api.managebac.cn","description":"CN ManageBac API server."},{"url":"https://api.us.managebac.com","description":"US1 ManageBac API server."},{"url":"https://api.managebac.us","description":"US2 ManageBac API server."},{"url":"https://api.managebactest.com","description":"UAT ManageBac API server."},{"url":"https://{Host}","variables":{"Host":{"default":"api.devel.managebac.com","enum":["api.devel.managebac.com","api-faria.devel.managebac.com","api.managebac.dev"]}}}],"security":[{"bearerAuth":[]},{"authTokenQuery":[]},{"authTokenHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 Bearer token obtained via client credentials grant. Pass the token in the Authorization header as `Bearer <token>`."},"authTokenQuery":{"type":"apiKey","name":"auth_token","in":"query","description":"Your V2 API authentication token may be passed in the parameters. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."},"authTokenHeader":{"type":"apiKey","name":"auth-token","in":"header","description":"Your V2 API authentication token may be passed in the header. To protect your key, use [environment variables](https://cloud.google.com/docs/authentication/api-keys#securing_an_api_key)."}},"schemas":{"AttendanceExcusalsResponse":{"type":"object","properties":{"excusals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Unique ID for the excusal."},"student_id":{"type":"integer","description":"Unique ID for the student."},"parent_id":{"type":"integer","description":"Unique ID for the parent."},"start_date":{"type":"string","format":"date","description":"Start date of the excusal."},"end_date":{"type":"string","format":"date","description":"End date of the excusal."},"duration":{"type":"integer","description":"Duration of the excusal in days."},"comment":{"type":"string","description":"Comment or reason for the excusal."},"created_at":{"type":"string","description":"Created datetime."},"updated_at":{"type":"string","description":"Updated datetime."}}}}}},"AccessDeniedError":{"type":"object","description":"Returned when the API token is missing, invalid, or has been disabled.","properties":{"error":{"type":"string","description":"Unauthorized to perform an action"}}},"NotFound":{"type":"object","description":"Returned when the requested resource cannot be found by the given ID.","properties":{"error":{"type":"string","description":"Record was not found"}}},"CreateAttendanceExcusalRequest":{"type":"object","properties":{"excusal":{"type":"object","properties":{"parent_id":{"type":"integer","description":"Unique ID for the parent."},"start_date":{"type":"string","format":"date","description":"Start date of the excusal."},"end_date":{"type":"string","format":"date","description":"End date of the excusal."},"comment":{"type":"string","description":"Comment or reason for the excusal."}}}}}}},"paths":{"/v2/students/{student_id}/excusals":{"post":{"summary":"Create Excusal for a Student","operationId":"createStudentExcusal","tags":["Attendance"],"description":"Creates an attendance excusal for a student on behalf of a parent. The parent must be linked\nto the student via a relationship. The excusal date range must not overlap with any existing\nexcusal for the same student, and the duration must be between 1 and 12 days.\n","parameters":[{"name":"student_id","in":"path","description":"Unique identifier for a student.","schema":{"type":"integer"},"required":true}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttendanceExcusalsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessDeniedError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"errors":{"type":"object","properties":{"parent_id":{"type":"array","items":{"type":"string"}}},"required":["parent_id"]}}},{"type":"object","properties":{"errors":{"type":"object","properties":{"duration":{"type":"array","items":{"type":"string"}}},"required":["duration"]}}}]}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttendanceExcusalRequest"}}}}}}}}
```
