Skip to main content
POST
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 (buffer, visit_type, calculation_method, daily_appointment_limit, daily_limit_type, provider_type, fallback_to_default_hours, max_slot_duration, facility_scoped_scheduling, location_ids) 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

Start date for the availability window in ISO 8601 format (YYYY-MM-DD).

end_date
string<date>
required

End date for the availability window in ISO 8601 format (YYYY-MM-DD). When 1 provider is supplied, end_date may be up to 5 days after start_date. When 2-10 providers are supplied, end_date must equal start_date.

provider_ids
string[]
required

EMR provider IDs to compute availability for (1-10).

Required array length: 1 - 10 elements
buffer
integer

Buffer in minutes to add after appointments of visit_type. Same semantics as GET /availability.

Required range: 0 <= x < 60
visit_type
string

Used with buffer. Same semantics as GET /availability.

calculation_method
enum<string>
default:gaps

Availability calculation strategy. Same semantics as GET /availability.

Available options:
gaps,
slots,
equal_slots
daily_appointment_limit
integer

Same semantics as GET /availability. Requires daily_limit_type.

Required range: x >= 1
daily_limit_type
string

Same semantics as GET /availability. Requires daily_appointment_limit.

provider_type
enum<string>
Available options:
primary,
secondary
fallback_to_default_hours
boolean

Same semantics as GET /availability.

max_slot_duration
integer

Same semantics as GET /availability.

Required range: 5 <= x <= 60Must be a multiple of 5
facility_scoped_scheduling
boolean

Same semantics as GET /availability.

location_ids
string[]

EHR location IDs to filter slots by facility_id.

Response

Request accepted for processing. Results are delivered via webhook.

success
boolean
message
string
job_id
string