POST
/transactional-api/update-eps-nominated-pharmacyUpdate EPS Nominated Pharmacy
Sets or replaces the patient's EPS nominated pharmacy. Omit or send an empty pharmacyOdsCode to remove the nomination instead. User-restricted only.
Authorization: Bearer token (JWT). See Authentication.
Request
curl -L -X POST 'https://{tenantId}.api.england.medicus.health/transactional-api/update-eps-nominated-pharmacy' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <token>' \
-d '{
"patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"pharmacyOdsCode": "FA565"
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
patientId | string<uuid> | Yes | Medicus patient identifier. |
pharmacyOdsCode | string (nullable) | No | ODS code of the nominated pharmacy. Must belong to a pharmacy registered on ETP for community dispensing. Omit or leave empty to remove the existing nomination. |
Responses
200 Nominated pharmacy updated.
Response fields
| Field | Type | Description |
|---|---|---|
status | string |
{
"status": "ok"
}
400 Validation error.
4 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 |
patient-not-found | Patient not found for this patientId | patientId doesn't exist |
invalid-pharmacy-ods-code | ODS code could not be found, or is not registered as a community pharmacy. | pharmacyOdsCode does not resolve to an organisation, or is not registered on ETP for community dispensing |
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."
}
]
}