---
title: "View available slots (beta)"
method: GET
path: "/available_slots"
tags: ["Available Slots"]
---

# View available slots (beta)

`GET /available_slots`

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/available_slots`
- Auth: API key in header `Authorization`

> 🚧 Beta
>
> Send `Nex-Api-Version: v3.1.0` to use this endpoint. It is still changing, and access is limited to approved partner institutions. Contact NexHealth before you build on it.

> **Changed from v3.0.0:** Adds query params `location_id[]`, `only_active_providers`, `operatory_id[]`, `provider_id[]` (+1 more); removes query params `lids[]`, `operatory_ids[]`, `pids[]`; changes query param `slot_interval`; and other schema changes.

This endpoint returns the bookable slots for the requested locations over the given date range, computed from provider availabilities and existing appointments. At least one of provider_id or appointment_type_id must be provided.

## Query parameters

- `subdomain` string, required
- `start_date` string, date, required
- `days` integer, required
- `schedule_template_id` integer
- `appointment_type_id` integer
- `working_hour_label_id` integer
- `working_hour_source` 'manual' | 'synced'
- `slot_length` integer
- `slot_interval` integer
- `overlapping_operatory_slots` boolean
- `only_active_providers` boolean
- `appointments_per_timeslot` integer
- `location_id[]` integer[]
- `provider_id[]` integer[]
- `operatory_id[]` integer[]

## Headers

- `Nex-Api-Version` string, required

## Response `200`

Successful

- APIV31EntitiesAvailableSlotResponseCollectionResponse: API_V31_Entities_AvailableSlotResponse_Collection_Response model
  - `code` boolean: Indicates the success or failure of the request
  - `description` string: Additional context on the request to help with debugging.
  - `error` string[]: Any errors that occur during the execution of the request.
  - `data` APIV31EntitiesAvailableSlotResponse[]
    - `lid` integer: The NexHealth ID of the location the slots belong to
    - `pid` integer, nullable: The NexHealth ID of the provider the slots belong to, omitted when slots are not grouped by provider
    - `operatory_id` integer, nullable: The NexHealth ID of the operatory the slots belong to, omitted when slots are not grouped by operatory
    - `slots` APIV31EntitiesAvailableSlot[]: Array of available start times
      - `time` string: Start time of the slot in the practices timezone
      - `end_time` string: End time of the slot in the practices timezone
      - `operatory_id` integer: The NexHealth ID of the operatory for the slot, omitted when the slot is not tied to an operatory
      - `provider_id` integer: The NexHealth ID of the provider for the slot, omitted when the slot is not tied to a provider
      - `working_hour_label_id` integer, nullable: The NexHealth ID of the working hour label of this slot
      - `working_hour_id` integer, nullable: The NexHealth ID of the working hour that produced this slot, present when the practice uses EHR schedule templates
      - `schedule_template_id` integer, nullable: The NexHealth ID of the schedule template the working hour belongs to, when it has one
      - `appointment_type_id` integer, nullable: The NexHealth ID of the appointment type this slot was computed for, present when `appointment_type_id` was requested
    - `next_available_date` string, date, nullable: The earliest date when a valid slot exists
  - `count` integer: Number of total objects, in case of collection.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal Server Error

---

[API](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta.md) - [All operations](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/nexhealth/apis/nexhealth-api-v3-1-0-beta/revisions/93cb4af790a5?raw)
