Update an attendance for a given attendance id.

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 = null removes the category and its sub category.
  • attendanceSubCategoryId = null removes 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 = null to 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.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The _id of the attendance entry to update.

Body Params
string

The new start time of the attendance entry to update. The valid format is hh:mm:ss

string

The new end time. Format hh:mm:ss. For overnight (end time next calendar day), also set isOvernightShift to true. When isOvernightShift is true, endTime must be at or before 18:00.

boolean

Optional. When true, endTime is interpreted as the time on the next calendar day (relative to the entry's date). Use when updating an entry to close as overnight. endTime cannot be later than 18:00. Default false.

breaks
array of objects

Array that contains the breaks in detail. Rules:
- A maximum of 10 breaks can be loaded via API.
- Breaks cannot be overlapped in the same day.
- 'start' field is required.
- There is no way to update specifically a break.
- To remove 'breaks', just send an empty array in the update, something like "breaks":[]

breaks
string

Optional text to describe an attendance record (pair of startTime and endTime). The maximum number of characters is 150.

string | null

The Kenjo _id of an active attendance category without parent (GET /attendances/categories). For a sub category, send its parent here and the sub category in attendanceSubCategoryId; a category with active sub categories requires one of them. Not sent, the entry keeps its category. Changing it without sending attendanceSubCategoryId removes the entry's sub category. null removes the category and its sub category.

string | null

The Kenjo _id of an active attendance sub category whose parentCategoryId is the entry's category (the attendanceCategoryId sent, or the entry's current one when it is not sent). null removes only the sub category, allowed only when the category has no active sub categories.

Headers
string
required

A valid bearer token.

Responses

401

UNAUTHORIZED. The Authorization header is incorrect, not provided or the token expired.

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json