Resource availability — updateAvailability mutation
Integrations can modify selected fields on a persisted clinician availability or unavailability block through the public API.
Affected mutation: updateAvailability
Availability: Practices using the New Semble Appointment System only. The mutation is not available on the legacy appointment system.
Summary
updateAvailability updates an existing ResourceAvailability row identified by id. Only three fields can be changed:
| Field | Purpose |
|---|---|
endDate | Extend or shorten the rule's date range, or clear it with null |
comment | Update the free-text label on the rule |
exclusions | Add skip dates to a recurrence, or clear all exclusions with null |
All other persisted fields — startDate, startTime, endTime, recurrence, user, room, and unavailability — are not modifiable through this mutation. To change times, weekdays, or clinician/room assignment, end the existing rule with endDate and create a new rule from the following day — see Update a recurring availability pattern.
The response is the updated ResourceAvailability under data.
Input
UpdateResourceAvailabilityInput:
| Field | Required | Notes |
|---|---|---|
id | yes | Resource availability ID |
endDate | no | YYYY-MM-DD; pass null to clear the end date |
comment | no | Free-text label |
exclusions | no | YYYY-MM-DD dates to add; see behaviour below |
At least one of endDate, comment, or exclusions must be provided (in addition to id). Sending only id returns No update made: empty update object provided.
Field behaviour
endDate
- Set a new
YYYY-MM-DDvalue to extend or shorten a recurring series, or change when an ad-hoc or recurring rule stops applying. - Pass
nullto clear the stored end date. - Omit the field to leave the current end date unchanged.
- The new end date cannot be before the rule's
startDate(No update made: Start date is greater than end date). - The new end date cannot be in the past (
No update made: End date is in the past).
comment
- Replaces the stored comment when provided.
- Omit the field to leave the current comment unchanged.
exclusions
Used mainly with recurring rules to skip specific calendar days (for example before creating ad-hoc hours on that day). See Create ad hoc availability for a single day.
- Provide an array — dates in
YYYY-MM-DDformat are added to existing exclusions; duplicates are ignored. - Pass
null— clears all exclusions (empty array in the response). - Omit the field — leaves existing exclusions unchanged.
Input dates use YYYY-MM-DD. Returned exclusions on ResourceAvailability are ISO 8601 UTC instants.
Examples
Update comment on an ad-hoc availability
mutation UpdateAvailability($data: UpdateResourceAvailabilityInput!) {
updateAvailability(data: $data) {
data {
id
comment
startDate
endDate
startTime
endTime
}
}
}
Variables:
{
"data": {
"id": "RULE_ID",
"comment": "Updated clinic label"
}
}
Extend a recurring availability
{
"data": {
"id": "RULE_ID",
"endDate": "2026-09-30"
}
}
Add exclusion dates to a recurring rule
{
"data": {
"id": "RULE_ID",
"exclusions": ["2026-08-15", "2026-08-22"]
}
}
Dates are merged with any exclusions already on the rule.
Clear all exclusions
{
"data": {
"id": "RULE_ID",
"exclusions": null
}
}
Override hours on one day of a recurring series
- Add the target date to
exclusionson the recurring rule (this mutation). - Call
createAvailabilityfor the same day with ad-hoc hours (recurrenceomitted).
Full walkthrough: Create ad hoc availability for a single day.
Validation errors
| Situation | Message (summary) |
|---|---|
Missing id | Field "id" of required type "ID!" was not provided |
Invalid id format | ID must be a valid ID |
| Unknown rule | Resource availability with id "…" not found. |
| No updatable fields | No update made: empty update object provided |
Invalid endDate format | Validation error (invalid date string) |
endDate before startDate | No update made: Start date is greater than end date |
endDate in the past | No update made: End date is in the past |
Rules are scoped to the authenticated practice.
Permissions
The mutation requires the settingsAvailabilities permission (same as createAvailability and availabilityRule).
Integration guidance
- Partial updates: Only include fields you intend to change; omitted fields are left as-is.
- Exclusions are additive: Passing
exclusions: ["2026-08-15"]does not replace the full list — it appends. Useexclusions: nullto reset. - Structural changes need a new rule: Changing
startDate, times, recurrence pattern, clinician, room, or availability vs unavailability requires ending the existing rule and creating a new one — see Update a recurring availability pattern.
See also
- API reference:
updateAvailability - API reference:
ResourceAvailability - Release notes:
createAvailability - How-to: Update a recurring availability pattern
- How-to: Create ad hoc availability for a single day
- How-to: Get started with the New Semble Appointment System