Before using this guide you will need a developer account and an access token. You can contact us about creating a developer account here. To get an access token, review the authentication and access tokens guide.
First you need to retrieve the list of active provider NPIs within your Zocdoc directory.
A Zocdoc directory is a developer-managed list of Zocdoc providers. Each developer account has at least one directory, and multiple directories can be created if needed to support your specific API use case.
The primary purpose of a directory is to define which providers are available for booking through your application. You can also use directories to explore the Zocdoc marketplace and identify providers you may want to include in your bookable directory.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/reference/npi
- Production
https://api-developer.zocdoc.com/v1/reference/npi
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/reference/npi?page=0&page_size=60000' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Search by NPI
NPIs retrieved in the previous step can be used to fetch detailed provider information, including name, gender identity, spoken languages, specialties, visit reasons, and affiliated locations. Up to 50 NPIs can be queried in a single request.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/providers
- Production
https://api-developer.zocdoc.com/v1/providers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/providers?npis=1234567891%2C0123456789&insurance_plan_id=ip_2224' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Search by ZIP and specialty or visit reason
If you don’t have NPIs, you can search by ZIP code and specialty or visit reason to find providers. This is beneficial when looking by distance or specifc reason.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/provider_locations
- Production
https://api-developer.zocdoc.com/v1/provider_locations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/provider_locations?zip_code=36925&specialty_id=sp_153&visit_reason_id=pc_FRO-18leckytNKtruw5dLR&page=0&page_size=10&insurance_plan_id=ip_2224&visit_type=all&max_distance_to_patient_mi=50' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Search by provider location
You can also retrieve provider information using specific provider_location_id
s. This is useful for patients who want to see a specific doctor at a specific location.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/provider_locations/{provider_location_id}
- Production
https://api-developer.zocdoc.com/v1/provider_locations/{provider_location_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/provider_locations/pr_abc123-def456_wxyz7890|lo_abc123-def456_wxyz7890?insurance_plan_id=ip_2224' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Using a specific provider_location_id
, visit_reason_id
, and patient_type
, you can retrieve the provider's availability.
start_date_in_provider_local_time
defaults to current date in US Eastern Time. YYYY-MM-DD
format.
end_date_in_provider_local_time
defaults to 7 days after the current date. Must be 30 days or less after the start date. You can request availability up to a maximum of 150 days into the future.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/provider_locations/availability
- Production
https://api-developer.zocdoc.com/v1/provider_locations/availability
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/provider_locations/availability?provider_location_ids=pr_abc123-def456_wxyz7890%7Clo_abc123-def456_wxyz7890%2Cpr_ghi123-jkl456_mnop7890%7Clo_ghi123-jkl456_mnop7890&visit_reason_id=pc_FRO-18leckytNKtruw5dLR&patient_type=new&start_date_in_provider_local_time=2019-08-24&end_date_in_provider_local_time=2019-08-24' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Using an available start_time
you can create an appointment for the patient. This will return an appointment_id
which can be used to confirm, cancel, or reschedule the appointment.
The type of appointment.
Date & time of the appointment in ISO-8601 format with a timezone offset. Must be a valid start time from the /v1/provider_locations/availability endpoint.
The Zocdoc visit reason ID for the appointment. Must be accepted by the provider.
The Zocdoc provider-location ID for the appointment.
The Zocdoc ID of the patient.
The patient identifier provided by 3P developer.
The patient's first name.
The patient's last name.
The patient's date of birth in the format, YYYY-MM-DD.
The patient's sex assigned at birth.
The patient's unformatted 10 digit phone number. The first and fourth digits cannot be a 0 or 1.
The patient's email address.
The patient's address, line 1.
The patient's address, city.
The patient's address, two letter state code.
The patient's address, 5 digit zip code.
The patient's address, line 2.
none_apply and prefer_not_to_say must be used independently, all other gender identities can be used in combination with each other.
Whether or not the patient has been to the provider's practice.
Patient notes
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/appointments
- Production
https://api-developer.zocdoc.com/v1/appointments
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-developer-sandbox.zocdoc.com/v1/appointments \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"appointment_type": "providers",
"data": {
"start_time": "2022-04-27T09:00:00-04:00",
"visit_reason_id": "pc_FRO-18leckytNKtruw5dLR",
"provider_location_id": "pr_abc123-def456_wxyz7890|lo_abc123-def456_wxyz7890",
"patient": {
"patient_id": "string",
"developer_patient_id": "string",
"first_name": "string",
"last_name": "string",
"date_of_birth": "2019-08-24",
"sex_at_birth": "male",
"phone_number": "9999999999",
"email_address": "test@example.com",
"patient_address": {
"address1": "string",
"city": "string",
"state": "NY",
"zip_code": 36925,
"address2": "string"
},
"insurance": {
"insurance_plan_id": "ip_2224",
"insurance_group_number": "string",
"insurance_member_id": "string",
"is_self_pay": true
},
"gender": [
"female_at_birth"
]
},
"patient_type": "new",
"notes": "string"
}
}'