# Zocdoc

> Find provider availability and read appointment and directory information from Zocdoc.

App · 13 actions. Web page: https://docs.lodol.com/docs/integrations/zocdoc

## Actions

### Find provider locations

Find provider locations in Zocdoc.

**Inputs**

- Zip code (`zip_code`, text): A 5 digit zip code to search near. One of `zip_code` or the `latitude` and `longitude` pair is required. `zip_code` takes precedence if both are supplied.
- Latitude (`latitude`, number): Latitude of the search location, in decimal degrees. Must be provided together with longitude. Used only when zip_code is not supplied; zip_code takes precedence over the pair. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the search location, in decimal degrees. Must be provided together with latitude. Used only when zip_code is not supplied; zip_code takes precedence over the pair. From -180 to 180.
- Specialty ID (`specialty_id`, text): The Zocdoc ID of the provider's specialty. See [Reference Data](/guides/reference-data) for options. One of `specialty_id` or `visit_reason_id` is required. If `visit_reason_id` is not supplied, the default visit reason for the specialty wi
- Visit reason ID (`visit_reason_id`, text): The Zocdoc ID for the visit reason. See [Reference Data](/guides/reference-data) for options. One of `specialty_id` or `visit_reason_id` is required. If both `visit_reason_id` and `specialty_id` are supplied, the specialty must be the visit
- Page (`page`, number): The zero indexed page of results. From 0 to 10.
- Page size (`page_size`, number): The number of results to return per page. From 1 to 50.
- Insurance plan ID (`insurance_plan_id`, text): The Zocdoc ID of the patient's insurance plan. Use the [Get Insurance Plans](#operation/getInsurancePlans) endpoint to retrieve available plans.
- Visit type (`visit_type`, text): The type of patient visit with the provider. If not provided, the default value is set to `in_person`. One of: `all`, `in_person` (In person), `video_visit` (Video visit).
- Max distance to patient mi (`max_distance_to_patient_mi`, number): The maximum distance in miles from the physical location to the search location (the center point of the given `zip_code`). Defaults to 50 miles, which is also the widest radius available. From 1 to 50.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "provider_locations": [
        {
          "accepts_patient_insurance": {},
          "booking_requirements": {},
          "first_availability_date_in_provider_local_time": {},
          "location": {},
          "practice": {},
          "provider": {},
          "provider_location_id": {},
          "provider_location_type": {},
          "virtual_location": {}
        }
      ],
      "search_parameters": {
        "specialty_id": "example",
        "visit_reason_id": "example"
      }
    },
    "next_url": "example",
    "page": 1,
    "page_size": 1,
    "request_id": "example",
    "total_count": 1
  }
}
```

### Find providers by NPI

Find providers by NPI in Zocdoc.

**Inputs**

- Npis (`npis`, list, required): A comma-delimited list of Provider NPI numbers. A maximum of 50 items will be accepted at a time.
- Insurance plan ID (`insurance_plan_id`, text): The Zocdoc ID of the patient's insurance plan. Used to determine if provider takes patient's insurance in response. Use the [Get Insurance Plans](#operation/getInsurancePlans) endpoint to retrieve available plans.
- Latitude (`latitude`, number): Latitude of the patient's location. Must be provided together with longitude. When provided, response includes distance and nearest match for each physical location. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the patient's location. Must be provided together with latitude. When provided, response includes distance and nearest match for each physical location. From -180 to 180.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "npi": "example",
        "providers": [
          {}
        ]
      }
    ],
    "request_id": "example"
  }
}
```

### Get appointment

Get appointment in Zocdoc.

**Inputs**

