Get Team Attendance
Returns the attendance matrix for a team centred on a given date. Includes per-member day-of-week attendance preferences (office, home, abroad, not working), aggregate statistics, and any bookings overlapping the requested week.
Authentication
Requires a valid customer bearer token. The customer must be a member or administrator of the specified team.
Path Parameters
Query Parameters
ISO 8601 UTC datetime specifying the week to retrieve. The API returns the full week containing this date.
Comma-separated list of field paths to include in the response. When provided, only the
specified fields are returned — useful for reducing payload size. Supports nested paths
using dot notation.
Response
Whether the authenticated customer is an administrator of this team. Used by the portal to show or hide the attendance editing UI.
Attendance
TeamAttendanceDetails
required
The attendance data object.
Attendance Details
Numeric identifier of the team.
Display name of the team.
Attendance.AvgBookedMinutesPerWeek
Average booked minutes per week across all members.
Attendance.AvgBookingsCoworkersPerDay
Average number of members with bookings per day.
Attendance.AvgCheckedinCoworkersPerDay
Average number of members checked in per day.
Attendance.AvgCheckinsDaysPerWeek
Average check-in days per week.
Attendance.Coworkers[]
Attendance.Coworkers[].CoworkerId
Numeric identifier of the member.
Attendance.Coworkers[].CoworkerFullName
Display name of the member.
Attendance.Coworkers[].CoworkerType
Member type code.
Attendance.Coworkers[].CoworkerCompanyName
Company name associated with the member, if any.
Attendance.Coworkers[].MondayAttendance
Monday attendance status: 1 = Office, 2 = Home, 3 = Abroad, 4 = Not Working, 5 = Undefined.
Attendance.Coworkers[].TuesdayAttendance
Tuesday attendance status (same values as Monday).
Attendance.Coworkers[].WednesdayAttendance
Wednesday attendance status.
Attendance.Coworkers[].ThursdayAttendance
Thursday attendance status.
Attendance.Coworkers[].FridayAttendance
Friday attendance status.
Attendance.Coworkers[].SaturdayAttendance
Saturday attendance status.
Attendance.Coworkers[].SundayAttendance
Sunday attendance status.
Attendance.Days[]
ISO 8601 date for this day.
Attendance.Days[].Bookings
Bookings on this day.
Attendance.Days[].Bookings[].Id
Booking identifier.
Attendance.Days[].Bookings[].FromTime
Booking start time.
Attendance.Days[].Bookings[].ToTime
Booking end time.
Attendance.Days[].Bookings[].ResourceId
Identifier of the booked resource.
Attendance.Days[].Bookings[].ResourceName
Name of the booked resource.
Attendance.Days[].Bookings[].CoworkerId
Customer who owns the booking, if applicable.
Examples
Fetch attendance for a week
GET /api/public/teams/55/attendance?date=2025-01-20T00:00:00.000Z
Authorization: Bearer {token}
{
"IsTeamAdministrator": true,
"Attendance": {
"TeamId": 55,
"TeamName": "Tech Innovators",
"AvgBookedMinutesPerWeek": 480,
"AvgBookingsCoworkersPerDay": 3,
"AvgCheckedinCoworkersPerDay": 5,
"AvgCheckinsDaysPerWeek": 4.2,
"Coworkers": [
{
"CoworkerId": 101,
"CoworkerFullName": "Jane Smith",
"CoworkerType": 1,
"CoworkerCompanyName": "Tech Innovators Ltd",
"MondayAttendance": 1,
"TuesdayAttendance": 1,
"WednesdayAttendance": 2,
"ThursdayAttendance": 1,
"FridayAttendance": 2,
"SaturdayAttendance": 4,
"SundayAttendance": 4
}
],
"Days": [
{
"Date": "2025-01-20T00:00:00",
"Bookings": [
{
"Id": 5001,
"FromTime": "09:00",
"ToTime": "17:00",
"ResourceId": 201,
"ResourceName": "Meeting Room A",
"CoworkerId": 101
}
]
}
]
}
}
TypeScript Integration
import { endpoints } from '@/api/endpoints'
import { TeamAttendance } from '@/types/endpoints/TeamAttandance'
import { useData } from '@/hooks/useData'
import { DateTime } from 'luxon'
const { resource: attendance } = useData<TeamAttendance>(httpClient, endpoints.teams.attendance(teamId, DateTime.now()))
Usage in Portal
| Context | Source file |
|---|
Team dashboard attendance KPIs (/dashboard/team/{teamId}) | src/views/user/dashboards/team/components/TeamAttendanceKpiSection.tsx |
Team attendance section (/team/attendance/{teamId}) | src/views/user/team/attendance/components/TeamAttedanceSection.tsx |
Attendance management (/team/attendance/{teamId}) | src/views/user/team/attendance/components/AttendanceManagementSection.tsx |
Error Responses
The customer is not authenticated or the session has expired.
Team with the specified ID does not exist.
| Method | Endpoint | Description |
|---|
PUT | /api/public/teams/{teamId}/attendance | Update member attendance preferences |
GET | /api/public/teams/{teamId}/kpi | Team KPI data |
GET | /api/public/teams/{teamId}/metrics | Team performance metrics |
GET | /api/public/teams/{teamId}/profile | Full team profile |