Skip to content

Calendar Management

Calendar Management

DELPHOS calendar management covers three areas: searching available appointment slots, managing provider profiles with their scheduling configuration, and defining recurring schedule templates or one-off overrides.


Search for available appointment slots across one or more providers.

GET /v1/scheduling/slots

Query parameters

ParameterTypeRequiredDescription
date_fromdateYesStart of search range (today or future)
date_todateYesEnd of search range (max 30 days from date_from)
appointment_type_idUUIDYesType of appointment being booked
provider_idUUIDNo*Filter by specific provider profile
specialtystringNo*Cross-provider search by specialty name (max 200 chars)
location_idUUIDNoFilter by location
duration_minutesintegerNoOverride the default appointment duration
limitintegerNoMax slots to return (1-200, default 50)
cursorstringNoPagination cursor from previous response
Terminal window
curl "https://your-instance.delphos.app/v1/scheduling/slots?date_from=2026-05-15&date_to=2026-05-22&appointment_type_id=660e8400-e29b-41d4-a716-446655440001&provider_id=550e8400-e29b-41d4-a716-446655440000&limit=20" \
-H "x-api-key: YOUR_API_KEY"

Response fields (SlotSearchResponse)

FieldTypeDescription
slotsarrayList of AvailableSlot objects
totalintegerNumber of slots in this page
search_msintegerServer-side search duration in milliseconds
next_cursorstring or nullCursor for the next page; null if no more results

AvailableSlot fields

FieldTypeDescription
provider_idUUIDProvider profile UUID
provider_namestringProvider display name
specialtystringSpecialty for this slot
locationobjectLocation with id and name keys
datedateSlot date
start_timestringStart time formatted as HH:MM
end_timestringEnd time formatted as HH:MM
availablebooleanWhether the slot is currently bookable
scorefloatRelevance score (always 1.0 in current version)

Provider Profiles

Provider profiles link a doctor record to scheduling configuration. Each doctor can have one profile per tenant.

Create a provider profile

POST /v1/scheduling/providers
FieldTypeRequiredDefaultDescription
doctor_idUUIDYesUUID of the existing doctor record
default_appointment_duration_minutesintegerNo30Default appointment duration
buffer_between_appointments_minutesintegerNo0Buffer time between appointments
max_daily_appointmentsintegerNonullMax appointments per day (null = unlimited)
max_concurrent_appointmentsintegerNo1Max overlapping appointments
primary_location_idUUIDNonullPrimary location UUID
specialtiesarray of stringsNo[]Scheduling-relevant specialties
is_accepting_new_patientsbooleanNotrueWhether accepting new patient bookings
metadataobjectNo{}Additional metadata

Returns 201. Returns 409 if a profile already exists for this doctor.

List provider profiles

GET /v1/scheduling/providers

Optional filters: specialty, is_active, is_accepting_new_patients. Uses cursor-based pagination with limit (1-100, default 20) and cursor.

Get a provider profile

GET /v1/scheduling/providers/{provider_id}

Update a provider profile

PUT /v1/scheduling/providers/{provider_id}

All fields are optional. Only provided fields are updated.

Deactivate a provider profile

DELETE /v1/scheduling/providers/{provider_id}

Soft-delete — sets is_active = false. Returns 204. Does not remove associated templates or overrides.


Schedule Templates

Templates define recurring weekly availability patterns. Each template belongs to a provider and location combination, has a date range, and contains a list of time slots.

List templates

GET /v1/scheduling/providers/{provider_id}/templates

Returns all active templates with their slots.

Create a template

POST /v1/scheduling/providers/{provider_id}/templates
Terminal window
curl -X POST "https://your-instance.delphos.app/v1/scheduling/providers/PROVIDER_ID/templates" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Consultas Regulares",
"location_id": "550e8400-e29b-41d4-a716-446655440004",
"effective_from": "2026-05-01",
"effective_until": "2026-12-31",
"slots": [
{"day_of_week": 1, "start_time": "08:00", "end_time": "12:00", "slot_type": "available"},
{"day_of_week": 3, "start_time": "08:00", "end_time": "12:00", "slot_type": "available"},
{"day_of_week": 5, "start_time": "08:00", "end_time": "12:00", "slot_type": "available"}
]
}'

Returns 201. Returns 409 if the slots conflict with an existing template at another location for the same provider.

Update a template

PUT /v1/scheduling/providers/{provider_id}/templates/{template_id}

Deactivate a template

DELETE /v1/scheduling/providers/{provider_id}/templates/{template_id}

Soft-delete — returns 204.


Schedule Overrides

Overrides take precedence over recurring templates for a specific date. Use them for holidays, vacation days, or extra working days.

List overrides

GET /v1/scheduling/providers/{provider_id}/overrides

Create an override

POST /v1/scheduling/providers/{provider_id}/overrides
FieldTypeRequiredDescription
override_datedateYesThe specific date to override
override_typestringYes"blocked", "modified", or "added"
(additional fields vary by type)

Override types:

TypeDescription
blockedProvider unavailable (holiday, vacation, sick leave)
modifiedDifferent hours than the regular template for this date
addedExtra working day not in the regular template

Returns 201. Returns 409 if an override already exists for this date.

Delete an override

DELETE /v1/scheduling/providers/{provider_id}/overrides/{override_id}

Hard-delete — permanently removes the override. Returns 204.


Cross-Location Conflict Detection

Check whether a provider’s schedule templates overlap across multiple locations.

GET /v1/scheduling/providers/{provider_id}/cross-location-conflicts

Optional query parameters: date_from, date_to to filter by effective date range.

Returns CrossLocationConflictsListResponse listing any time windows where the provider is scheduled at more than one location simultaneously.

View full multi-location schedule

GET /v1/scheduling/providers/{provider_id}/locations-schedule

Returns the complete schedule view across all locations for the provider.