---
title: "Update an existing attendance code"
method: PATCH
path: "/Attendance/Codes"
tags: ["Attendance"]
---

# Update an existing attendance code

`PATCH /Attendance/Codes`

**Requires permissions:** *AcademicStaff* or *AcademicSupport* or *StudentFacing*

## Request body

- PatchAttendanceCodeRequest
  - `code` AttendanceCode
    - `attendanceCodeId` string, guid, nullable
    - `code` string
    - `description` string
    - `category` string
    - `eventType` string, nullable
    - `session` string, nullable
    - `order` integer, nullable
    - `display` boolean, nullable
    - `archived` boolean
    - `showInAbsenceOffex` boolean
    - `isAbsent` boolean
    - `isPresent` boolean
    - `isLate` boolean
    - `isUnauthorised` boolean

## Response `200`

Success - Updated attendance code

- PatchAttendanceCodeResponse
  - `code` AttendanceCode
    - `attendanceCodeId` string, guid, nullable
    - `code` string
    - `description` string
    - `category` string
    - `eventType` string, nullable
    - `session` string, nullable
    - `order` integer, nullable
    - `display` boolean, nullable
    - `archived` boolean
    - `showInAbsenceOffex` boolean
    - `isAbsent` boolean
    - `isPresent` boolean
    - `isLate` boolean
    - `isUnauthorised` boolean

## Other responses

- `400` — An Error Occurred - Could not update attendance code
- `401` — Unauthorized
- `403` — Forbidden
- `404` — An Error Occurred - Could not find attendance code

---

[API](https://skmtc.net/tonbridge/apis/tonbridge-app-api.md) · [All operations](https://skmtc.net/tonbridge/apis/tonbridge-app-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tonbridge/tonbridge-app-api/versions/fab57bf5558a/schema)
