Appointments
Cancel
Section titled “Cancel”The following endpoint can be used to cancel a scheduled appointment. Please note that the appointment can not be canceled once it has started.
HTTP Request
Section titled “HTTP Request”To cancel a patient’s appointment, make a request to:
PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel
Headers
Section titled “Headers”| 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.
URL Parameters
Section titled “URL Parameters”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 |
Example Request
Section titled “Example Request”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'RestClient::Request.new( :method => :put, :url => '{server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/cancel', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Content-type' => 'application/json', 'Accept' => 'application/json', }).executeExample Response
Section titled “Example Response”The above command returns a 204 NO CONTENT response.
List Upcoming
Section titled “List Upcoming”The list of appointments returned as upcoming include all future appointments as well as any appointment within the last 60 minutes.
HTTP Request
Section titled “HTTP Request”To retrieve the list of a patient’s upcoming appointments, make a request to:
GET {server_url}/api/v2/patients/{patient_id}/appointments/upcoming
Headers
Section titled “Headers”| 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.
URL Parameters
Section titled “URL Parameters”The following parameters need to be included in the URL of the request:
| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Example Request
Section titled “Example Request”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'RestClient::Request.new( :method => :get, :url => '{server_url}/api/v2/patients/{patient_id}/appointments/upcoming', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Content-type' => 'application/json', 'Accept' => 'application/json' }).executeExample Response
Section titled “Example Response”{ "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 } ]}Response Values
Section titled “Response Values”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.
Patient Arrival
Section titled “Patient Arrival”This call is used to notify a provider that a patient has arrived to an appointment.
HTTP Request
Section titled “HTTP Request”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
Headers
Section titled “Headers”| Parameter | Default |
|---|---|
| Authorization | Bearer {jwt_token} |
This request must include a valid User JWT token, please see our documentation.
URL Parameters
Section titled “URL Parameters”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 |
Example Request
Section titled “Example Request”curl -v -X PUT {server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room \ -H 'Authorization: Bearer {jwt_token}' \ -d ''RestClient::Request.new( :method => :put, :url => '{server_url}/api/v1/patients/{patient_id}/appointments/{appointment_id}/entered_waiting_room', :headers => { 'Authorization' => 'Bearer {jwt_token}' }).executeExample Response
Section titled “Example Response”The above command returns 200 OK with no content.
Video Consultations in Browser
Section titled “Video Consultations in Browser”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.
HTTP Request
Section titled “HTTP Request”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
Headers
Section titled “Headers”| Parameter | Default |
|---|---|
| Authorization | Bearer {jwt_token} |
| Accept | application/json |
This request must include a valid User JWT token, please see our documentation.
URL Parameters
Section titled “URL Parameters”The following parameters need to be included in the URL of the request:
| Attribute | Required | Description |
|---|---|---|
| appointment_id | true | MD Live ID for appointment |
Query String Parameter
Section titled “Query String Parameter”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. |
Example Request
Section titled “Example Request”curl -X GET {server_url}/api/v1/appointments/{appointment_id}/connection_params \ -H 'Authorization: Bearer: {jwt_token}' \ -H 'Accept: application/json'RestClient::Request.new( :method => :get, :url => '{server_url}/api/v1/appointments/{appointment_id}/connection_params', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Accept' => 'application/json' }).executeExample Response
Section titled “Example Response”{ "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"}