API reference
Waitlist
Manage waitlist entries. Add entities with priority and requirements; find matches; fulfill entries with events; notify when slots open.
Key points
- Waitlist entries describe an unfulfilled scheduling request — entity, event type, time range, requirements
- Higher priority entries get matched first when slots open
- Auto-fulfillment is configured at the template level; manual fulfillment goes through POST /fulfill
- Entries expire automatically; cancelled entries don’t auto-fulfill
About waitlist
The waitlist holds entries that couldn’t be scheduled immediately — usually because no slot matched the requirements at the time of request. When a matching slot opens (a cancellation, a new pattern, capacity changes), the engine can auto-fulfill or notify per template configuration.
Two fulfillment models:
- Auto-fulfill — the engine watches for matching slots and books them automatically. Configured at the template level.
- Manual fulfill — the engine notifies a dispatcher; the dispatcher reviews matches and fulfills explicitly via
POST /fulfill.
Add to waitlist
/api/v1/waitlistAdd an entity to the waitlist for an event type with preferences and requirements.
Headers
x-organization-idUUIDrequiredOrganization scope
x-template-idstringrequiredTemplate ID
Request body
Required: requestedEntityId, eventType, preferredDateRange, durationMinutes. Priority and requirements are optional.
{
"requestedEntityId": "ent_participant_001",
"eventType": "home_visit",
"preferredDateRange": {
"startDate": "2026-05-01",
"endDate": "2026-05-31"
},
"durationMinutes": 60,
"priority": 5,
"requirements": {
"preferredStaffId": "ent_staff_a8f4",
"morningOnly": true
},
"notes": "Patient prefers morning appointments",
"expiresAt": "2026-05-01T00:00:00Z"
}Responses
201Entry added{
"id": "wait_a8f4c2d1-...",
"requestedEntityId": "ent_participant_001",
"eventType": "home_visit",
"status": "pending",
"priority": 5,
"preferredDateRange": {
"startDate": "2026-05-01",
"endDate": "2026-05-31"
},
"durationMinutes": 60,
"addedAt": "2026-04-26T15:30:00.000Z",
"expiresAt": "2026-05-01T00:00:00Z",
"lastNotifiedAt": null,
"fulfilledEventId": null
}400Invalid request payloadList waitlist
/api/v1/waitlistPaginated list of waitlist entries. Filter by status, entity, or event type.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
statusenumpending, notified, fulfilled, cancelled, expired
entityIdUUIDFilter by entity
eventTypestringFilter by event type
limitintegerDefault 20, max 100
offsetintegerDefault 0
Responses
200Paginated waitlist entriesFind matches
/api/v1/waitlist/pending/matchFind available slots that satisfy a waitlist entry’s requirements. Use to surface candidate slots to dispatchers.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
waitlistIdstringrequiredWaitlist entry to match
Responses
200Matching slots ranked by suitability{
"matches": [
{
"startTime": "2026-05-08T10:00:00Z",
"endTime": "2026-05-08T11:00:00Z",
"score": 0.95,
"satisfiesRequirements": true,
"matchReason": "Preferred staff available, morning slot"
}
]
}404Waitlist entry not foundGet entry
/api/v1/waitlist/{waitlistId}Retrieve a single waitlist entry.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
waitlistIdstringrequiredEntry ID
Responses
200Entry details{
"id": "wait_a8f4c2d1-...",
"requestedEntityId": "ent_participant_001",
"eventType": "home_visit",
"status": "pending",
"priority": 5,
"preferredDateRange": {
"startDate": "2026-05-01",
"endDate": "2026-05-31"
},
"durationMinutes": 60,
"addedAt": "2026-04-26T15:30:00.000Z",
"expiresAt": "2026-05-01T00:00:00Z",
"lastNotifiedAt": null,
"fulfilledEventId": null
}404Waitlist entry not foundCancel entry
/api/v1/waitlist/{waitlistId}Cancel a waitlist entry. Status flips to cancelled; auto-fulfillment stops considering this entry.
Headers
x-organization-idUUIDrequiredOrganization scope
x-user-idstringrequiredActing user for audit
Path parameters
waitlistIdstringrequiredEntry to cancel
Responses
204Cancelled; no response body404Waitlist entry not foundFulfill entry
/api/v1/waitlist/{waitlistId}/fulfillFulfill a waitlist entry by linking it to an event that satisfies its requirements. Status flips to fulfilled.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
waitlistIdstringrequiredEntry to fulfill
Request body
Provide the event that fulfills this entry. notifyEntity controls whether the entity is notified about fulfillment.
{
"eventId": "evt_b29f4e58-...",
"notifyEntity": true
}Responses
200Entry fulfilled successfully400Waitlist entry is not in a fulfillable state404Waitlist entry not foundNotify entry
/api/v1/waitlist/{waitlistId}/notifyNotify the waitlist entry about available slots. Marks the entry as notified; uses configured notification channels.
Headers
x-organization-idUUIDrequiredOrganization scope
Path parameters
waitlistIdstringrequiredEntry to notify
Responses
200Notification sent and entry marked as notified404Waitlist entry not foundNotify is a workflow step, not a one-shot send
notified and starts a response window. If the entity confirms within the configured response timeout, the entry can be auto-fulfilled. If they decline or time out, the next-priority entry is considered. Don’t call notify repeatedly — use the notification status as state.