Skip to main content

Create ad hoc availability for a single day

When a clinician has a recurring availability rule (for example, every Monday 09:00–17:00), you may need different hours on one specific day without changing the whole series.

Use exclusions to skip that date on the recurring rule, then create a separate ad hoc availability for the same day with recurrence omitted or set to null.

When to use this pattern

  • Override hours on a single occurrence of a recurring availability
  • Block one day from a recurring series and replace it with different availability
  • Change start/end times for one day only

Step 1: Authenticate

Before making any requests, make sure you have a valid token. Refer to the Authentication section for more details.

Step 2: Exclude the date from the recurring rule

Add the date you want to override to the recurring availability's exclusions array. Exclusion dates use YYYY-MM-DD format.

If the recurring availability already exists, use updateAvailability. Passing an array adds dates to the existing exclusions (duplicates are ignored).

Example: exclude 2026-06-16 from a recurring Monday availability:

curl -X POST https://open.semble.io/graphql \
-H "Content-Type: application/json" \
-H "x-token: yourtoken" \
-d '{
"query": "mutation UpdateAvailability($data: UpdateResourceAvailabilityInput!) { updateAvailability(data: $data) { data { id exclusions } } }",
"variables": {
"data": {
"id": "RECURRING_AVAILABILITY_ID",
"exclusions": ["2026-06-16"]
}
}
}'

You can also pass exclusions when first creating a recurring availability with createAvailability.

Step 3: Create an ad hoc availability for the same day

Create a new availability for the overridden date with no recurrence rule. Omit recurrence, or pass null, to create an ad hoc availability.

Set startDate and endDate to the same day, and provide the desired startTime and endTime. Use the same user, room, and unavailability values as the recurring rule you excluded the date from.

Example: create ad hoc availability on 2026-06-16 from 10:00–14:00:

curl -X POST https://open.semble.io/graphql \
-H "Content-Type: application/json" \
-H "x-token: yourtoken" \
-d '{
"query": "mutation CreateAvailability($data: CreateResourceAvailabilityInput!) { createAvailability(data: $data) { data { id startDate endDate startTime endTime recurrence { frequency } } } }",
"variables": {
"data": {
"comment": "Ad hoc Monday hours",
"unavailability": false,
"user": "CLINICIAN_ID",
"room": "ROOM_ID",
"startDate": "2026-06-16",
"endDate": "2026-06-16",
"startTime": "10:00",
"endTime": "14:00"
}
}
}'

The response recurrence field will be null for ad hoc availabilities.

Summary

  1. Add the target date to exclusions on the recurring availability (via updateAvailability or createAvailability).
  2. Call createAvailability again for the same day with recurrence: null (or omit recurrence) and the hours you want.

Together, these two steps let you override a single day while keeping the rest of the recurrence rule unchanged.