v1

latestOpenAPI 3.0.02026-07-14800227.2 KB
Attendance

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."

put/attendances/{attendanceId}

Path parameters

attendanceIdstring required
Example:60a2db290da29e126a18789a

The _id of the attendance entry to update.

Headers

Authorizationstring required
Example:Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5rZW5qby5pbyIsInN1YiI6IjYwZjBhOTE2MjE0OTg3MjU2YmU5YzhmZiIsImF1ZCI6Imh0dHBzOi8vYXBpLmtlbmpvLmlvIiwiaWF0IjoxNjI2Mzg1MTE1LCJuYmYiOjE2MjYzODUxMTUsImV4cCI6MTYyNjU1NzkxNSwiYWNjZXNzVHlwZSI6IkFwaUFjY2VzcyIsInNfb3JnSWQiOiI2MGYwNGVhN2RmN2JhMjFlY2U0YmYzYzIifQ.cxG_7dIS-VbmDXdJuLkekoyuyCIzQG2fMcgc0nkfbWE8cihhcb5FnALbQkjU9b5-qVcEoMHZlSuUA-jMEBMMVQ

A valid bearer token.

Request body

startTimestring

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

endTimestring

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.

isOvernightShiftboolean

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.

commentstring

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

Example request

{
  "startTime": "10:00:00",
  "endTime": "10:00:00",
  "breaks": [
    {
      "start": "11:00:00",
      "end": "11:30:00"
    }
  ],
  "comment": "Morning working attendance tracking."
}

Response

OK

_idstring

The _id of the requested attendance entry.

userIdstring

The id of the employee associated to the requested attendance entry.

emailstring

The email of the employee associated to the requested attendance entry.

externalIdstring

The external Id of the employee associated to the requested attendance entry.

startTimestring

The start date time of the requested attendance entry.

endTimestring

The end date time of the requested attendance entry.

breakTimenumber

DEPRECATED field, use the 'breaks' field to specify the breaktime. The time in minutes to indicate a break of time. It cannot be greater than the total of minutes reported for the attendance entry.

paidBreakTimenumber

Number of minutes of paid break time. If there is no 'paidBreakTime' this field will not be in the response. This value is the sum of the total time of paid breaks, which can be configured in the settings of the attendance policy.

commentstring

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

Example response

{
  "paidBreakTime": 30
}