---
title: "View locations (beta)"
method: GET
path: "/locations"
tags: ["Locations"]
---

# View locations (beta)

`GET /locations`

## Request

- Base URL: `https://nexhealth.info`
- URL: `https://nexhealth.info/locations`
- 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:** Removes response field `data[].locations[].last_sync_time`.

This endpoint returns the institutions accessible to the caller, each with its nested list of locations. Pass subdomain to scope the response to a single institution.

## Query parameters

- `subdomain` string
- `inactive` boolean
- `foreign_id` string

## Headers

- `Nex-Api-Version` string, required

## Response `200`

Successful

- APIV31EntitiesInstitutionBasicWithLocationsCollectionResponse: API_V31_Entities_InstitutionBasicWithLocations_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` APIV31EntitiesInstitutionBasicWithLocations[]
    - `id` integer: Institution ID
    - `name` string: Institution Name
    - `subdomain` string: Institution subdomain
    - `locations` APIV31EntitiesLocationWithOperatories[]: List of locations belonging to the institution
      - `id` integer: Location ID
      - `name` string: Location name
      - `institution_id` integer: Institution ID
      - `street_address` string, nullable: Location street address
      - `street_address_2` string, nullable: Location street address 2
      - `city` string, nullable: Location city
      - `state` string, nullable: 2 letter state code
      - `zip_code` string, nullable: Location zip code
      - `country_code` string, nullable: Location country code
      - `created_at` string: Location created time in UTC
      - `updated_at` string: Location last updation time in UTC
      - `latitude` number, float, nullable: Geolocated latitude determined by the address
      - `longitude` number, float, nullable: Geolocated longitude determined by the address
      - `phone_number` string, nullable: Practice phone number
      - `foreign_id` string: 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.
      - `foreign_id_type` string: Unique identifier for the integrated system
      - `email` string, nullable: Location email ID
      - `tz` string: Timezone name
      - `insert_appt_client` boolean: True if appointments created at this location are inserted into the EHR
      - `map_by_operatory` boolean: True if this location uses and therefore requires an operatory to schedule appointments
      - `set_availability_by_operatory` boolean: True if the location has appointment types specific to an operatory, false if the appointment types are specific to a provider
      - `inactive` boolean: Is this location not being actively used?
      - `specialty` APIEntitiesSpecialty
        - `id` integer: Specialty ID
        - `name` string: Specialty name
  - `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)