- Appointment (`appointment_id`, text, required): The Zocdoc ID for the appointment.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "appointment_id": "example",
      "appointment_status": "pending_booking",
      "cancellation_reason": "example",
      "confirmation_type": "auto",
      "created_time_utc": "example",
      "developer_patient_id": "example",
      "is_provider_resource": true,
      "last_modified_time_utc": "example",
      "location_phone_extension": "example",
      "location_phone_number": "example",
      "notes": "example",
      "patient_type": "existing",
      "practice_id": "example",
      "provider_location_id": "example",
      "source": "example",
      "start_time": "example",
      "visit_reason_id": "example",
      "visit_type": "in_person",
      "waiting_room_path": "example"
    },
    "request_id": "example"
  }
}
```

### Get appointment participants

Get appointment participants in Zocdoc.

**Inputs**

- Appointment (`appointment_id`, text, required): The Zocdoc id of the appointment

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "location_id": "example",
      "patient": {
        "date_of_birth": "example",
        "developer_patient_id": "example",
        "email_address": "example",
        "first_name": "example",
        "gender": [
          {}
        ],
        "insurance": {
          "insurance_group_number": {},
          "insurance_member_id": {},
          "insurance_plan_id": {},
          "is_self_pay": {}
        },
        "is_booked_by_another_patient": true,
        "last_name": "example",
        "main_patient_email_address": "example",
        "patient_address": {
          "address1": {},
          "address2": {},
          "city": {},
          "state": {},
          "zip_code": {}
        },
        "patient_id": "example",
        "phone_number": "example",
        "sex_at_birth": "male",
        "uploaded_attachments": [
          {}
        ]
      },
      "provider_id": "example"
    },
    "request_id": "example"
  }
}
```

### Get provider availability

Get provider availability in Zocdoc.

**Inputs**

- Provider location IDS (`provider_location_ids`, list, required): A comma-delimited list of Zocdoc `provider_location_ids` retrieved from the /v1/providers or /v1/provider_locations endpoint. A maximum of 50 items will be accepted at a time.
- Visit reason ID (`visit_reason_id`, text, required): The Zocdoc ID of the visit reason. See [Reference Data](/guides/reference-data) for options.
- Patient type (`patient_type`, text, required): New or existing to indicate if the patient is new to the practice or has been to the office before. One of: `existing`, `new`.
- Start date in provider local time (`start_date_in_provider_local_time`, date): The first date to retrieve availability for, as YYYY-MM-DD. Defaults to current date in US Eastern Time. 150 days into the future is the guaranteed maximum. Dates past 150 days may be accepted but are not supported.
- End date in provider local time (`end_date_in_provider_local_time`, date): The last inclusive date to retrieve availability for, as YYYY-MM-DD. Defaults to 7 days after the current date. Must be 30 days or less after the start date. Both dates are included, so the maximum span is 31 days.
- Published context (`published_context`, text): Determines how availability slots are returned. Direct_listing returns all slots, while condition_driven_search limits results to Zocdoc-active providers with budget. Applicable to syndication clients. One of: `direct_listing` (Direct listing), `condition_driven_search` (Condition driven search).
- Insurance plan ID (`insurance_plan_id`, text): The Zocdoc ID of the patient's insurance plan. Use the [Get Insurance Plans](#operation/getInsurancePlans) endpoint to retrieve available plans. Used to construct booking_url.
- Insurance carrier ID (`insurance_carrier_id`, text): The Zocdoc ID of the patient's insurance carrier. See [Reference Data](/guides/reference-data) for options. Used to construct booking_url.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "first_availability": {
          "booking_url": {},
          "start_time": {},
          "visit_reason_id": {}
        },
        "provider_location_id": "example",
        "timeslots": [
          {}
        ]
      }
    ],
    "request_id": "example"
  }
}
```

### Get provider insurance mappings

Get provider insurance mappings in Zocdoc.

**Inputs**

- Provider location ID (`provider_location_id`, text, required): The Zocdoc provider location id to get insurance plans for.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "eligible_insurances": [
        {
          "insurance_carrier_id": {},
          "insurance_carrier_networks": {}
        }
      ],
      "insurance_plan_mappings": [
        {
          "insurance_plan_id": {}
        }
      ]
    },
    "request_id": "example"
  }
}
```

### Get provider location

Get provider location in Zocdoc.

**Inputs**

