Skip to content
MD Live logoMD Live logoMD Live Developer API

Customer Documents

An example of a customer document is a photo of a symptom that a patient takes before an appointment. Please store the id that gets returned. You’ll be able to use it when you create the appointment.

To create a customer document, make a request to:

POST {server_url}/api/v2/patients/{patient_id}/documents

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

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

Attribute Required Description
doc true Parent attribute for customer documents
↳ document_name true Desired filename
↳ data true Base64 encoded file data
↳ mime_type true Mime type, e.g. image/png
↳ record_type true One of the following values:
  • Behavioral
  • Exam-Face2Face
  • Patient Record
  • Test Result
  • Wellness Panel Results
Terminal window
curl -v -X POST {server_url}/api/v2/patients/{patient_id}/documents \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"doc": {
"document_name": "INSERT_DOCUMENT_NAME_WITH_EXTENSION_HERE",
"data": "INSERT_BASE64_ENCODED_DATA_HERE",
"mime_type": "INSERT_MIME_TYPE_HERE",
"record_type": "Patient Record"
}
}'
{
"doc":{
"id":1,
"mime_type":"image/png",
"record_type":"Patient Record",
"upload_date":"2018-01-16T20:51:06+00:00",
"document_name":"DOGE.png",
"upload_by":"test patient",
"extension":"png"
}
}

To remove a customer document, make a request to:

DELETE {server_url}/api/v1/patients/{patient_id}/documents/{document_id}

Parameter Default
Authorization Bearer {jwt_token}
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
document_id true MD Live ID for patient
Terminal window
curl -v -X DELETE {server_url}/api/v1/patients/{patient_id}/documents/{document_id} \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json'

To retrieve the list of a patient’s current list of documents, make a request to:

GET {server_url}/api/v1/patients/{patient_id}/documents

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/v1/patients/{patient_id}/documents \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
{
"documents":[
{
"id":1,
"mime_type":"image/png",
"record_type":"Patient Record",
"upload_date":"2018-01-16T20:51:06+00:00",
"document_name":"DOGE.png",
"upload_by":"test patient",
"extension":"png",
"thumbnail":"iVBORw0KGgoAAAANSUhEUgAAAG4AAABuAQAAAADuIBtWAAAABGdBTUEAALGP\nC/xhBQAAAAJiS0dEAAHdihOkAAAAB3RJTUUH4gEQCjcT4w8KOgAAABVJREFU\nOMtjYBgFo2AUjIJRMAroAQAGcgABdoTxvAAAACV0RVh0ZGF0ZTpjcmVhdGUA\nMjAxOC0wMS0xNlQxNTo1NToxOS0wNTowMG8EODEAAAAldEVYdGRhdGU6bW9k\naWZ5ADIwMTgtMDEtMTZUMTU6NTU6MTktMDU6MDAeWYCNAAAAAElFTkSuQmCC\n"
}
]
}

To retrieve a specific document, make a request to:

GET {server_url}/api/v1/patients/{patient_id}/documents/{document_id}

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
document_id true MD Live ID for document
Terminal window
curl -X GET {server_url}/api/v1/patients/{patient_id}/documents/{document_id} \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
{
"id":1,
"mime_type":"image/png",
"record_type":"Patient Record",
"upload_date":"2018-01-16T20:51:06+00:00",
"document_name":"DOGE.png",
"upload_by":"test patient",
"extension":"png",
"thumbnail":"iVBORw0KGgoAAAANSUhEUgAAAG4AAABuAQAAAADuIBtWAAAABGdBTUEAALGP\nC/xhBQAAAAJiS0dEAAHdihOkAAAAB3RJTUUH4gEQCjcT4w8KOgAAABVJREFU\nOMtjYBgFo2AUjIJRMAroAQAGcgABdoTxvAAAACV0RVh0ZGF0ZTpjcmVhdGUA\nMjAxOC0wMS0xNlQxNTo1NToxOS0wNTowMG8EODEAAAAldEVYdGRhdGU6bW9k\naWZ5ADIwMTgtMDEtMTZUMTU6NTU6MTktMDU6MDAeWYCNAAAAAElFTkSuQmCC\n"
}