Skip to main content

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:

FieldPurpose
endDateExtend or shorten the rule's date range, or clear it with null
commentUpdate the free-text label on the rule
exclusionsAdd 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:

FieldRequiredNotes
idyesResource availability ID
endDatenoYYYY-MM-DD; pass null to clear the end date
commentnoFree-text label
exclusionsnoYYYY-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-DD value to extend or shorten a recurring series, or change when an ad-hoc or recurring rule stops applying.
  • Pass null to 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-DD format 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​

  1. Add the target date to exclusions on the recurring rule (this mutation).
  2. Call createAvailability for the same day with ad-hoc hours (recurrence omitted).

Full walkthrough: Create ad hoc availability for a single day.

Validation errors​

SituationMessage (summary)
Missing idField "id" of required type "ID!" was not provided
Invalid id formatID must be a valid ID
Unknown ruleResource availability with id "…" not found.
No updatable fieldsNo update made: empty update object provided
Invalid endDate formatValidation error (invalid date string)
endDate before startDateNo update made: Start date is greater than end date
endDate in the pastNo 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. Use exclusions: null to 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​