Update Team Attendance
Updates the weekly attendance preferences for one or more team members. Each entry specifies a member and their day-of-week attendance status (office, home, abroad, not working). Only team administrators can update attendance.
Authentication
Requires a valid customer bearer token. The customer must be a team administrator of the specified team.
Path Parameters
Request Body
The request body is an array of attendance update objects. Each object specifies a member and one or more day-of-week attendance values.
Numeric identifier of the team member whose attendance is being updated.
Monday attendance status: 1 = Office, 2 = Home, 3 = Abroad, 4 = Not Working, 5 = Undefined.
Tuesday attendance status (same values).
Wednesday attendance status.
Thursday attendance status.
Friday attendance status.
Saturday attendance status.
Sunday attendance status.
Response
Returns HTTP 200 OK with an empty body on success.
Examples
Update attendance for two members
PUT /api/public/teams/55/attendance
Authorization: Bearer {token}
Content-Type: application/json
[
{
"CoworkerId": 101,
"MondayAttendance": 1,
"TuesdayAttendance": 1,
"WednesdayAttendance": 2,
"ThursdayAttendance": 1,
"FridayAttendance": 2,
"SaturdayAttendance": 4,
"SundayAttendance": 4
},
{
"CoworkerId": 102,
"WednesdayAttendance": 1,
"FridayAttendance": 3
}
]
Status: 200 OK
Body: (empty)
TypeScript Integration
import { endpoints } from '@/api/endpoints'
const data = Object.entries(updatedAttendance).map(([coworkerId, updates]) => ({
CoworkerId: Number(coworkerId),
...updates,
}))
await httpClient.put(endpoints.teams.attendanceUpdate(teamId), data)
Usage in Portal
| Context | Source file |
|---|
Attendance matrix editor (/team/attendance/{teamId}) | src/views/user/team/attendance/components/TeamAttendanceMatrix.tsx |
Error Responses
The customer is not authenticated or the session has expired.
The customer is not an administrator of the specified team.
Invalid request data — for example, an invalid attendance value or unknown member ID.
Team with the specified ID does not exist.
| Method | Endpoint | Description |
|---|
GET | /api/public/teams/{teamId}/attendance | Get current attendance data |
GET | /api/public/teams/{teamId}/kpi | Team KPI data |
GET | /api/public/teams/{teamId}/profile | Full team profile |
GET | /api/public/teams/my | List the customer’s teams |