# Get facilities

Get a set of facilities within the developer's network.

Endpoint: GET /v1-beta/facilities
Version: 1.182
Security: ClientCredentialsFlow, AuthorizationCodeFlow

## Security:

  - `ClientCredentialsFlow` (unknown)
    oauth2

  - `AuthorizationCodeFlow` (unknown)
    oauth2

## Query parameters:

  - `npis` (string)
    A comma-delimited list of Provider NPI numbers. A maximum of 50 items will be accepted at a time. One of `zip_code` or `npis` is required.

  - `zip_code` (string)
    A 5 digit zip code that will be used as the location to find facilities near by. One of `zip_code` or `npis` is required.

  - `building_type` (string)
    The type of facility building, which can be Clinic or Hospital.

  - `page` (integer)
    The zero indexed page of results.

  - `page_size` (integer)
    The number of results to return per page.

  - `visit_reason_id` (string)
    The Zocdoc ID of the visit reason to search by `zip_code` for. See [Reference Data](/guides/reference-data) for options.

  - `insurance_plan_id` (string)
    The Zocdoc ID of the patient's insurance plan to search by `zip_code` for. Use the [Get Insurance Plans](#operation/getInsurancePlans) endpoint to retrieve available plans.

  - `max_distance_to_patient_mi` (integer)
    The maximum distance in miles from the facility to the search location (the center point of the given `zip_code`). Default is 50 miles.

## Response 200:

  - `200` (unknown)
    Successful

## Response 200 fields (application/json):

  - `data` (array, required)

  - `data.facility_id` (string, required)
    Zocdoc id for facility

  - `data.name` (string, required)

  - `data.npi` (string)

  - `data.building_type` (string)

  - `data.specialties` (array, required)

  - `data.languages` (array, required)

  - `data.visit_reason_ids` (array, required)

  - `data.default_visit_reason_id` (string)

  - `data.location` (object, required)

  - `data.location.address1` (string, required)

  - `data.location.address2` (string)

  - `data.location.city` (string, required)

  - `data.location.state` (string, required)
    The location's two letter state code.
    Example: NY

  - `data.location.zip_code` (string, required)
    The location's 5 digit zip code.

  - `data.location.latitude` (number, required)

  - `data.location.longitude` (number, required)

  - `data.location.location_name` (string)

  - `data.location.phone_number` (string)
    Unformatted phone number for the location. Returns null for certain API products.
    Example: 9999999999

  - `data.location.phone_extension` (string)
    Unformatted extension digits for the location phone number.
    Example: 123

  - `data.location.time_zone` (string)
    IANA time zone identifier for the location, e.g., America/New_York.
    Example: America/New_York

  - `data.schedule` (object, required)

  - `data.schedule.schedule_id` (string, required)
    Zocdoc id for bookable schedule

  - `data.schedule.provider_location_id` (string, required)
    Zocdoc provider location id for availability and booking requests

  - `data.schedule.booking_requirements` (object, required)
    Criteria for booking appointments, defines requirements and mandatory fields specified by Zocdoc providers

  - `data.schedule.booking_requirements.required_fields` (array, required)

  - `data.schedule.booking_requirements.accepts_booking_requests_from` (array, required)

  - `data.practice` (object)

  - `data.practice.practice_id` (string, required)

  - `data.practice.practice_name` (string, required)

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `request_id` (string, required)
    Unique request identifier for tracing

  - `error_type` (string, required)
    Enum: "api_error", "invalid_request"

  - `errors` (array, required)

  - `errors.field` (string)

  - `errors.message` (string, required)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 404:

  - `404` (unknown)
    Not found

