Skip to main content

Electronic Transmission of Prescriptions Web Services - REST API

Get prescription dispenser information for a patient, using NHS UK Web Services.

Overview

Use this API to get Electronic Prescription Service (EPS) dispenser (and dispensing appliance contractor) information for a patient via NHS UK Web Services.

You can search for dispenser information using:

  • a valid ODS code (previously known as NACS code)
  • their name and service type (community pharmacy or appliance contractor), and whether they are EPS-enabled or not
  • their name, location and the service type, and whether they are EPS-enabled or not
  • their postcode and service type, and whether they are EPS-enabled or not

Use this API if you are building GP software - it provides additional information about dispensing appliance contractors that is not available through Electronic Prescription Service Directory of Services API.


Who can use this API

This API can only be used to support the delivery of health and social care.


The following APIs are related to this one:


API status and roadmap

This API standard is in beta, meaning:

  • it is available for production use
  • we might make breaking changes, but only if we cannot avoid it, and we will give an advance notice

To suggest, comment or vote on features for this API, see our interactive product backlog.


Service level

This API is a bronze service, meaning it is operational and supported only during business hours (8am to 6pm), Monday to Friday excluding bank holidays.

For more details, see service levels.


Technology

This API is a REST API. It is accessed through HTTP and returns data in a JSON format.

For more details, see Basic REST.


Network access

This API is available on the internet and, indirectly, on the Health and Social Care Network (HSCN).

For more details see Network access for APIs.


Security and authorisation

Your API call must include a subscription-key header with a valid subscription key.

Login or register to get an API key to use this API.


Environments and testing

There are no testing environments.

The base URL for all production API calls is https://api.nhs.uk/etp.


Onboarding

There is no onboarding process or assurance required, other than registering to get an API key to use this API.


Endpoints

Search dispensers by name and location

get /SearchByNameAndLocation

Overview

This method retrieves pharmacies or appliance contractors with the address or post code specified that have a name like the one entered, and the service type or EPS status chosen.

This search matches on either part postcode or town name. If you supply both, the postcode is used.

For example, if you supply a part postcode of LS1, the search only returns dispensaries within LS1. No dispensaries in surrounding postcodes are returned even if there are less than 25 in the supplied part postcode results.

For a match against the name, the first part of the stored name is used. For example, a search for 'Coens' should return 'Coens Plc' but not 'The Coens Chemist'.

Request

Query parameters
Name Description
organisationName

String

The name of the pharmacy to search on

Example: Boots

Required
partPostcode

String

First part of a valid postcode to search on

Example: LS2

location

String

Street name or town name to search

Example: Leeds

serviceType

String

The service type to search for - Community Pharmacy (inc. Internet) (1) or Appliance (2)

Example: Community Pharmacy (inc. Internet)

Required
eps

String

Retrieve EPS-enabled or disabled dispensers (YES/ NO) – The default value is YES.

Response

HTTP status: 200

The following is a digest of the returned data:

  • Dispensing site ODS code
  • Site name
  • Site contact details (telephone & fax)
  • Site address and postcode
  • URL
  • EPS status
  • Service type
  • Distance from supplied postcode
  • Services it provides
  • Opening times

Results are ordered by distance from the supplied postcode with the nearest first.

Body

Content type: application/json

Example

Schema

Name Description
object
organisationCode
string

Valid ODS Code

Example: FA818
name
string

The name of the pharmacy to search on

Example: Boots
phone
string

Phone number of dispenser

Example: 1234567890
fax
string

FAX number of dispanser

Example: 1234567890
street
string

Street name of dispenser

Example: 44 High Street
locality
string

Locality of dispenser

Example: Meadowhall Centre
town
string

Town name of dispenser

Example: Sheffield
administrative
string

Administrative area of dispenser

Example: South Yorkshire
postcode
string

Postcode of dispenser

Example: S9 1EN
url
string

URL of dispenser

eps
boolean

Is dispenser EPS-enabled or not

serviceType
string

The service type to search for - Community Pharmacy, including Internet (1) or Appliance (2)

Example: Community
distance
number double

Distance of dispenser from supplied postcode

Example: 0
services
array
object
serviceName
string
Example: Pharmacy Service: Prescription collection from local General Practices
serviceCode
string
Example: SRV0519
serviceProvider
string
openingTimes
array
object
weekDay
string

Day of week

Example: Sunday
times
string

Times

Example: 08:00-16:30
offsetOpeningTime
string

Opening time offset

Example: 480
offsetClosingTime
string

Closing time offset

Example: 990
openingTimeType
string
Example: General
additionalOpeningDate
string

Additional opening date

Example: Dec 24 2022
isOpen
boolean
HTTP status: 400