- Provider location ID (`provider_location_id`, text, required): The Zocdoc provider location id to get details for.
- Insurance plan ID (`insurance_plan_id`, text): The Zocdoc ID of the patient's insurance plan. Use the [Get Insurance Plans](#operation/getInsurancePlans) endpoint to retrieve available plans.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "accepts_patient_insurance": "accepted",
      "booking_requirements": {
        "accepts_booking_requests_from": [
          {}
        ],
        "required_fields": [
          {}
        ]
      },
      "first_availability_date_in_provider_local_time": "example",
      "location": {
        "address1": "example",
        "address2": "example",
        "city": "example",
        "distance_to_patient_mi": 1,
        "latitude": 1,
        "location_name": "example",
        "longitude": 1,
        "phone_extension": "example",
        "phone_number": "example",
        "state": "example",
        "time_zone": "example",
        "zip_code": "example"
      },
      "practice": {
        "practice_id": "example",
        "practice_name": "example"
      },
      "provider": {
        "credentials": {
          "certifications": {},
          "education": {}
        },
        "default_visit_reason_id": "example",
        "first_name": "example",
        "full_name": "example",
        "gender_identity": "example",
        "languages": [
          {}
        ],
        "last_name": "example",
        "npi": "example",
        "profile_url": "example",
        "provider_id": "example",
        "provider_photo_url": "example",
        "specialties": [
          {}
        ],
        "specialty_ids": [
          {}
        ],
        "statement": "example",
        "title": "example",
        "visit_reason_ids": [
          {}
        ]
      },
      "provider_location_id": "example",
      "provider_location_type": "in_person_provider",
      "virtual_location": {
        "location_name": "example",
        "state": "example",
        "time_zone": "example"
      }
    },
    "request_id": "example"
  }
}
```

### Get provider review averages

Get provider review averages in Zocdoc.

**Inputs**

- Record provider ID (`record_provider_id`, text, required): The Zocdoc provider ID.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "average_bedside_rating": 1,
      "average_overall_rating": 1,
      "average_wait_time_rating": 1,
      "provider_id": "example",
      "total_reviews": 1
    },
    "request_id": "example"
  }
}
```

### Get review averages for providers

Get review averages for providers in Zocdoc.

**Inputs**

- Provider IDS (`provider_ids`, list, required): A comma-delimited list of Zocdoc provider IDs to fetch review counts and average ratings for. Duplicate IDs are collapsed; a maximum of 100 distinct items will be accepted at a time. IDs that are unknown or not accessible to the caller are

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "average_bedside_rating": 1,
        "average_overall_rating": 1,
        "average_wait_time_rating": 1,
        "provider_id": "example",
        "total_reviews": 1
      }
    ],
    "request_id": "example"
  }
}
```

### List appointments

List appointments in Zocdoc.

**Inputs**

- Page (`page`, number): The zero indexed page of results. A mimimum value of 0 and a maximum of 10 will be accepted.
- Page size (`page_size`, number): The number of results to return per page. A mimimum value of 1 and a maximum of 100 will be accepted.
- Statuses (`statuses`, text): A comma-delimited list of Zocodc appointment statuses to filter appointments by.
- Developer patient ID (`developer_patient_id`, text): The patient identifier provided by 3P developer to filter appointments by.
- Sort by (`sort_by`, text): The field to sort appointments by. Default is start_time. One of: `start_time_utc` (Start time utc), `created_time_utc` (Created time utc), `last_modified_time_utc` (Last modified time utc).
- Sort direction (`sort_direction`, text): The direction to sort appointments by. Default is descending. One of: `ascending`, `descending`.
- Practice IDS (`practice_ids`, text): The comma separated values of practice ids to filter appointments by
- Provider IDS (`provider_ids`, text): The comma separated values of provider ids to filter appointments by
- Location IDS (`location_ids`, text): The comma separated values of location ids to filter appointments by
- Start time UTC min (`start_time_utc_min`, text): The minimum UTC start time of the appointments to fetch. Exclude appointments that start before this time.
- Start time UTC max (`start_time_utc_max`, text): The maximum UTC start time of the appointments to fetch. Exclude appointments that start after this time.
- Created time UTC min (`created_time_utc_min`, text): The minimum UTC created time of the appointments to fetch. Exclude appointments that were created before this time.
- Created time UTC max (`created_time_utc_max`, text): The maximum UTC created time of the appointments to fetch. Exclude appointments that were created after this time.
- Last modified time UTC min (`last_modified_time_utc_min`, text): The minimum UTC last modified time of the appointments to fetch. Exclude appointments that were last modified before this time.
- Last modified time UTC max (`last_modified_time_utc_max`, text): The maximum UTC last modified time of the appointments to fetch. Exclude appointments that were last modified after this time.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "appointment_id": "example",
        "appointment_status": "pending_booking",
        "cancellation_reason": "example",
        "confirmation_type": "auto",
        "created_time_utc": "example",
        "developer_patient_id": "example",
        "is_provider_resource": true,
        "last_modified_time_utc": "example",
        "location_phone_extension": "example",
        "location_phone_number": "example",
        "notes": "example",
        "patient_type": "existing",
        "practice_id": "example",
        "provider_location_id": "example",
        "source": "example",
        "start_time": "example",
        "visit_reason_id": "example",
        "visit_type": "in_person",
        "waiting_room_path": "example"
      }
    ],
    "next_url": "example",
    "page": 1,
    "page_size": 1,
    "request_id": "example",
    "total_count": 1
  }
}
```

