---
title: "View working hours (beta)"
method: GET
path: "/working_hours"
tags: ["Working Hours"]
---

# View working hours (beta)

`GET /working_hours`

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/working_hours`
- 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 `appointment_type_id`, `schedule_template_id`; adds response fields `data[].appointment_types[].active`, `data[].appointment_types[].data_source_id`, `data[].appointment_types[].display_name`, `data[].appointment_types[].foreign_id` (+13 more).

This endpoint returns the working hours of the specified location. Every filter is optional.

## Query parameters

- `subdomain` string, required
- `location_id` integer, required
- `start_cursor` string
- `end_cursor` string
- `per_page` integer
- `provider_id` integer
- `operatory_id` integer
- `label_id` integer
- `source` 'manual' | 'synced'
- `active` boolean
- `ignore_past_dates` boolean
- `appointment_type_id` integer
- `schedule_template_id` integer
- `include[]` string[]

## Headers

- `Nex-Api-Version` string, required

## Response `200`

Successful

- APIV31EntitiesWorkingHourCollectionResponseWithCursor: API_V31_Entities_WorkingHour_Collection_Response_WithCursor 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` APIV31EntitiesWorkingHour[]
    - `id` integer: Resource ID
    - `provider_id` integer, nullable: Provider ID
    - `location_id` integer, nullable: Location ID
    - `operatory_id` integer, nullable: Operatory ID
    - `begin_time` string: Availability start time in the practices timezone
    - `end_time` string: Availability end time in the practices timezone
    - `days` string[], nullable: Configured week days. Empty when the working hour is configured for a custom recurrence
    - `specific_date` string, date, nullable: Configured specific date
    - `custom_recurrence` object, nullable: Configured custom recurrence, with the fields num (recurrence interval count), ref (starting date), and unit (day, week, or month)
    - `tz_offset` string: UTC offset for the practice
    - `active` boolean: Is active?
    - `source` 'manual' | 'synced': Source of the working hour
    - `label` APIV31EntitiesWorkingHourLabel
      - `id` integer: Resource ID
      - `location_id` integer, nullable: The location ID
      - `name` string: The name for working hour label
      - `color_hex` string, nullable: The color of the working hour label as a hex code
      - `default_duration_minutes` integer, nullable: Slot length in minutes applied to working hours that inherit this label when no restriction row sets one
      - `active` boolean: False when the working hour label has been deactivated
    - `schedule_template` APIV31EntitiesScheduleTemplate
      - `id` integer: Schedule template NexHealth ID
      - `name` string: The name of the schedule template
      - `color_hex` string, nullable: The color of the schedule template as a hex code
      - `active` boolean: False when the EHR has deactivated the schedule template
      - `location_id` integer, nullable: The NexHealth ID of the location the schedule template belongs to, null when it applies to every location of the data source
      - `foreign_id` string, nullable: Identifier NexHealth uses to uniquely match this record to its counterpart in the integrated EHR. How it is derived differs between EHRs and may change; treat it as an opaque string and do not parse it.
    - `type` 'booking' | 'block': Kind of schedule row: `booking` is bookable time, possibly restricted to appointment types; `block` is time that cannot be booked, such as closures or lunch
    - `inherit_label_restrictions` boolean: Whether the label's restriction rows apply to this working hour
    - `appointment_types` APIV31EntitiesAppointmentTypeCore[]: Manual appointment type mappings; EHR restrictions are read from `/working_hours/{id}/appointment_types`
      - `id` integer: Appointment type ID
      - `name` string: Appointment type name. Unique string identifier
      - `parent_type` string: Parent type for appointment type. Defines the belongs to relationship with either Institution or Location
      - `parent_id` integer: Identifies the specific resource the appointment type belongs to (see parent_type)
      - `minutes` integer: Default duration of appointments of this appointment type
      - `bookable_online` boolean: True if this appointment type should be bookable via the NexHealth online booking page
      - `display_name` string, nullable: Patient-facing name shown instead of `name` when present
      - `source` 'manual' | 'synced': Where the appointment type is managed: `manual` in NexHealth, `synced` in the EHR
      - `active` boolean: False when the EHR has deactivated a synced appointment type
      - `foreign_id` string, nullable: Identifier NexHealth uses to uniquely match this record to its counterpart in the integrated EHR. How it is derived differs between EHRs and may change; treat it as an opaque string and do not parse it.
      - `data_source_id` integer, nullable: The NexHealth ID of the data source a synced appointment type came from, null for manual appointment types
  - `page_info` object: Pagination information that can be used for fetching previous and next pages.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `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)
