---
title: "Search dispensers by opening hours & location"
method: GET
path: "/epsdispenser/byLocationAndTime"
---

# Search dispensers by opening hours & location

`GET /epsdispenser/byLocationAndTime`

Searches for a suitable dispenser based on patient location and opening hours, ensuring that opening times fall within the timeframe required. Returns a maximum of five matching dispensers.

## Query parameters

- `postcode` string, required
- `distance` number
- `timeframe` number, required
- `availability_start` string
- `service_type` 'eps_pharmacy'

## Response `200`

Up to five dispensers matching the search cirteria, ordered by distance.

- Dispenser[]
  - `ods` string, required — ODS code of the dispenser
  - `name` string, required — Name of the dispenser
  - `service_type` 'eps_pharmacy', required — The service type to include in results. The current release only supports EPS-enabled community pharmacy: * `eps_pharmacy` - An EPS R2 enabled community pharmacy
  - `address` object, required — Street address of the dispenser
    - `line` string[] — Five address lines, null where blank.
    - `postcode` string
  - `distance` number — Distance from patient location in km, where this has been provided in a search.
  - `patient_contact` object — contact details for the patient to contact the dispenser
    - `tel` string
    - `web_address` string
  - `prescriber_contact` object — contact details for the prescriber to contact the dispenser
    - `tel` string
    - `fax` string
    - `email` string
  - `location` object, required
    - `easting` number
    - `northing` number
  - `opening` object, required — Opening time as an open/closed pair in local time. A null value incidates closed on that day. Resources returned by search by location and time only include opening times within the search window.
    - `open_247` boolean — indicates the service is open 24/7
    - `sun` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `mon` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `tue` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `wed` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `thu` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `fri` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `sat` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `bank_holiday` object[]
      - `open` string — Unqualified local time in HH:MM format
      - `close` string — Unqualified local time in HH:MM format
    - `specified_date` object[]

## Other responses

- `400` — Invalid search
- `429` — Exceeded rate limit
- `default` — Unexpected error

---

[API](https://skmtc.dev/nhs/apis/eps-dos.md) · [All operations](https://skmtc.dev/nhs/apis/eps-dos/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nhs/eps-dos/revisions/7732ea0b437d/schema)
