Working Hours

View working hours (beta)

🚧 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.

get/working_hours

Request

  • Base URL
    https://nexhealth.info
  • URL
    https://nexhealth.info/working_hours
  • Auth
    API key in header Authorization

Query parameters

subdomainstring required

Used to scope the request to the specified institution

location_idinteger required

Used to scope the request to the specified location

start_cursorstring

First item of the current page. Starts empty

end_cursorstring

Last item of the current page. Starts empty

per_pageinteger

Number of results to return per page. Maximum allowed amount is 1000.

provider_idinteger

Filter for specific provider

operatory_idinteger

Filter for specific operatory

label_idinteger

Filter by specific label

source'manual' | 'synced'

Filter by source of working hour

activeboolean

true returns only active records, false only inactive. Defaults to true

ignore_past_datesboolean

Filter out working hours configured for specific dates in the past

appointment_type_idinteger

Only working hours that offer this appointment type. With EHR restrictions enabled for the location: through an allow restriction, or any type a restriction does not exclude, or a manual mapping when the working hour has no restrictions; otherwise through a manual mapping. Block working hours never match

schedule_template_idinteger

Only working hours that belong to this schedule template

include[]string[]

Resources to be included in the response

Headers

Nex-Api-Versionstring required

The NexHealth API version

Response

Successful

codeboolean

Indicates the success or failure of the request

descriptionstring

Additional context on the request to help with debugging.

errorstring[]

Any errors that occur during the execution of the request.

page_infoobject

Pagination information that can be used for fetching previous and next pages.

Example response

{
  "description": "Description",
  "error": [
    "Error message"
  ],
  "data": [
    {
      "id": 12,
      "provider_id": 7,
      "location_id": 3,
      "operatory_id": 149,
      "begin_time": "10:30",
      "end_time": "17:00",
      "days": [
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday"
      ],
      "specific_date": "2022-11-03",
      "custom_recurrence": {
        "num": 3,
        "unit": "day",
        "ref": "2022-11-03"
      },
      "tz_offset": "-0700",
      "active": true,
      "source": "synced",
      "label": {
        "id": 113,
        "location_id": 115,
        "name": "New patient appointments",
        "color_hex": "#1E90FF",
        "default_duration_minutes": 40,
        "active": true
      },
      "schedule_template": {
        "id": 7,
        "name": "Hygiene week",
        "color_hex": "#4caf50",
        "active": true,
        "location_id": 115,
        "foreign_id": "42"
      },
      "type": "booking",
      "inherit_label_restrictions": true,
      "appointment_types": [
        {
          "id": 1,
          "name": "Medical",
          "parent_type": "Institution",
          "parent_id": 1,
          "minutes": 15,
          "display_name": "Hygiene visit",
          "source": "manual",
          "active": true,
          "foreign_id": "42",
          "data_source_id": 7
        }
      ]
    }
  ],
  "page_info": {
    "has_previous_page": false,
    "has_next_page": false,
    "start_cursor": "AAAAA",
    "end_cursor": "BBBBBB"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.