Updates the attendance entry specified by attendanceId. Only the fields sent in the body are updated.
Overnight: When updating endTime to a time on the next calendar day (e.g. changing an open entry to close at 06:00 next day), send endTime = 06:00:00 and isOvernightShift = true. For overnight shifts, endTime cannot be later than 18:00; otherwise the API returns 400 with message "For overnight shifts, end time cannot be later than 18:00."
Same-day rule: When isOvernightShift is not set or is false, endTime must be after startTime (same calendar day). If you send an end time earlier than start time (e.g. 22:00 start and 06:00 end) without isOvernightShift = true, the API returns 400 with message "When isOvernightShift is not set, endTime must be after startTime. For shifts that end the next day, set isOvernightShift to true."
Categories: Send attendanceCategoryId and attendanceSubCategoryId with the ids returned by GET /attendances/categories. The same rules and error messages as when creating an entry apply to the category and sub category the entry ends up with. A field you do not send keeps the entry's value, so updating other fields (e.g. only endTime) never changes the categories.
- attendanceCategoryId =
nullremoves the category and its sub category. - attendanceSubCategoryId =
nullremoves only the sub category, and only when the category has no active sub categories. Otherwise the API returns 400: send another sub category, or attendanceCategoryId =nullto remove both. - If attendanceCategoryId changes and attendanceSubCategoryId is not sent, the entry's sub category is removed, so the new category must have no active sub categories.
- attendanceSubCategoryId sent alone changes the sub category within the entry's current category. An entry without a category needs attendanceCategoryId too (400 otherwise).
- If the category and sub category stay the ones the entry already has, they are not validated again, even if they were deactivated or deleted afterwards. When only the sub category changes, the new sub category is fully validated, but the entry's category is accepted even if it was deactivated.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
401UNAUTHORIZED. The Authorization header is incorrect, not provided or the token expired.
