PATCH Appointment
Updates a small set of mutable fields on an existing, non-cancelled appointment. The PATCH surface is intentionally narrow. To move the appointment in time or change its book, use Reschedule appointment instead.
Use cases
- Adjust the appointment finish time after the patient arrives (for example a shorter procedure).
- Update the
notesfield after the practitioner records additional context. - Reassign the appointment to a different practitioner without changing time or book.
Request body
| string | Optional. HH:MM, must remain inside the book's operating hours. |
| integer | Optional. |
| string | Optional. Up to 450 characters. |
| integer | Optional, 1 or greater. The staff member to record as Appointed By. Leave it out (or send |
At least one of finish_time, notes, practitioner_id or created_user_id must be supplied.
On a practice on data model V20 or later, an update changes the appointment in place: it keeps its appointment_id, its Appointed By, its reminders and its creation date. The practitioner stored on the appointment is only checked again when you send practitioner_id, so an appointment whose stored practitioner has since been made inactive can still be updated.
On a practice older than V20 a created_user_id is not recorded, and the response warnings carries “Appointed By cannot be recorded for this organisation yet: it requires API Data Model V20 or higher and this organisation’s data model predates it, so it was left out of the request. Contact dentalapi@centaursoftware.com to arrange a data model upgrade.” A PATCH that contains only created_user_id for such a practice returns 400 AW-6053 with that warning.
Returns
A 200 returns the updated appointment in data (an array holding the one appointment), with the same fields as Get appointment by ID.
Error responses
400 |
| New |
404 |
| Source appointment not found or is cancelled. |
404 |
| New |
422 |
| Appointed By user N was not found: |
409 |
| This appointment was changed by another user. Someone changed the appointment while the update was running. Read the appointment again and send the update again. |
400 |
| No update fields provided. Specify at least one field to change. Returned when the only field sent is |
400 |
|
|
400 | (none) |
|
409 |
| Practices on data models before V18 only. Update failed partway through and was rolled back to the original appointment. |
500 |
| Practices on data models before V18 only. Critical: update failed partway through and could not be rolled back. Contact support immediately. |
422 | (none) | Body has none of |
409 |
| The change would overlap another appointment (the time slot is no longer available). |
409 |
| The appointment book is locked for that day by another session, for example someone editing the day at the practice. The lock is temporary: retry after a short wait (for example 30 to 60 seconds) or offer another book or day. |
422 |
| The new |
400 |
| The |
409 |
| The appointment id maps to more than one appointment, so it cannot be updated safely. Contact support. |
notes containing characters with no ASCII equivalent, or exceeding the column width after conversion, return 400 with AW-6025 / AW-6026.
notes content that looks like HTML or script is rejected outright with 400 (AW-6023 for markup-shaped content, no support_code for script/event-handler-shaped content); nothing is saved, nothing is sanitised. This is the same validation layer as Create appointment.
For the canonical list of error codes, see Validation, Limits & Character Handling.
Example error responses
Source appointment not found (404):
{ "data": [], "status": false, "message": "Source appointment not found.", "support_code": "AW-6013" }
No updatable fields supplied (422):
{ "data": [], "status": false, "message": "At least one of finish_time / notes / practitioner_id must be supplied" }
Invalid finish time (400):
{ "data": [], "status": false, "message": "Finish time is invalid.", "support_code": "AW-6054" }
Practitioner not found (404):
{ "data": [], "status": false, "message": "Practitioner not found.", "support_code": "AW-6052" }
Notes contain disallowed HTML markup (400):
{ "data": [], "status": false, "message": "notes contains a disallowed HTML markup pattern and was rejected. Strip HTML tags / script / iframe / event-handler markup from this field and retry.", "support_code": "AW-6023" }
Notes contain script-shaped content (400):
{ "data": [], "status": false, "message": "Request rejected by security policy. Check your input does not contain HTML or script content." }
Important notes
- Only three fields are mutable via PATCH:
finish_time,notes, andpractitioner_id. Other fields in the body are ignored, so a body that holds only other fields is rejected with the422above. - At least one of these must be supplied. A body with every field null or omitted is rejected with
422. Sending values that already match the stored appointment returns200with the unchanged appointment; nothing is written. - Cancelled appointments are not visible to PATCH and return
404 AW-6013 "Source appointment not found"by design. - On data model V18 or later, a change that cannot be completed is rolled back and the response gives the real cause, for example
AW-6021(time slot busy),AW-6020(day locked),AW-6052(practitioner not found or no longer active) orAW-6026(notes too long). Practices on older data models can returnAW-6057(rolled back) or, rarely,AW-6097(could not be rolled back, contact support) instead. - To change
appointment_date,start_time,appt_book_id,patient_id, orclass_id, usePOST /api/v1/appointments/{id}/reschedule. - No duplicate protection: this endpoint does not accept an
Idempotency-Key. If a request times out or returns502,503or504, read the appointment with Get appointment by ID before sending it again: the change may already have been saved. - Platform errors: errors such as
MOD-4268(the practice database needs an upgrade) andRP-5037(the Halo Connect daily request quota for the practice is used up; retry after the time given) can be returned by any endpoint. See Validation, Limits & Character Handling.
Quick example
curl -X PATCH "https://api-uat.dental4web.com.au/api/v1/appointments/85799" \
-H "x-api-key: $API_KEY" \
-H "org-id: $ORG_ID" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"finish_time": "14:45", "notes": "Extended for additional treatment"}' Header Parameters
(Required)
Path Parameters
Body Parameters
Optional. HH:MM, must remain inside the book's operating hours.
Practitioner_id from /api/v1/practitioners (1 or greater).
Optional. Up to 450 characters
Optional, 1 or greater. Staff member to record as Appointed By (data model V20 or later). Omit to keep the current value; it cannot be cleared.
Response
Response Attributes
Show child attributes
{ "detail": [ { "loc": ["query", "from_date"], "msg": "Invalid date format. Expected YYYY-MM-DD.", "type": "value_error" } ] }
Response Attributes
Response Attributes
Response Attributes
PATCH
/
1