Skip to main content
POST/transactional-api/update-patient-telephone-number

Update Patient Telephone Number

Sets the patient's telephone number of the given type, removing any existing number 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-telephone-number' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"telephoneNumber": "07912 345678",
"telephoneNumberType": "mobile",
"preferredTelephoneNumberForSms": false,
"notes": ""
}'

Body parameters

FieldTypeRequiredDescription
patientIdstring<uuid>YesMedicus patient identifier.
telephoneNumberstringYes
telephoneNumberTypeenumYesWhich of the patient's telephone numbers to set. One of: home, temporary, work, mobile.
preferredTelephoneNumberForSmsbooleanNoWhether this becomes the patient's preferred number for SMS. Unsets the flag on any other number.
notesstring (nullable)No

Responses​

200 Telephone number updated.

Response fields

FieldTypeDescription
statusstring
{
"status": "ok"
}
400 Validation error.
5 possible code values
CodeDescriptionWhen
missing-patient-idThe patientId is requiredpatientId missing
invalid-patient-idThe patientId is not validpatientId not a valid UUID
invalid-telephone-number'' is not a valid telephone number.telephoneNumber missing or not a recognisable telephone number
invalid-telephone-number-typeThe telephoneNumberType must be one of: home, temporary, work, mobiletelephoneNumberType missing or not one of home/temporary/work/mobile
patient-not-foundPatient not found for this patientIdpatientId doesn't exist

Response fields

FieldTypeDescription
errors[].codestring
errors[].descriptionstring
{
"errors": [
{
"code": "missing-patient-id",
"description": "The patientId is required"
}
]
}
403 The call is application-restricted rather than user-restricted.

Response fields

FieldTypeDescription
errors[].codestring
errors[].descriptionstring
{
"errors": [
{
"code": "application-restricted-not-supported",
"description": "This endpoint is only available to user-restricted callers."
}
]
}