Skip to content
MD Live logoMD Live logoMD Live Developer API

Scheduling a Consultation

Regardless of the type of consultation that is being created, the endpoint called will be the same. The values of the request body parameters will determine the type of consultation created.

POST {server}/api/v2/patients/{patient_id}/appointments

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

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

The following parameters are required when creating an appointment.

Attribute Required Description
patient_id true MD Live ID for patient
Attribute Required Description
appointment true parent attribute for the appointment
↳ provider_type_id true Requested doctor type for appointment, found in provider types list (or the endpoint response)
↳ state_abbrev true Requested U.S. state for the appointment
↳ survey_answer true Answer to survey question
↳ customer_call_in_number true Preferred phone number to contact the patient
↳ appointment_method true Requested type of appointment for the patient, should be ‘video’ or ‘phone’
↳ start_time true Requested time for appointment as integer seconds since Epoch
↳ chief_complaint true Reason for the appointment
↳ provider_id false Id of the requested provider. Needed only when the patient would like to schedule a visit with a specific provider.
↳ chief_complaint_comments false Any additional description of the reason the patient is making the appointment
↳ concept_id false Id returned from auto-complete search of Clinical Concepts for the patient’s chief complaint
↳ file_id false Id of the document to attach to the appointment.
↳ promocode false Promocode to apply to the cost of the appointment
↳ authorize_insurance false boolean to indicate that you would like to bill the appointment to insurance (true) or without insurance (false)
↳ customer_insurance_id false Insurance ID for the insurance a patient would like to bill
↳ agrees_to_informed_consent true Patient’s answer to if they agree to the terms of MD Live Medical Group’s Informed Consent
↳ agrees_to_privacy_agreement true Patient’s answer to if they agree to the terms MD Live Medical Group’s Privacy Policy
↳ consent_user_initials true Initials entered by patient to indicate they have answered the agreement questions
↳ pcp_questions false parent attribute for array of Primary Care Physician questions
    ↳ question false Name for PCP question
    ↳ answer false True or False answer to the Primary Care Physician question

This should be called when the patient wants to meet with the first available Provider (no specific Provider). This call does not depend on Provider’s availability.

Terminal window
curl -X POST {server_url}/api/v2/patients/{patient_id}/appointments \
-H "Content-type: application/json" \
-H "Authorization: Bearer 34a2sample-api-token" \
-d '{
"appointment": {
"provider_type_id": 3,
"state_abbrev": "FL",
"customer_call_in_number": "5555555555",
"start_time": null,
"survey_answer": "Emergency Room",
"appointment_method": "phone",
"chief_complaint": "Throat Pain",
"concept_id": 64,
"agrees_to_informed_consent": true,
"agrees_to_privacy_agreement": true,
"consent_user_initials": "TM",
"pcp_questions": [
{
"question": "primary_care_physician",
"answer": true
},
{
"question": "pcp_correct_information",
"answer": true
},
{
"question": "pcp_visit_information",
"answer": true
},
{
"question": "pcp_assistance_question",
"answer": false
}
]
}
}'

Future Appointment with a Specific Provider

Section titled “Future Appointment with a Specific Provider”

When the provider has timeslot in the available_hours object (See Provider Profile), the user has the option to schedule a future appointment with that Provider at that timeslot.

Terminal window
curl -X POST {server_url}/api/v2/patients/{patient_id}/appointments
-H "Content-type: application/json" \
-H "Authorization: Bearer 34a2sample-api-token"
-d '{
"appointment": {
"provider_id": 4,
"provider_type_id": 3,
"state_abbrev": "FL",
"customer_call_in_number": "5555555555",
"start_time": 1516225743,
"survey_answer": "Emergency Room",
"appointment_method": "phone",
"chief_complaint": "Throat Pain",
"concept_id": 64,
"agrees_to_informed_consent": true,
"agrees_to_privacy_agreement": true,
"consent_user_initials": "TM",
"pcp_questions": [
{
"question": "primary_care_physician",
"answer": true
},
{
"question": "pcp_correct_information",
"answer": true
},
{
"question": "pcp_visit_information",
"answer": true
},
{
"question": "pcp_assistance_question",
"answer": false
}
]
}
}'

When the provider has is_visit_now_available set to true (See Search for Provider), the user has the option to schedule an immediate consultation with that Provider.