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.
- Sandboxhttps://api-developer-sandbox.zocdoc.com/v1/reference/npi
- Productionhttps://api-developer.zocdoc.com/v1/reference/npi
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/reference/npi?page=0&page_size=0' \
-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.
- Sandboxhttps://api-developer-sandbox.zocdoc.com/v1/providers
- Productionhttps://api-developer.zocdoc.com/v1/providers
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/providers?npis=1234567891%2C0123456789&insurance_plan_id=ip_31820&latitude=-90&longitude=-180' \
-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.
- Sandboxhttps://api-developer-sandbox.zocdoc.com/v1/provider_locations
- Productionhttps://api-developer.zocdoc.com/v1/provider_locations
curl -i -X GET \
'https://api-developer-sandbox.zocdoc.com/v1/provider_locations?zip_code=36925&latitude=-90&longitude=-180&specialty_id=sp_153&visit_reason_id=pc_FRO-18leckytNKtruw5dLR&page=0&page_size=1&insurance_plan_id=ip_31820&visit_type=all&max_distance_to_patient_mi=1' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Search by provider location
You can also retrieve provider information using specific provider_location_ids. This is useful for patients who want to see a specific doctor at a specific location.
- Sandboxhttps://api-developer-sandbox.zocdoc.com/v1/provider_locations/{provider_location_id}
- Productionhttps://api-developer.zocdoc.com/v1/provider_locations/{provider_location_id}
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_31820' \
-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. 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 defaults to 7 days after the current date. Must be 30 days or less after the start date.
- Sandboxhttps://api-developer-sandbox.zocdoc.com/v1/provider_locations/availability
- Productionhttps://api-developer.zocdoc.com/v1/provider_locations/availability
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&published_context=direct_listing&insurance_plan_id=string&insurance_carrier_id=string' \
-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.
- Sandboxhttps://api-developer-sandbox.zocdoc.com/v1/appointments
- Productionhttps://api-developer.zocdoc.com/v1/appointments
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_31820",
"insurance_group_number": "string",
"insurance_member_id": "string",
"is_self_pay": true
},
"gender": [
"female_at_birth"
]
},
"patient_type": "new",
"notes": "string"
}
}'