Skip to main content
POST
Fetch Patients
This is an async operation that fetches up-to-date patient data directly from the EMR system. If the newest data is not critical, consider using the GET /patients endpoint instead for faster results from cached data.

Optional Includes

Use include to opt into additional live-fetch payloads. The API accepts either:
  • a comma-delimited string, for example include: "insurances"
  • an array of strings, for example include: ["insurances"]
Currently supported include values:
  • insurances
  • problems
  • medical_history
  • labs
  • labs.results (orders plus discrete result values; implies labs)
  • tasks
  • tasks.notes (tasks plus attatched notes; implies tasks)
tasks.notes implies tasks — you do not need to pass both. Requesting tasks.notes makes an extra live fetch per task to pull its note history, so only request it when you need the notes.

Example Request

Response Data

Patient data includes comprehensive information including active medications and associated pharmacies:

Insurances Array

insurances is only returned when include contains insurances. It is currently supported for eClinicalWorks.
The top-level insurance_name and insurance_subscriber_number fields remain convenience fields on the patient object. When present, prefer insurances[] for record-specific insurance details and update targeting.

Guarantors Array

eClinicalWorks only. Each entry represents a guarantor on the patient’s account. Empty array if the lookup fails. The top-level patient_balance and account_balance fields (numbers, in dollars) are returned alongside the guarantors. Both are null if the lookup fails.

Alerts Object

eClinicalWorks only. Contains the patient’s billing and global alerts. May be null if the alerts lookup fails.

Medications Array

Each patient includes an array of active medications with the following fields:

Pharmacies Array

Each patient includes an array of associated pharmacies with the following fields:

Encounters Array

Each patient includes an array of encounters (past and upcoming appointments) returned by the EMR. Field availability varies by EMR and visit type. Telephone encounters (visit_type: "TEL") are enriched with additional fields including caller, message, actions, notes, assigned_to, answered_by, priority, and has_attachment. The top-level last_appointment_date field is derived from the encounters array and reflects the most recent appointment date for the patient.

Tasks Array

ModMed Gastro only. Returned only when include contains tasks (or tasks.notes). Each entry is a task from the patient’s chart. ModMed Gastro models telephone encounters as tasks with category: "Telephone Encounter" — use category to distinguish task types. All task types are returned; filter client-side on category if you only want a subset.

Task Notes Array

Each task’s notes[] (present only with tasks.notes) contains its note history, most recent first:

Webhook Notifications

When the patient fetch is complete, we will send a webhook to your registered endpoint. Here is an example of what the webhook payload will look like:

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
search_by
enum<string>
required

Identifies the search method or criteria being used.

Available options:
dob,
name,
phone,
mrn
dob
string<date>

Date of birth in ISO 8601 format (YYYY-MM-DD).

first_name
string

Patient's first name.

last_name
string

Patient's last name.

phone
string

Phone number in format XXX-XXX-XXXX (e.g., "555-123-4567").

Pattern: ^\d{3}-\d{3}-\d{4}$
mrn
string

Medical Record Number (MRN) to search for a specific patient.

include

Optional related resources to include in the live-fetch payload. Supports different values depending on your connected EMR system:

eClinicalWorks: insurances, problems, medical_history, labs, labs.results (orders plus discrete result values; implies labs). Credible: insurances, documents, encounters, episodes, notes, assessments, care_plans, clinical_notes. ModMed Gastro: tasks, tasks.notes (implies tasks).

Only include values supported by your EMR — an unsupported value will return a 400 error with the list of valid values for your system. Accepts either a comma-delimited string or an array of strings.

Example:

"problems,medical_history,labs.results"

Response

Request accepted for processing

success
boolean
message
string
job_id
string