# Compute open availability slots from schedules & appointments

Returns available time slots based on schedules and existing appointments

Endpoint: GET /site/{siteId}/availability
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `siteId` (string, required)
    Site identifier

## Query parameters:

  - `startDate` (string)
    Start date for availability search

  - `endDate` (string)
    End date for availability search

  - `practitionerId` (string)
    Filter availability by practitioner ID

  - `includeSchedule` (boolean)

  - `includePractitioner` (boolean)

  - `includeLocation` (boolean)

## Response 200:

  - `200` (unknown)
    Open availability slots computed from Schedules & Appointments

## Response 200 fields (application/json):

  - `data` (array, required)
    List of free timeslots within the requested date range

  - `data.scheduleId` (string, required)
    The ID of the schedule resource that this timeslot references
    Example: 123

  - `data.schedule` (object, required)
    Full FHIR Schedule resource (if requested/available)

  - `data.practitioners` (array, required)
    List of Practitioner resources linked to the schedule (if any)

  - `data.locations` (array, required)
    List of Location resources linked to the schedule (if any)

  - `data.start` (string, required)
    The start time (ISO8601) for the free slot
    Example: 2025-01-01T09:00:00.000Z

  - `data.end` (string, required)
    The end time (ISO8601) for the free slot
    Example: 2025-01-01T09:30:00.000Z

