Skip to main content
POST
Live-fetch availability
This is an async operation that fetches up-to-date appointment data directly from the EMR and computes availability in one pass. If freshness is not critical, use GET /availability instead, which returns availability against cached appointment data.

Request Constraints

  • provider_ids: required array of EMR provider IDs. Must contain between 1 and 10 entries.
  • A single provider may span up to a 5-day window.
  • Two or more providers must share a single date (start_date must equal end_date).
All availability-calculation parameters (calculation_method, daily_appointment_limit, daily_limit_type, provider_type, fallback_to_default_hours, max_slot_duration, facility_scoped_scheduling, location_ids, cancelled_statuses) are optional and follow the same defaults and validation rules as GET /availability.

Example Request (1 provider, 5 days)

Example Request (multiple providers, single day)

Webhook Notification

When the fetch completes, we send an availability.live_fetch_completed event to your registered webhook endpoint with the computed slots inline. The slots themselves are not persisted, but as a side effect the underlying appointments returned by the EMR are written to our appointments cache — a follow-up GET /availability reflects the live state.
Each slot always includes day_of_week (1-7, ISO weekday), date (YYYY-MM-DD), duration_string, range_start, range_end, and provider_id. facility_id and facility_name are present when the source EHR scopes the shift to a specific location. visit_type, available_appointments, and max_visits appear when calculation_method is slots or equal_slots.

Authorizations

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

Body

application/json
start_date
string<date>
required

Range start (YYYY-MM-DD).

Example:

"2026-03-15"

end_date
string<date>
required

Range end (YYYY-MM-DD). One provider spans up to 5 days; 2–10 providers must share a single day.

Example:

"2026-03-20"

provider_ids
string[]
required

EMR provider IDs to fetch availability for (1–10).

Example:
buffer

Minutes of buffer between slots (0–59).

Example:

15

visit_type
string

Visit-type code to size slots for. Requires buffer to be set.

Example:

"FOLLOW-UP"

calculation_method
string

Slot calculation method: gaps, slots, or equal_slots.

Example:

"gaps"

daily_appointment_limit

Max appointments per day (positive integer). Requires daily_limit_type.

Example:

8

daily_limit_type
string

Visit-type code the daily limit applies to. Requires daily_appointment_limit.

Example:

"all"

provider_type
string

Which provider slot to match on: primary or secondary.

Example:

"primary"

fallback_to_default_hours

Use default business hours when a provider has no configured hours.

max_slot_duration

Cap on slot length in minutes (5–60, multiples of 5).

Example:

30

facility_scoped_scheduling

Scope slots per facility rather than per provider.

location_ids
string[]

Filter returned slots to these EMR location IDs.

Example:
cancelled_statuses
string[]

Appointment statuses to treat as cancelled, freeing the slot. When provided, this overrides the default cancelled/rescheduled detection; statuses are matched case-insensitively. Use this when your clinic uses custom status codes (e.g. "RS" for rescheduled).

Example:
callback_urls
string[]

URLs to receive the results webhook, in addition to the account webhook.

Response

Live-fetch request accepted; results delivered by webhook

success
boolean
required
message
string
required
job_id
integer
required