POST
/transactional-api/update-patient-addressUpdate Patient Address
Sets the patient's address of the given type, removing any existing address of that type first. User-restricted only.
Authorization: Bearer token (JWT). See Authentication.
Request
curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/update-patient-address' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"addressType": "home",
"address": {
"line1": "1 High Street",
"line2": "",
"line3": "",
"locality": "Leeds",
"administrativeArea": "West Yorkshire",
"postalCode": "LS1 1AA",
"country": "GBR"
},
"isCorrespondenceAddress": false,
"description": "",
"accessNotes": ""
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
patientId | string<uuid> | Yes | Medicus patient identifier. |
addressType | enum | Yes | Which of the patient's addresses to set. One of: home, work, other. |
address | object | Yes | Object with: line1, line2, line3, locality, administrativeArea, postalCode, country. |
isCorrespondenceAddress | boolean (nullable) | No | Whether this becomes the patient's correspondence address. Unsets the flag on any other address. |
description | string (nullable) | No | |
accessNotes | string (nullable) | No |
Responses
200 Address updated.
Response fields
| Field | Type | Description |
|---|---|---|
status | string |
{
"status": "ok"
}
400 Validation error.
5 possible code values
| Code | Description | When |
|---|---|---|
missing-patient-id | The patientId is required | patientId missing |
invalid-patient-id | The patientId is not valid | patientId not a valid UUID |
invalid-address-type | The addressType must be one of: home, work, other | addressType missing or not one of home/work/other |
missing-address-line1 | The address is required, with at least line1. | address is missing, or its line1 is missing |
patient-not-found | Patient not found for this patientId | patientId doesn't exist |
Response fields
| Field | Type | Description |
|---|---|---|
errors[].code | string | |
errors[].description | string |
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}
403 The call is application-restricted rather than user-restricted.
Response fields
| Field | Type | Description |
|---|---|---|
errors[].code | string | |
errors[].description | string |
{
"errors": [
{
"code": "application-restricted-not-supported",
"description": "This endpoint is only available to user-restricted callers."
}
]
}