### List provider calendar timeslots

List provider calendar timeslots in Zocdoc.

**Inputs**

- Record provider ID (`record_provider_id`, text, required): Record provider ID.
- Date (`date`, date, required): The date for which to get timeslots in YYYY-MM-DD format. This parameter will match against the local date part of the time slot's `start_time`. For example, a timeslot with start_time of 2024-10-01T22:00 and time_zone of America/New_York i
- Next page token (`next_page_token`, text): A token to get the next set of results.
- Limit (`limit`, number): The limit of objects to get in the response. For this endpoint, this is equivalent to page_size.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "allowed_visit_reason_ids": [
          {}
        ],
        "created_utc": "example",
        "excluded_visit_reason_ids": [
          {}
        ],
        "location_id": "example",
        "patient_type": "existing",
        "provider_id": "example",
        "start_time": "example",
        "time_zone": "example",
        "timeslot_id": "example"
      }
    ],
    "limit": 1,
    "next_page_token": "example",
    "next_url": "example",
    "request_id": "example"
  }
}
```

### List provider NPIs

List provider NPIs in Zocdoc.

**Inputs**

- Page (`page`, number): The zero indexed page of results. A mimimum value of 0 will be accepted.
- Page size (`page_size`, number): The number of results to return per page. A mimimum value of 1 and a maximum of 60000 will be accepted.

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "npis": [
        "example"
      ]
    },
    "next_url": "example",
    "page": 1,
    "page_size": 1,
    "request_id": "example",
    "total_count": 1
  }
}
```

### List schedulable entities

List schedulable entities in Zocdoc.

**Inputs**

- Page (`page`, number): The zero indexed page of results. A mimimum value of 0 will be accepted.
- Page size (`page_size`, number): The number of results to return per page. The default value is 5000. A mimimum value of 1 and a maximum of 10000 will be accepted. From 1 to 10000.
- Schedule types (`schedule_types`, text): The comma-delimited list of schedule types to include. Will return all schedule types if not provided.
- Recent changes 72hrs (`recent_changes_72hrs`, true/false): When true, only includes entities added or updated in the last 72 hours

**Outputs**

- `data` (object): The response from Zocdoc.

**Example output**

```json
{
  "data": {
    "data": {
      "recent_change_summary": {
        "schedulable_entities_added": [
          {}
        ],
        "schedulable_entities_profile_updated": [
          {}
        ],
        "schedulable_entities_removed": [
          {}
        ]
      },
      "schedulable_entities": [
        {
          "existing_patient_availability": {},
          "go_live_timestamp_utc": {},
          "id": {},
          "main_specialty_id": {},
          "main_specialty_name": {},
          "new_patient_availability": {},
          "npi": {},
          "practice_id": {},
          "profile_last_modified_timestamp_utc": {},
          "time_zone": {},
          "type": {}
        }
      ]
    },
    "next_url": "example",
    "page": 1,
    "page_size": 1,
    "request_id": "example",
    "total_count": 1
  }
}
```
