Updates an existing patient record. Pass only the fields you want to change. At least one updatable field must be supplied. Fields not listed below are rejected with 422. When the body also contains at least one listed field, the message is Unknown field(s): <names>. When the body contains only fields that are not listed, the message is At least one field must be provided for update.
Use cases
Sync demographic changes from an external CRM.
Update contact details (phone, email, address) after a patient visit.
Correct typos in patient names.
Request body
Pass any subset of the following fields. At least one is required.
firstname
| string | 1-30 characters (Latin-1). |
surname
| string | 1-30 characters (Latin-1). |
date_of_birth
| string | YYYY-MM-DD, 1900-01-01 to today. |
practitioner_id
| number | Preferred practitioner. Active practitioner_id from /api/v1/practitioners. Send 0 to remove the patient's preferred practitioner. Omit the field to leave it unchanged. |
gender_code
| string | M or F (either case). Any other value is rejected with 422.
|
title
| string | Up to 6 characters (for example MR, MRS, DR). |
middle_name
| string | Up to 15 characters. |
email
| string | Up to 60 characters. Must be a complete address (for example user@example.com). Anything else, including a value made only of spaces, returns 400 with the message Invalid email format followed by the reason (no support_code). An empty string ("") clears the stored email address; the request returns 200 and the field reads back as an empty string. |
phone_home
| string | Up to 20 characters. |
phone_mobile
| string | Up to 20 characters. Must contain 7 to 15 digits; spaces, hyphens, brackets and + are allowed. Anything else, including a value made only of spaces, returns 400 with the message Invalid mobile number format or Invalid mobile number length (no support_code). An empty string ("") clears the stored number; the request returns 200 and the field reads back as an empty string. |
phone_work
| string | Up to 20 characters. |
occupation
| string | Up to 30 characters. |
company
| string | Up to 100 characters. |
address_line1
| string | Up to 300 characters. |
address_line2
| string | Up to 40 characters. |
suburb
| string | Up to 80 characters. |
state
| string | One of NSW, VIC, QLD, WA, SA, TAS, ACT or NT (either case). Any other value returns 400 PW-6027. |
postcode
| string | 4 digits, 0200-9999. |
address_line1_work
| string | Up to 300 characters. |
address_line2_work
| string | Up to 40 characters. |
suburb_work
| string | Up to 80 characters. |
state_work
| string | One of NSW, VIC, QLD, WA, SA, TAS, ACT or NT (either case). Any other value returns 400 PW-6027. |
postcode_work
| string | 4 digits, 0200-9999. |
Returns
A 200 response returns the updated patient object in data[0]. The fields match those described on Get patient by ID.
If the patient is updated but the address cannot be saved, the response is 200 with support_code PW-6015, the patient id in partial_patient_id and a warnings[] entry. Send the address fields again.
Error responses
200 | PW-6015
| The patient was updated but the address could not be saved. See partial_patient_id and warnings[]. |
400 | PW-6010
| date_of_birth outside 1900-01-01 to today.
|
400 | PW-6020
| postcode failed Australian validation.
|
400 | PW-6025 / PW-6026
| Unsupported character, or field too long after conversion. |
400 | PW-6023
| A field contains HTML or script-like content (for example < followed by a letter). |
400 | PW-6027
| state or state_work is not one of NSW, VIC, QLD, WA, SA, TAS, ACT or NT.
|
400 | (none) | email or phone_mobile has an invalid format.
|
403 | PW-6008
| Access denied. |
404 | PW-6013
| patient_id does not exist.
|
404 | PW-6012
| practitioner_id not found or not active.
|
500 | PW-6014
| The patient could not be updated. Retry. |
500 | PW-6016
| The patient update was not saved. Retry. |
500 | PW-6017
| The outcome could not be confirmed. Read the patient with GET Patient By ID before sending the update again. |
422 | (none) | Empty body, a body where every field is null, a field not listed above, gender_code other than M or F, invalid field type/format, or path patient_id out of range. |
For the canonical list of error codes, see Validation, Limits & Character Handling.
Example error responses
Patient not found (404):
{ "data": [], "status": false, "message": "Patient 999999999 not found.", "support_code": "PW-6013" }
Empty body (422):
{ "data": [], "status": false, "message": "At least one field must be provided for update." }
Field not listed above, sent together with a listed field (422):
{ "data": [], "status": false, "message": "Unknown field(s): foo" }
Only fields that are not listed above (422):
{ "data": [], "status": false, "message": "At least one field must be provided for update." }
Body with every field null (422):
{ "data": [], "status": false, "message": "At least one field must be provided for update." }
Invalid email format (400):
{ "data": [], "status": false, "message": "Invalid email format: must be a complete email address (e.g. user@example.com)." }
Path patient_id out of range (422):
{ "data": [], "status": false, "message": "'path -> patient_id': ensure this value is less than or equal to 999999999" }
date_of_birth out of range (400):
{ "data": [], "status": false, "message": "date_of_birth must be between 1900-01-01 and today (got 1850-01-01).", "support_code": "PW-6010" }
Invalid postcode (400):
{ "data": [], "status": false, "message": "postcode must be a valid Australian postcode (4 digits, range 0200-9999; got 'ABCD').", "support_code": "PW-6020" }
Unsupported characters (400):
{ "data": [], "status": false, "message": "One or more fields contain characters the practice management system cannot store and that have no accepted ASCII equivalent (fields: firstname). Re-submit using Latin characters only. [PW-6025]", "support_code": "PW-6025" }
Field too long after conversion (400):
{ "data": [], "status": false, "message": "One or more fields exceed the maximum length the practice management system accepts after special characters were converted to plain text (fields: firstname (56>30)). Shorten the affected field(s) and resubmit. [PW-6026]", "support_code": "PW-6026" }
Important notes
Apostrophes: text that contains an apostrophe is stored as sent, so
O'Brien is stored with one apostrophe. Before November 2026 it was stored with two (
O''Brien). See the
Change Log.
Path parameter patient_id must be between 1 and 999,999,999.
An empty body, or a body where every field is null, is rejected with 422 "At least one field must be provided for update."
practitioner_id must be an active practitioner_id from /api/v1/practitioners. Send 0 to remove the preferred practitioner. Omit the field to leave it unchanged.
This endpoint does not accept an
Idempotency-Key. If a request times out or returns
502,
503 or
504, read the patient with
Get patient by ID before sending it again.
Platform errors such as
MOD-4268 (the practice database needs an upgrade),
RP-5037 (daily request allowance used up for a Halo Connect practice) and
SVC-502,
SVC-503 and
SVC-504 can be returned by any endpoint. See
Validation, Limits & Character Handling.
All other field validation rules from Create patient apply, including accent conversion, postcode validation, and column-width caps.
Quick example
curl -X PATCH "https://api-uat.dental4web.com.au/api/v1/patients/72" \
-H "x-api-key: $API_KEY" \
-H "org-id: $ORG_ID" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"phone_mobile":"0412345678","email":"john.mitchell@example.com"}'