Before using these functions, 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.
Once an appointment is booked for a provider, there is a variety of actions that you can take on the appointment.
When an appointment is booked, the status
of the appointment is pending_booking
. In order for the appointment to be carried out, you need to confirm the appointment.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/appointments/confirm
- Production
https://api-developer.zocdoc.com/v1/appointments/confirm
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-developer-sandbox.zocdoc.com/v1/appointments/confirm \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"appointment_id": "d04b049a-41b1-4aba-9268-d8973cf72cdd"
}'
If the appointment was booked with a Zocdoc user credential, only that user will have access to view or modify the appointment. If the appointment was booked with a machine-to-machine credential, the appointment can be viewed and modified by any of the developer's machine-to-machine credentials.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/appointments/cancel
- Production
https://api-developer.zocdoc.com/v1/appointments/cancel
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-developer-sandbox.zocdoc.com/v1/appointments/cancel \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"appointment_id": "d04b049a-41b1-4aba-9268-d8973cf72cdd",
"cancellation_reason": "string",
"cancellation_reason_type": "patient_no_longer_needs_appointment"
}'
You can modify the appointment time and request the reschedule of an appointment in pending_booking
, confirmed
, pending_reschedule
, or rescheduled
status.
If the appointment was booked with a Zocdoc user credential, only that user will have access to view or modify the appointment. If the appointment was booked with a machine-to-machine credential, the appointment can be viewed and modified by any of the developer's machine-to-machine credentials.
- Sandbox
https://api-developer-sandbox.zocdoc.com/v1/appointments/reschedule
- Production
https://api-developer.zocdoc.com/v1/appointments/reschedule
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api-developer-sandbox.zocdoc.com/v1/appointments/reschedule \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"appointment_id": "63f995c2-49c4-40c8-a93a-140fb32e913b",
"start_time": "2022-04-27T09:00:00-04:00"
}'