---
title: "Get team member availability"
method: GET
path: "/team-members/{profileId}/availability"
tags: ["Team Members"]
---

# Get team member availability

`GET /team-members/{profileId}/availability`

## Request

- Base URL: `https://api3.autarc.energy/v1`
- URL: `https://api3.autarc.energy/v1/team-members/{profileId}/availability`
- Auth: API key in header `X-Api-Key`

Returns every time a team member (Mitarbeiter) is busy between `from` and `to`, so an appointment can be booked around it before calling `POST /jobs`. Each interval carries a `reason`, and intervals of different reasons are never merged, so they can overlap.

Reasons:
- `job`: an appointment the member is assigned to (canceled and deleted
  appointments are left out). Includes `jobId`.

- `absence`: an absence such as vacation or sick leave. Pending absences
  count; declined ones do not. Includes `timeEntryId`. `absenceType` is
  returned only to a person allowed to see the member's time tracking,
  never to an API key.

- `company_holiday`: a public or custom holiday enabled in the company's
  bank-holiday settings, as a whole day in the company's timezone.
  Includes `holidayName`.

- `external_calendar`: a busy block from the member's connected Google or
  Outlook calendar. Only start and end are returned, never what the time is
  taken by. `sources.externalCalendar` says whether this source was read.

- `outside_working_hours`: time outside the member's working hours, or
  outside the company's opening hours on days the member has none. A day
  the company opens by appointment blocks nothing.
  `sources.workingHours` says which applied.


`job`, `absence` and `company_holiday` intervals keep their real start and end, so one can start before `from` or end after `to`. `external_calendar` and `outside_working_hours` intervals are clipped to the window. Intervals are sorted by start. Working hours, opening hours and holidays are read in the company's timezone (`timeZone`). `startAt` and `endAt` keep sub-second precision (a whole-day absence can end at `…T21:59:59.999Z`).

With a user's access token instead of an API key, a member's absences and working hours are only visible to that member themselves, administrators, and users who may view all projects or manage time tracking; anyone else gets `403`. Encode a positive offset's `+` as `%2B`, or use `Z`.

## Path parameters

- `profileId` string, uuid, required

## Query parameters

- `from` string, date-time, required
- `to` string, date-time, required

## Response `200`

When the team member is busy in the requested window

- TeamMemberAvailability
  - `profileId` string, uuid, required
  - `from` string, date-time, required: Start of the requested window, in UTC.
  - `to` string, date-time, required: End of the requested window, in UTC.
  - `timeZone` string, required: IANA timezone the company reads clocks in (its own setting, else its address country). Working hours, opening hours and holidays are whole local days in this zone. `UTC` when the company has neither.
  - `sources` object, required
    - `externalCalendar` string, required: `included`: the member's connected Google/Outlook calendars were read. `not_connected`: the member has no connected calendar. `disabled`: external calendars are not enabled for the company. `unavailable`: a calendar could not be read right now; the other reasons are still complete. `partial`: the calendar has more events in the window than one read returns, so everything after the last event read is reported as busy; query a shorter window. Only `included` and `partial` mean `external_calendar` intervals are present. New values may be added.
    - `workingHours` string, required: Where `outside_working_hours` intervals came from. `employee`: the member's own working hours. `company_opening_hours`: the company's opening hours, used on days the member has no working hours. `mixed`: both, on different days. `none`: neither is set, so no `outside_working_hours` intervals are returned. New values may be added.
    - `companyHolidays` string, required: `included`: the company's holidays were read and are returned as `company_holiday` intervals. `none`: the company has no holidays set up. `unavailable`: they could not be read right now; the other reasons are still complete. New values may be added.
  - `busy` BusyInterval[], required
    - `startAt` string, date-time, required: In UTC.
    - `endAt` string, date-time, required: In UTC (exclusive).
    - `reason` string, required: Why the member is busy: `job`, `absence`, `company_holiday`, `external_calendar` or `outside_working_hours`. New reasons may be added; treat an unknown one as busy.
    - `jobId` string, uuid: The appointment, for `job`.
    - `timeEntryId` string, uuid: The absence entry, for `absence`.
    - `absenceType` string: For `absence`, when set and only for a person allowed to see the member's time tracking (never for an API key): `vacation`, `vacation_unpaid`, `sick_leave`, `sick_child`, `educational_leave`, `overtime_compensation`, `public_holiday`, `vocational_school` or `other`.
    - `holidayName` string: For `company_holiday`, the holiday's name; several are joined with ", ".

## Other responses

- `400`: Invalid request — a malformed id, filter, pagination parameter or body. The body is a plain-text message naming the problem.
- `403`: The access token's user may not see this member's absences and working hours.
- `404`: The specified resource was not found

---

[API](https://skmtc.dev/autarc/apis/autarc-2-0-api.md) - [All operations](https://skmtc.dev/autarc/apis/autarc-2-0-api/llms.txt) - [OpenAPI document](https://skmtc.dev/autarc/apis/autarc-2-0-api/revisions/adfb20a40efc?raw)