If any of required parameters are not provided

Search dispensers by name

get /SearchByName

Overview

This method retrieves the first 25 pharmacies or appliance contractors (in alphabetical order) with a name like the one entered and the service type or EPS status chosen.

It is a non-geographical search, that is, for name only for virtual pharmacies or appliance contractors.

The match is based on the first part of the stored name. For example, a search for 'Coens' returns 'Coens Plc' but not 'The Coens Chemist'.

This is not a geographical search and returns any dispensaries within England that meet the name criteria.

Request

Query parameters
Name Description
organisationName

String

The name of the pharmacy to search on

Example: Boots

Required
serviceType

String

The service type to search for - Community Pharmacy (inc. Internet) (1) or Appliance (2)

Example: Community Pharmacy (inc. Internet)

Required
eps

String

Retrieve EPS-enabled or disabled dispensers (YES/ NO) – The default value is YES.

Response

HTTP status: 200

The following is a digest of the returned data:

  • Dispensing site ODS code
  • Site name
  • Site contact details (telephone & fax)
  • Site address and postcode
  • URL
  • EPS status
  • Service type
  • Services it provides
  • Opening times

Results are ordered alphabetically by dispensary name.

Body

Content type: application/json

Example

Schema

Name Description
object
organisationCode
string

Valid ODS Code

Example: FA818
name
string

The name of the pharmacy to search on

Example: Boots
phone
string

Phone number of dispenser

Example: 1234567890
fax
string

FAX number of dispanser

Example: 1234567890
street
string

Street name of dispenser

Example: 44 High Street
locality
string

Locality of dispenser

Example: Meadowhall Centre
town
string

Town name of dispenser

Example: Sheffield
administrative
string

Administrative area of dispenser

Example: South Yorkshire
postcode
string

Postcode of dispenser

Example: S9 1EN
url
string

URL of dispenser

eps
boolean

Is dispenser EPS-enabled or not

serviceType
string

The service type to search for - Community Pharmacy, including Internet (1) or Appliance (2)

Example: Community
distance
number double

Distance of dispenser from supplied postcode

Example: 0
services
array
object
serviceName
string
Example: Pharmacy Service: Prescription collection from local General Practices
serviceCode
string
Example: SRV0519
serviceProvider
string
openingTimes
array
object
weekDay
string

Day of week

Example: Sunday
times
string

Times

Example: 08:00-16:30
offsetOpeningTime
string

Opening time offset

Example: 480
offsetClosingTime
string

Closing time offset

Example: 990
openingTimeType
string
Example: General
additionalOpeningDate
string

Additional opening date

Example: Dec 24 2022
isOpen
boolean
HTTP status: 400

If any of required parameters are not provided

Search dispensers by ODS code

get /SearchByODSCode

Overview

If you know the Organisation Data Service (ODS) code of a local pharmacy, you might not wish to search for a dispenser by name or location. Use this endpoint to validate that the ODS code is a valid dispenser.

It returns pertinent information about the dispenser to allow the end user to validate that the ODS code is the dispenser they intended.

The information returned includes whether the dispenser is EPS-enabled.

This endpoint only returns organisations registered as dispensers. If you supply a valid ODS code but it is not registered as a dispenser, then it returns no data.

Request

Query parameters
Name Description
odscode

String

Valid ODS code such as FLH84, FHH81 or FW866

Example: FLH84

Required

Response

HTTP status: 200

The following is a digest of the returned data:

  • Dispensing site ODS code
  • Site name
  • Site contact details (telephone & fax)
  • Site address and postcode
  • URL
  • EPS status
  • Service type
  • Services it provides
  • Opening times
Body

Content type: application/json

Example

Schema

Name Description
object
organisationCode
string

Valid ODS Code

Example: FA818
name
string

The name of the pharmacy to search on

Example: Boots
phone
string

Phone number of dispenser

Example: 1234567890
fax
string

FAX number of dispanser

Example: 1234567890
street
string

Street name of dispenser

Example: 44 High Street
locality
string

Locality of dispenser

Example: Meadowhall Centre
town
string

Town name of dispenser

Example: Sheffield
administrative
string

Administrative area of dispenser

Example: South Yorkshire
postcode
string

Postcode of dispenser

Example: S9 1EN
url
string

URL of dispenser

eps
boolean

Is dispenser EPS-enabled or not

serviceType
string

The service type to search for - Community Pharmacy, including Internet (1) or Appliance (2)

Example: Community
distance
number double

Distance of dispenser from supplied postcode

Example: 0
services
array
object
serviceName
string
Example: Pharmacy Service: Prescription collection from local General Practices
serviceCode
string
Example: SRV0519
serviceProvider
string
openingTimes
array
object
weekDay
string

