# Get team member schedules

Retrieves work schedules for team members as working intervals.
Optionally includes:
- Busy intervals (appointments and events)
- Off-day type identifiers

**Query Parameters:**
- `start_date` / `end_date` - Date range for schedule search
- `team_member_ids[]` or `team_member_id` - Filter by specific team members
- `include_fired` - Also return dismissed team members
- `include[]` - Include additional data (busy_intervals, busy_times, off_day_type)

Endpoint: GET /locations/{location_id}/team_members/schedule
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `location_id` (integer, required)
    Location ID

## Query parameters:

  - `start_date` (string)
    Start date for schedule search (YYYY-MM-DD)

  - `end_date` (string)
    End date for schedule search (YYYY-MM-DD)

  - `team_member_ids` (array)
    Team Member IDs to filter by.
Example: `team_member_ids[]=123&team_member_ids[]=234`

  - `team_member_id` (integer)
    Single Team Member ID. Takes precedence over `team_member_ids[]`.

  - `include_fired` (integer)
    Set to `1` to also return schedules of dismissed Team Members. By default only active Team Members are returned.

  - `include` (array)
    Additional data to include in response.
Example: `include[]=busy_intervals&include[]=off_day_type`

## Header parameters:

  - `Accept` (string, required)

  - `Content-Type` (string, required)

  - `Authorization` (string, required)
    Bearer {partner_token}, User {user_token}

## Response 200:

  - `200` (unknown)
    Schedules retrieved successfully

## Response 200 fields (application/json):

  - `success` (boolean)
    Example: true

  - `data` (array)

  - `data.staff_id` (integer)
    Team Member ID. `staff_id` is the literal legacy response field.
    Example: 12345

  - `data.date` (string)
    Schedule date (YYYY-MM-DD)
    Example: 2026-01-31

  - `data.slots` (array)
    Working time intervals

  - `data.slots.from` (string)
    Interval start time (HH:mm)
    Example: 10:00

  - `data.slots.to` (string)
    Interval end time (HH:mm)
    Example: 19:00

  - `data.busy_intervals` (array)
    Time intervals occupied by appointments or events.
Only included when `include[]=busy_intervals`.

  - `data.busy_intervals.entity_type` (string)
    Entity type occupying the interval
    Enum: "record", "activity"

  - `data.busy_intervals.entity_id` (integer)
    Entity ID (appointment or event ID)
    Example: 456789

  - `data.busy_intervals.from` (string)
    Interval start time (HH:mm:ss)
    Example: 11:00:00

  - `data.busy_intervals.to` (string)
    Interval end time (HH:mm:ss)
    Example: 12:00:00

  - `data.busy_times` (array)
    Hours of the day (0-23) touched by appointments or events.
Only included when `include[]=busy_times`.
    Example: [10,11]

  - `data.off_day_type` (any)
    Off-day type ID (if this is a non-working day).
Only included when `include[]=off_day_type`.
    Example: 3

  - `meta` (object)

  - `meta.count` (integer)
    Total number of schedule entries
    Example: 15

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean)
    Example: false

  - `data` (null)

  - `meta` (object)

## Response 403:

  - `403` (unknown)
    Forbidden - insufficient permissions

## Response 403 fields (application/json):

  - `success` (boolean)
    Example: false

  - `data` (null)

  - `meta` (object)

## Response 404:

  - `404` (unknown)
    Location not found

## Response 404 fields (application/json):

  - `success` (boolean)
    Example: false

  - `data` (null)

  - `meta` (object)

