Skip to content
MD Live logoMD Live logoMD Live Developer API

Appointments

The following endpoint can be used to cancel a scheduled appointment. Please note that the appointment can not be canceled once it has started.

To cancel a patient’s appointment, make a request to:

PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel

Parameter Default
Authorization Bearer {jwt_token}
Content-type application/json
Accept application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient
appointment_id true ID of patient’s appointment
Terminal window
curl -X PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

The above command returns a 204 NO CONTENT response.

The list of appointments returned as upcoming include all future appointments as well as any appointment within the last 60 minutes.

To retrieve the list of a patient’s upcoming appointments, make a request to:

GET {server_url}/api/v2/patients/{patient_id}/appointments/upcoming

Parameter Default
Authorization Bearer {jwt_token}
Accept application/json
Content-type application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient
Terminal window
curl -X GET {server_url}/api/v2/patients/{patient_id}/appointments/upcoming \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
{
"appointments":[
{
"id":1,
"provider":{
"id":36,
"full_name": "Test Provider",
"provider_type": "General Medical",
"photo_url_absolute": "https://patient.mdlive.com/assets/default-profile-picture.png"
},
"start_date":"2018-01-17T19:18:14+00:00",
"appointment_by":"video",
"in_progress":false,
"customer_call_in_number":"7866665555",
"chief_complaint":"sore throat",
"wait_info":{
"average_wait_time": null, Deprecated
"patients_in_queue": null, Deprecated
"message": "We will send updates to your phone",
"over_time_message": "under 30",
"wait_time_label": "Estimated Provider call back time",
"position_in_line_label": null, Deprecated
"web_instructions_message": "Please keep this window open and a Provider will be with you shortly",
"mobile_instructions_message": "Provider will be calling you on the phone number provided"
}
"on_waiting_room":false,
"provider_ready":false
}
]
}

The provider_ready attribute can be polled to monitor the status of an upcoming video appointment. When it is set to true, it is safe to connect to the patient to the video consulation. As an alternative to polling this attribute, you can register for the consultation:provider:ready webhook. To connect to the patient to the video consultation, the video consultations in browser provides the information needed.

If the patient is waiting for the first available provider, the wait_info attribute will be populated. Wait times are in minutes. We recommend using the combination of wait_time_label with over_time_message.

This call is used to notify a provider that a patient has arrived to an appointment.

To notify the provider that a patient has arrived to the appointment, make a request to:

POST {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room

Parameter Default
Authorization Bearer {jwt_token}

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient
appointment_id true MD Live ID for appointment
Terminal window
curl -v -X PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room \
-H 'Authorization: Bearer {jwt_token}' \
-d ''

The above command returns 200 OK with no content.

This call is used to fetch information about a video consultation, including the url to the page that allows patients to join. Going to the url specified in the response automatically registers the patient_arrival.

To fetch information about a video consultation, including the url to the page that allows patients to join, make a request to:

GET {server_url}/api/v1/appointments/{appointment_id}/connection_params

Parameter Default
Authorization Bearer {jwt_token}
Accept application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
appointment_id true MD Live ID for appointment

The following parameter can be included to pass through a redirect url to use when the appointment has concluded.

GET {server_url}/api/v1/appointments/{appointment_id}/connection_params?post_consultation_url=https%3A%2F%2Fpostconsultationurl.com
Attribute Required Description
post_consultation_url false The encoded URL for redirect after consultation ends.
If launching video appointment from a third party mobile application on iOS into a native Safari browser (iOS 12+ only), post_consultation_url (if passed) will be used to redirect back to the original mobile application when the appointment has concluded.
Terminal window
curl -X GET {server_url}/api/v1/appointments/{appointment_id}/connection_params \
-H 'Authorization: Bearer: {jwt_token}' \
-H 'Accept: application/json'
{
"patient_id":4,
"provider_id":36,
"start_time":"2018-01-27T16:00:00.000Z",
"end_time":"2018-01-27T16:30:00.000Z",
"url":"https://patients.mdlive.com/appointments/1?signature=?signature=2a28d944aa28e63ec0d0d636cc22d801a660a12092399e43a208378902c78d91"}