API reference
Suggestions
Get ranked alternative slots, find the next available slot for an entity, or run bulk suggestion queries in parallel.
Key points
- Suggestions ranks alternative slots when the preferred time isn’t available
- Use alternatives when you have a specific event in mind; use next-available when you want the soonest viable slot
- Bulk suggestions runs many requests in parallel — useful for batch scheduling
- Ranking criteria and weights are tunable per request
About suggestions
Three endpoints, three different shapes for the same underlying question — “when can this happen?”:
- Alternatives — “I had a specific time in mind, give me alternatives ranked by proximity to it”
- Next available — “just tell me the soonest slot that works”
- Bulk suggestions — “here are 100 requests, return suggestions for each in parallel”
Get alternatives
/api/v1/suggestions/alternativesRank alternative time slots for an event request. Configurable ranking criteria with per-criterion weights.
Headers
x-organization-idUUIDrequiredOrganization scope
Request body
Required: eventType, primaryEntityId, originalRequest. Customize ranking criteria and weights per call.
{
"eventType": "home_visit",
"primaryEntityId": "ent_pt_9001",
"originalRequest": {
"preferredStart": "2026-05-08T10:00:00Z",
"durationMinutes": 60
},
"rankingCriteria": [
{ "criterion": "timeProximity", "weight": 50 },
{ "criterion": "providerPreference", "weight": 30 },
{ "criterion": "mergeOpportunity", "weight": 20 }
],
"maxSuggestions": 5,
"timeWindowDays": 14
}Responses
200Ranked alternatives with score breakdowns{
"suggestions": [
{
"rank": 1,
"score": 0.94,
"startTime": "2026-05-08T11:00:00Z",
"endTime": "2026-05-08T12:00:00Z",
"reasoning": {
"timeProximityScore": 0.85,
"providerMatch": true,
"mergeOpportunity": false
}
},
{
"rank": 2,
"score": 0.88,
"startTime": "2026-05-08T14:00:00Z",
"endTime": "2026-05-08T15:00:00Z",
"reasoning": {
"mergeOpportunity": true,
"existingEventIds": ["evt_pt_session_a"]
}
}
]
}400Invalid request parametersNext available
/api/v1/suggestions/next-availableFind the soonest available slot for an entity. Returns the single best slot, or null if nothing is found within 14 days.
Headers
x-organization-idUUIDrequiredOrganization scope
Query parameters
entityIdUUIDrequiredEntity to find a slot for
eventTypestringrequiredEvent type
durationMinutesintegerrequiredRequired duration
afterDatedatetimeSearch starts from this time (default: now)
Responses
200Next slot, or null if none found within 14 daysBulk suggestions
/api/v1/suggestions/bulk-suggestionsRun multiple suggestion queries in parallel. Each request gets its own suggestions, keyed by your client-provided requestId.
Headers
x-organization-idUUIDrequiredOrganization scope
Request body
Array of suggestion requests, each with a client-provided requestId for response correlation.
{
"requests": [
{
"requestId": "client_req_1",
"eventType": "home_visit",
"primaryEntityId": "ent_pt_9001",
"preferredStart": "2026-05-08T10:00:00Z",
"durationMinutes": 60
},
{
"requestId": "client_req_2",
"eventType": "home_visit",
"primaryEntityId": "ent_pt_9002",
"preferredStart": "2026-05-08T14:00:00Z",
"durationMinutes": 60
}
],
"maxSuggestionsPerRequest": 3
}Responses
200Bulk suggestion results — one entry per input request, correlated by requestId{
"results": [
{
"requestId": "client_req_1",
"suggestions": [ ... ]
},
{
"requestId": "client_req_2",
"suggestions": [ ... ]
}
]
}When to use bulk vs. parallel single calls