Skip to main content
POST
Live-fetch appointments
This is a slow operation that fetches up-to-date appointment data directly from the EMR system. If the newest data is not critical, consider using the GET /appointments endpoint instead for faster results from cached data.

Search Modes

Date Range (default)

Fetches appointments for a date range (max 7 days). Results are synced to the database and returned via webhook.

MRN

Fetches all appointments for a specific patient by MRN, enriched with created_at and created_by timestamps.

Provider

Fetches appointments for one or more providers in a single EMR call. Results are synced to the database (scoped to the requested providers) and returned via webhook.
  • provider_ids: required array of EMR provider IDs (max 10)
  • 1 provider: end_date may be up to 5 days after start_date
  • 2-10 providers: start_date must equal end_date

Webhook Notifications

When the appointment fetch is complete, we will send a webhook to your registered endpoint.

Date Range Webhook

When the request includes ehr_audit_log, each appointment also carries created_at, created_by, and an ehr_audit_log array of every field change (who changed it, when, and old → new):

MRN Webhook

Provider Webhook

Each appointment uses the same shape as the Date Range Webhook above.

Authorizations

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

Body

application/json
search_by
enum<string>
default:date_range

Search mode. Defaults to date_range.

Available options:
date_range,
mrn,
provider
Example:

"date_range"

start_date
string<date>

Start of the date range (YYYY-MM-DD). Required for date_range and provider modes.

Example:

"2026-06-15"

end_date
string<date>

End of the date range (YYYY-MM-DD). Required for date_range and provider modes.

Example:

"2026-06-15"

mrn
string

Patient MRN. Required for mrn mode.

Example:

"12345"

provider_ids
string[]

EMR provider IDs (1-10). Required for provider mode.

Example:
include
enum<string>

Additional data to enrich each appointment with, as a comma-separated string or an array of tokens. Works in every search mode. Accepted tokens depend on the EMR (see x-allowed-values-for-emrs). ehr_audit_log returns the appointment change history (who changed which field from what to what, and when) plus created_at and created_by; one log lookup per appointment.

Available options:
ehr_audit_log,
appointment_notes,
referral
callback_urls

URL(s) to receive the completion webhook for this live fetch.

Example:

Response

Live fetch request accepted

success
boolean
required
message
string
required
job_id
integer