Day of week

Example: Sunday
times
string

Times

Example: 08:00-16:30
offsetOpeningTime
string

Opening time offset

Example: 480
offsetClosingTime
string

Closing time offset

Example: 990
openingTimeType
string
Example: General
additionalOpeningDate
string

Additional opening date

Example: Dec 24 2022
isOpen
boolean
HTTP status: 204

OdsCode not found

HTTP status: 400

If the OdsCode is null or empty

Search dispensers by postcode

get /SearchByPostcode

Overview

This endpoint retrieves the 25 nearest pharmacies or appliance contractors to the supplied postcode and the service type or EPS status chosen.

Request

Query parameters
Name Description
fullpostcode

String

Full postcode to search on

Example: LS2 8PJ

Required
serviceType

String

The service type to search for - Community Pharmacy (inc. Internet) (1) or Appliance (2)

Example: Community Pharmacy (inc. Internet)

Required
eps

String

Retrieve EPS-enabled or disabled dispensers (YES/ NO) – The default value is YES.

Response

HTTP status: 200

The following is a digest of the returned data:

  • Dispensing site ODS code
  • Site name
  • Site contact details (telephone & fax)
  • Site address and postcode
  • URL
  • EPS status
  • Service type
  • Services it provides
  • Opening times

Results are ordered by distance from the supplied postcode with the nearest first.

Body

Content type: application/json

Example

Schema

Name Description
object
organisationCode
string

Valid ODS Code

Example: FA818
name
string

The name of the pharmacy to search on

Example: Boots
phone
string

Phone number of dispenser

Example: 1234567890
fax
string

FAX number of dispanser

Example: 1234567890
street
string

Street name of dispenser

Example: 44 High Street
locality
string

Locality of dispenser

Example: Meadowhall Centre
town
string

Town name of dispenser

Example: Sheffield
administrative
string

Administrative area of dispenser

Example: South Yorkshire
postcode
string

Postcode of dispenser

Example: S9 1EN
url
string

URL of dispenser

eps
boolean

Is dispenser EPS-enabled or not

serviceType
string

The service type to search for - Community Pharmacy, including Internet (1) or Appliance (2)

Example: Community
distance
number double

Distance of dispenser from supplied postcode

Example: 0
services
array
object
serviceName
string
Example: Pharmacy Service: Prescription collection from local General Practices
serviceCode
string
Example: SRV0519
serviceProvider
string
openingTimes
array
object
weekDay
string

Day of week

Example: Sunday
times
string

Times

Example: 08:00-16:30
offsetOpeningTime
string

Opening time offset

Example: 480
offsetClosingTime
string

Closing time offset

Example: 990
openingTimeType
string
Example: General
additionalOpeningDate
string

Additional opening date

Example: Dec 24 2022
isOpen
boolean
HTTP status: 400

If any of required parameters are not provided

Search all internet pharmacies

get /SearchInternetPharmacy

Overview

Get all internet pharmacies.

Response

HTTP status: 200

The following is a digest of the returned data:

  • Dispensing site ODS code
  • Site name
  • Site contact details (telephone & fax)
  • Site address and postcode
  • URL
  • EPS status
  • Service type
  • Services it provides
  • Opening times

Results are ordered alphabetically by dispensary name.

Body

Content type: application/json

Schema

Name Description
object
organisationCode
string

Valid ODS Code

Example: FA818
name
string

The name of the pharmacy to search on

Example: Boots
phone
string

Phone number of dispenser

Example: 1234567890
fax
string

FAX number of dispanser

Example: 1234567890
street
string

Street name of dispenser

Example: 44 High Street
locality
string

Locality of dispenser

Example: Meadowhall Centre
town
string

Town name of dispenser

Example: Sheffield
administrative
string

Administrative area of dispenser

Example: South Yorkshire
postcode
string

Postcode of dispenser

Example: S9 1EN
url
string

URL of dispenser

eps
boolean

Is dispenser EPS-enabled or not

serviceType
string

The service type to search for - Community Pharmacy, including Internet (1) or Appliance (2)

Example: Community
distance
number double

Distance of dispenser from supplied postcode

Example: 0
services
array
object
serviceName
string
Example: Pharmacy Service: Prescription collection from local General Practices
serviceCode
string
Example: SRV0519
serviceProvider
string
openingTimes
array
object
weekDay
string

Day of week

Example: Sunday
times
string

Times

Example: 08:00-16:30
offsetOpeningTime
string

Opening time offset

Example: 480
offsetClosingTime
string

Closing time offset

Example: 990
openingTimeType
string
Example: General
additionalOpeningDate
string

Additional opening date

Example: Dec 24 2022
isOpen
boolean