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
- Javascript
- Python
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"]
}
}
}'
const fetch = require('node-fetch');
const query = `
mutation UpdateAvailability($data: UpdateResourceAvailabilityInput!) {
updateAvailability(data: $data) {
data {
id
exclusions
}
}
}
`;
const variables = {
data: {
id: 'RECURRING_AVAILABILITY_ID',
exclusions: ['2026-06-16'],
},
};
fetch('https://open.semble.io/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-token': 'yourtoken',
},
body: JSON.stringify({ query, variables }),
})
.then((res) => res.json())
.then((res) => console.log(res.data));
import requests
import json
query = """
mutation UpdateAvailability($data: UpdateResourceAvailabilityInput!) {
updateAvailability(data: $data) {
data {
id
exclusions
}
}
}
"""
variables = {
"data": {
"id": "RECURRING_AVAILABILITY_ID",
"exclusions": ["2026-06-16"]
}
}
headers = {
'Content-Type': 'application/json',
'x-token': 'yourtoken',
}
response = requests.post(
'https://open.semble.io/graphql',
headers=headers,
data=json.dumps({"query": query, "variables": variables})
)
print(response.json())
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
- Javascript
- Python
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"
}
}
}'
const fetch = require('node-fetch');
const query = `
mutation CreateAvailability($data: CreateResourceAvailabilityInput!) {
createAvailability(data: $data) {
data {
id
startDate
endDate
startTime
endTime
recurrence {
frequency
}
}
}
}
`;
const 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',
},
};
fetch('https://open.semble.io/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-token': 'yourtoken',
},
body: JSON.stringify({ query, variables }),
})
.then((res) => res.json())
.then((res) => console.log(res.data));
import requests
import json
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"
}
}
headers = {
'Content-Type': 'application/json',
'x-token': 'yourtoken',
}
response = requests.post(
'https://open.semble.io/graphql',
headers=headers,
data=json.dumps({"query": query, "variables": variables})
)
print(response.json())
The response recurrence field will be null for ad hoc availabilities.
Summary
- Add the target date to
exclusionson the recurring availability (viaupdateAvailabilityorcreateAvailability). - Call
createAvailabilityagain for the same day withrecurrence: null(or omitrecurrence) and the hours you want.
Together, these two steps let you override a single day while keeping the rest of the recurrence rule unchanged.