{"openapi":"3.0.1","info":{"title":"EPS Directory of Services (DoS) API","description":"\n<div class=\"nhsd-m-emphasis-box nhsd-m-emphasis-box--emphasis nhsd-!t-margin-bottom-6\" aria-label=\"Highlighted Information\">\n <div class=\"nhsd-a-box nhsd-a-box--border-blue\">\n <div class=\"nhsd-m-emphasis-box__image-box\">\n <figure class=\"nhsd-a-image\">\n <picture class=\"nhsd-a-image__picture\">\n <img src=\"http://digital.nhs.uk/binaries/content/gallery/icons/info.svg?colour=231f20\" alt=\"\" style=\"object-fit:fill\">\n </picture>\n </figure>\n </div>\n <div class=\"nhsd-m-emphasis-box__content-box\">\n <div data-uipath=\"website.contentblock.emphasis.content\" class=\"nhsd-t-word-break\">\n <p class=\"nhsd-t-body\">This API will be deprecated on the 31st of May 2026 as we are re-platforming the DoS API and will be replacing it with a new FHIR based API</a>. </p></div></div></div></div>\n\n## Overview\n\nUse this API to access information about dispensing services, including searching for dispensers who can provide services for a patient with a given location and urgency. \n\nYou can: \n\n* search for a dispenser by its location and opening hours \n* search for a specific dispenser that the patient might have named \n\nThe API combines data from both the Directory of Services (DoS) and the Directory of Healthcare Services (DoHS) API. Do not use this API if you're developing GP software. Instead, use the Directory of Healthcare Services (DoHS) API directly. They will provide the necessary information, such as details about dispensing appliance contractors. \n\nYou need a valid DoS account to use this API. \n\nDuring the [onboarding](https://digital.nhs.uk/developer/api-catalogue/electronic-prescription-service-directory-of-services/electronic-prescription-service-directory-of-services-api#overview--onboarding) process, an account will be created for each connecting party's application for each environment, where authentication credentials will be granted.\n\nFor a non-technical overview of how to build software that deals with organisations and healthcare services, see [Building healthcare software - organisations and healthcare services](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/organisations-and-services). \n\n## Who can use this API\n\nThis API can only be used where there is a legal basis to do so. See our [acceptable use policy](https://digital.nhs.uk/services/directory-of-services-dos/api-acceptable-use-policy) for more details.\n\nYou must request to use this API before you go live. Please see the [Onboarding section](https://digital.nhs.uk/developer/api-catalogue/electronic-prescription-service-directory-of-services/electronic-prescription-service-directory-of-services-api#overview--onboarding) below for guidance.\n\n## Important features\n\n### Disposition\n\nA disposition is an indication of the needs of the patient encompassing both the service required and the urgency. There are many hundreds of dispositions used in NHS Pathways but the currently relevant dispositions are:\n\n| Disposition code | Descriptive name |\n| --------------- | ---------------- |\n| Dx85 | Repeat prescription required within 2 hours |\n| Dx86 | Repeat prescription required within 12 hours |\n| Dx87 | Repeat prescription required within 24 hours |\n| Dx80 | Repeat prescription required within 6 hours |\n\n### Dispenser types\n\nSeveral types of dispensing contractors are authorised to dispense prescriptions in the NHS system.\n\nWhile many dispensers belong to pharmacy chains (known as 'multiples'), prescriptions must be sent to and dispensed by individual dispensing locations.\n\nEach dispensing location is uniquely identified by an Organisation Data Service (ODS), traditionally beginning with 'F' (hence commonly called 'F-codes').\n\n### Community pharmacies\n\nCommunity pharmacies are probably the most familiar dispenser as these are often seen on high streets. \n\nCommunity pharmacies must dispense all items on a prescription regardless of cost, but may not have all items immediately available without ordering in.\n\n### Dispensing appliance contractors\n\nDispensing Appliance Contractors (DACs) can only dispense appliances, listed in part XYZ of the NHS drug tariff, and so are unable to dispense medications or reagents. \n\nDACs are only obliged to dispense items they carry in the normal course of their business and many are quite specialised in only dealing with ostomy bags or foodstuffs, for example. \n\nMany work on the basis of providing a delivery service so can’t be attended in person by a patient. Distance Selling Pharmacies (DSPs) are not included in the scope of the EPS Directory of Services (DoS) API.\n\n### Distance selling pharmacies\n\nDistance selling pharmacies work with a similar scope to community pharmacies, and can dispense both medications and appliances, but they operate on a delivery-only model and many DACs do not have a dispensary that can be attended in person by a patient. \nDistance selling pharmacies are not included in the scope of the EPS DoS API, but there have been some cases of miscategorisation within the Pathways DoS which could result in them being displayed.\n\n### EPS-enabled pharmacies\n\nAny of the dispenser types above can be enabled to dispense EPS Release 2 prescriptions, and the vast majority can do. \nThe small number of non EPS-enabled dispensers are not included in EPS DoS API results.\n\n### Dispensing doctors\n\nDispensing doctors are authorised to provide medications to their registered dispensing patients, however they are excluded from the EPS DoS API results.\n\n### Validation rules\n\nThe API enforces the following validation rules:\n\n- parameter validation\n- authorisation validation\n\n### Parameter validations\n\nThe following parameters are validated:\n\n- postcode\n- name\n- distance\n- timeframe\n- timeNow\n- service_type\n\nWhen a parameter validation fails, the API responds with a 400 Bad Request error using the following structure:\n\n```json \n{\n \"code\": 400,\n \"message\": \"Invalid parameter\"\n \"fields\": \"<parameter_name|\"\n}\n```\n\n### Authorisation validation\n\nIf the request lacks valid authentication credentials or the client does not have sufficient permissions, the API will respond with a 403 Forbidden error in the following format:\n\n```json \n{\n \"error\": {\n \"code\": 403,\n \"message\": \"Unauthorized\"\n }\n}\n```\n\n## Access modes\n\nThis API has one access mode:\n\n* application-restricted\n\nThis access mode means that we authenticate and authorise the connecting party's application but not the end user.\n\nDuring the onboarding process, an account will be created for each connecting party's application for each environment, where authentication credentials will be granted.\n\n## Roadmap\n\nWe're currently finalising our roadmap and we'll update this content in due course.\n\n## API status\n\nThis API is [in production, but under review for deprecation](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses). We will contact you before agreeing to a [retirement](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses) date. \n\n## Service level\n\nThis API is a gold service, meaning it is operational and supported 24 hours a day, 365 days a year.\n\nFor more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).\n\n## Rate limits\n\nWe monitor the number of transactions a connecting party can make per unit of time. We do this to protect our service against excessive use and denial-of-service (DOS) attacks.\n\nIt is paramount to us that our APIs and services are available to all connecting parties at all times, and so it is important that we protect our APIs against rogue requests, DoS attacks and unfair usage (both intentional and unintentional).\n\nOur default rate limit for the production environment is 10 transactions per second (tps) per connecting party account. Rate limits are applied within a rolling minute window, not per individual second - so at the default limit of 10tps, a connecting party account can perform up to 600 transactions in any given (rolling) minute.\n\nWe will monitor the rate limit and traffic flows through our API and will raise concerns if we believe the rate limit is too low. \n\nWe also encourage connecting parties to inform us if the `429` error occurs too frequently.\n\nWe will work with and advise connecting parties on configuring the rate limit to meet the legitimate request demands and in helping us protect our APIs and services in making sure that they are always available.\n\n## Technology\n\nThis API is a [REST API](http://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest).\n\nFor more details, see [Basic REST](http://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#basic-rest).\n\nWe also have a [Directory of Services - Urgent and Emergency Care - REST API](https://digital.nhs.uk/developer/api-catalogue/directory-of-services-urgent-and-emergency-care-rest) available. \n\n## Network access\n\nThis API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).\n\nWe're operating in a cloud setting and the expectation is that IPv4 addressing should vary.\n\nFor more details, see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).\n\n## Errors\n\nWe use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:\n\n* 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action\n* 400 to 499 if it failed because of a client error by your application\n* 500 to 599 if it failed because of an error on our server\n\nErrors specific to each API are shown in the Endpoints section, under Response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.\n\n## Open source\n\nThere are no open source resources currently available for this API.\n\n## Security and authorisation\n\nYou need a valid DoS account to use this API.\n\nDuring the [onboarding](https://digital.nhs.uk/developer/api-catalogue/electronic-prescription-service-directory-of-services/electronic-prescription-service-directory-of-services-api#overview--onboarding) process, an account will be created for each connecting party's application for each environment, where authentication credentials will be granted.\n\nThis API uses HTTP basic authentication. We use authentication to track API usage and to control which information is returned to a search.\n\nHTTP basic authentication is built in to all HTTP clients and requires the `Authorization` request header with the DoS `username` and `password` colon delimited and `base64` encoded.\n\n## Environments and testing\n\n| Environment | Base URL |\n|-------------|----------|\n| Integration testing | https://usertest.directoryofservices.nhs.uk/app/controllers/api |\n| Production | https://webservices.directoryofservices.nhs.uk/app/controllers/api |\n\n### Integration testing\n\nOur [integration testing environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):\n\n* contains a snapshot of production-like data (but with itk/email integration points taken out to prevent test systems from invoking real live processes) \n* is for formal integration testing\n* includes application-restricted authentication (account credentials)\n* includes SSL certificate presentation from our server, signed by production CAs\n\nOur integration test environment is NOT suitable for any of the following without prior written agreement:\n\n* any form of performance, load, or stress testing\n* any form of penetration testing\n\nTo prevent the data in our integration test environment from going stale, we refresh its data from production from time to time. \nAll connecting parties currently onboarded onto our integration test environment will receive an email to inform as to when this process is due to take place.\n\n### Production\n\nOur production environment is suitable for live traffic only, and we will monitor calls through our production APIs.\n\n## Onboarding\n\nUsing the Electronic Prescription Service (EPS) requires connecting parties to [onboard](https://digital.nhs.uk/services/electronic-prescription-service/guidance-for-suppliers) to the EPS service. \n\nIf your use case also relates to Urgent and Emergency Care, you'll likely need to [onboard](https://digital.nhs.uk/developer/api-catalogue/electronic-prescription-service-directory-of-services/onboarding-guidance-and-downloadable-templates) onto the EPS DoS API as well.\n\n## Related APIs\n\nThe following APIs are related to this one:\n\n* [Directory of Services - Urgent and Emergency Care - REST API](https://digital.nhs.uk/developer/api-catalogue/directory-of-services-urgent-and-emergency-care-rest) - use this REST API to access information on a wide range of health and care services across England \n* [Electronic Transmission of Prescriptions Web Services - SOAP API](https://digital.nhs.uk/developer/api-catalogue/electronic-transmission-of-prescriptions-web-services-soap) - use this to access EPS dispenser (and dispensing appliance contractor) information for a patient via NHS UK Web Services \n* [e-Referral Services - A010 Patient service search endpoint](https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir#api-Default-a010-patient-service-search) - use this endpoint to find services that meet the referral needs of a patient \n* [NHS UK service search](http://developer.api.nhs.uk/nhs-api) - use this to search for services by [organisation](https://developer.api.nhs.uk/nhs-api/documentation/service-search-organisations), or [organisation type](https://developer.api.nhs.uk/nhs-api/documentation/service-search-organisation-types) \n","contact":{"name":"EPS Directory of Services (DoS) API Support","url":"https://nhsdigitallive.service-now.com/csm?id=csm_index","email":"ssd.nationalservicedesk@nhs.net"},"version":"3.0.1"},"servers":[{"url":"https://eps-dos.service.nhs.uk","description":"Production server"}],"paths":{"/epsdispenser/byLocationAndTime":{"get":{"summary":"Search EPS dispensers by opening hours and location","description":"## Overview\n\nThe `byLocationAndTime` endpoint allows you to search for EPS dispensers that are open within a given timeframe and location.\n\nThe search works by:\n\n* you provide your postcode and how far you're willing to travel\n* the API finds nearby pharmacies within that distance\n* it checks their opening hours to make sure they'll be open when you need them\n* takes into account regular hours, holidays and any special opening times\n* returns up to 5 closest matching pharmacies, with the nearest ones first\n","operationId":"ByLocationAndTime","parameters":[{"$ref":"#/components/parameters/postcode"},{"$ref":"#/components/parameters/distance"},{"$ref":"#/components/parameters/timeframe"},{"$ref":"#/components/parameters/timeNow"},{"$ref":"#/components/parameters/service_type"}],"responses":{"200":{"description":"A list of EPS dispensers that match the search criteria, ordered by\ndistance from the provided postcode.\n","headers":{"warning":{"name":"","in":"header","description":"If one of our services is temporarily down, we'll show you cached\ndata instead of live data.\n\nWhen this happens, you'll see a '111 - Revalidation Failed' warning to let you know you're viewing cached information.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DispenserResponse"}}}}},"4XX":{"description":"An error occurred as follows:\n\n| HTTP status | Code | Fields | Message | Cause |\n| ----------- | ------ | -------| ------------- | ----------- |\n| 400 | 4 | EPS API parameter value | Invalid parameter | Thrown by this API if a parameter for a service is not given or it is invalid. The name of the missing or invalid parameter will be provided. |\n| 400 | 16 | DoS API parameter value | Bad Request | When the DoS API rejects a call from this API as a result of a badly formatted or missing parameter that is required. The name of the parameter that is missing or invalid is provided in the message. |\n| 403 | 6 | not applicable (n/a) | This account is not authorised to use this method. | A user account has not been authorised to call the DoS services required by this API. |\n| 403 | 11 | not applicable (n/a) | Authentication is required to access this resource. | This is error is returned when a request with no authentication is provided. |\n| 403 | 12 | not applicable (n/a) | Authentication invalid. | The authentication method is not valid for this API. The EPS API uses Basic Authentication. |\n| 404 | not applicable (n/a) | not applicable (n/a) | No matching dispenser found for the criteria specified. |\n| 404 | 15 | not applicable (n/a) | No matching dispenser found for the criteria specified. | This is given when no matching EPS dispensers are found for the parameters values supplied. It means that all of the parameters given have been accepted and the DoS and ETP APIs have been successfully called, but the actual combination of the parameter values yields no result. |\n| 429 | 3 | not applicable (n/a) | Exceeded the rate limit | When the call limit to the DoS API has been exceeded. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/4XXError"},"example":{"error":{"code":404,"message":"Not Found"}}}}},"5XX":{"description":"An error occurred as follows:\n\n| HTTP status | Code | Fields | Message | Cause |\n| ----------- | ------ | -------| ------------- | ----------- |\n| 500 | not applicable (n/a) | not applicable (n/a) | Internal Server Error | This is returned when an unexpected error is raised during the processing of a request. |\n| 500 | 10 | not applicable (n/a) | Dispenser search service returned error | An error is returned from the DoS API service which is called from this API. The error message from the DoS API will be displayed as part of this message. | \n| 503 | 13 | not applicable (n/a) | not applicable (n/a) | This is given when either the DoS API or the ETP API services are down for maintenance reasons. |\n| 504 | 8 | not applicable (n/a) | Dispenser search service not responding | When a call to a DoS service made by this API times out. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/5XXError"},"example":{"error":{"code":500,"message":"Internal Server Error"}}}}}},"deprecated":false,"security":[{"basicHttpAuthentication":[]}]}},"/epsdispenser/byNameAndPostcode":{"get":{"summary":"Search EPS dispensers by part name and postcode","description":"## Overview\n\nThe `byNameAndPostcode` endpoint allows you to search for EPS dispensers that match a given part of the name of the dispensing service and a postcode.\n\nEnter a UK postcode (for example SW1A 1AA) to find pharmacies in your area. The search works by:\n\n* using just the first part of your postcode (for example SW1A) to search a wider area\n* finding all pharmacies in that postcode district\n* showing you results from across the whole area, not just your exact postcode\n\nThis helps you find more options nearby, even if they're not on your exact street.\n","operationId":"ByNameAndPostcode","parameters":[{"$ref":"#/components/parameters/name"},{"$ref":"#/components/parameters/postcode"}],"responses":{"200":{"description":"A list of EPS dispensers that match the search criteria.\n","headers":{"warning":{"name":"","in":"header","description":"This header is added when one of the backing services (DoS API or\nETP API) is unavailable, indicating that the response data is\nbeing served from a cached copy rather than real-time data. \n\nWhen this occurs, the HTTP warning code '111 - \"Revalidation Failed\"' will be included to notify the client that cached data is being used instead of a fresh response from the backing services.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DispenserResponse"}}}}},"4XX":{"description":"An error occured as follows:\n\n| HTTP status | Code | Fields | Message | Cause |\n| ----------- | ------ | -------| ------------- | ----------- |\n| 400 | 4 | EPS API parameter value | Invalid parameter | Thrown by this API if a parameter for a service is not given or it is invalid. The name of the missing or invalid parameter will be provided. |\n| 400 | 16 | DoS API parameter value | Bad Request | When the DoS API rejects a call from this API as a result of a badly formatted or missing parameter that is required. The name of the parameter that is missing or invalid is provided in the message. |\n| 403 | 6 | not applicable (n/a) | This account is not authorised to use this method. | A user account has not been authorised to call the DoS services required by this API. |\n| 403 | 11 | not applicable (n/a) | Authentication is required to access this resource. | This is error is returned when a request with no authentication is provided. |\n| 403 | 12 | not applicable (n/a) | Authentication invalid. | The authentication method is not valid for this API. The EPS API uses Basic Authentication. |\n| 404 | not applicable (n/a) | not applicable (n/a) | No matching dispenser found for the criteria specified. |\n| 404 | 15 | not applicable (n/a) | No matching dispenser found for the criteria specified. | This is given when no matching EPS dispensers are found for the parameters values supplied. It means that all of the parameters given have been accepted and the DoS and ETP APIs have been successfully called, but the actual combination of the parameter values yields no result. |\n| 429 | 3 | not applicable (n/a) | Exceeded the rate limit | When the call limit to the DoS API has been exceeded. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/4XXError"},"example":{"error":{"code":404,"message":"Not Found"}}}}},"5XX":{"description":"An error occurred as follows:\n\n| HTTP status | Code | Fields | Message | Cause |\n| ----------- | ------ | -------| ------------- | ----------- |\n| 500 | not applicable (n/a) | not applicable (n/a) | Internal Server Error | This is returned when an unexpected error is raised during the processing of a request. |\n| 500 | 10 | not applicable (n/a) | Dispenser search service returned error | An error is returned from the DoS API service which is called from this API. The error message from the DoS API will be displayed as part of this message. | \n| 503 | 13 | not applicable (n/a) | not applicable (n/a) | This is given when either the DoS API or the ETP API services are down for maintenance reasons. |\n| 504 | 8 | not applicable (n/a) | Dispenser search service not responding | When a call to a DoS service made by this API times out. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/5XXError"},"example":{"error":{"code":500,"message":"Internal Server Error"}}}}}},"deprecated":false,"security":[{"basicHttpAuthentication":[]}]}}},"components":{"schemas":{"DispenserResponse":{"required":["ods","name","service_type","address","patient_contact","prescriber_contact","location","opening"],"type":"object","properties":{"ods":{"type":"string","description":"The ODS of the dispenser.","example":"ABC123"},"name":{"type":"string","description":"The name of the dispenser.","example":"Example Pharmacy"},"service_type":{"type":"string","description":"The service type of the dispenser.","example":"eps_pharmacy"},"address":{"required":["line","postcode"],"type":"object","properties":{"line":{"type":"array","items":{"type":"string","example":"123 Sample Street, Sample City, Sample County"},"description":"The address lines of the dispenser."},"postcode":{"type":"string","description":"The postcode of the dispenser.","example":"SW1A 1AA"}}},"patient_contact":{"required":["tel","web_address"],"type":"object","properties":{"tel":{"type":"string","description":"The telephone number of the dispenser.","example":"02012345678"},"web_address":{"type":"string","description":"The web address of the dispenser.","example":"http://www.example-pharmacy.co.uk"}}},"prescriber_contact":{"required":["tel","fax"],"type":"object","properties":{"tel":{"type":"string","description":"The telephone number of the prescriber.","example":"02012345679"},"fax":{"type":"string","description":"The fax number of the prescriber.","example":"02012345670"}}},"location":{"required":["easting","northing"],"type":"object","properties":{"easting":{"type":"number","description":"The easting location coordinates of the dispenser.","example":123456},"northing":{"type":"number","description":"The northing location coordinates of the dispenser.","example":234567}}},"opening":{"required":["open_247"],"type":"object","properties":{"open_247":{"type":"boolean","description":"Flag to denote whether the dispenser is open 24 hours a day.","example":false},"sun":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"17:00"}}},"description":"The opening times of the dispenser for Sunday."},"mon":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"18:00"}}},"description":"The opening times of the dispenser for Monday."},"tue":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"18:00"}}},"description":"The opening times of the dispenser for Tuesday."},"wed":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"13:00"}}},"description":"The opening times of the dispenser for Wednesday."},"thu":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"18:00"}}},"description":"The opening times of the dispenser for Thursday."},"fri":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser."}}},"description":"The opening times of the dispenser for Friday."},"sat":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"09:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"17:00"}}},"description":"The opening times of the dispenser for Saturday."},"bank_holiday":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"10:00"},"close":{"type":"string","description":"The closing time of the dispenser."}}},"description":"The opening times of the dispenser for Bank Holiday."},"specified_date":{"type":"array","items":{"required":["open","close"],"type":"object","properties":{"open":{"type":"string","description":"The opening time of the dispenser.","example":"10:00"},"close":{"type":"string","description":"The closing time of the dispenser.","example":"16:00"}}},"description":"The opening times of the dispenser for a specified date."}},"description":"Opening times are represented as pairs of open and close times in\nlocal time (HH:MM format).\n\nEach day can have multiple opening/closing time pairs to handle split shifts.\n\nA null value for a day indicates the service is closed on that day.\n\nFor location and time based searches, only opening times that fall within the specified search \n\ntimeframe are included in the response.\n"},"distance":{"type":"number","description":"The distance from the search location to the dispenser.","example":0.5}},"description":"Successful EPS dispenser response schema.\n\n## Response fields\n\nEvery response includes the following fields:\n\n- ods\n- name\n- service_type\n- address\n- patient_contact\n- prescriber_contact\n- location\n- opening\n- distance\n\n## Response field definitions\n\n### ODS\n\nThe ODS (Organisation Data Service) uniquely identifies the EPS dispenser within NHS systems. \nThis is a 5-character code assigned by NHS England that all healthcare organisations must have to provide NHS services. \nFor pharmacies, this code is sometimes called the \"F code\" and starts with an F followed by 4 digits (for example F1234). \nThe ODS is used to route electronic prescriptions to the correct pharmacy.\n\n### Name\n\nThe official registered name of the pharmacy or dispensing organisation. \nThis is the name that appears on the pharmacy's NHS contract and is displayed to patients and healthcare professionals. \nThe name typically includes identifiers such as \"pharmacy\", \"chemist\", or branded chain names (for example \"Boots pharmacy\", \"Lloyds pharmacy\") followed by a location identifier if part of a chain. \nThis name must match what is registered in the NHS organisation data service (ODS) directory.\n\n\n### Service type\n\nThe type of dispensing service provided by the organisation. \nFor EPS dispensers, this will be \"eps_pharmacy\" indicating a pharmacy that can receive and dispense electronic prescriptions. \nThe service type helps determine what electronic prescription capabilities and workflows are available for that dispenser.\n\n### Address\n\nThe physical location address of the dispensing pharmacy or organisation. \nThis includes the full postal address with building number/name, street name, city/town, county/region and postcode. The address must be the official registered premises address that appears on the pharmacy's NHS contract.\nThe address must include a valid UK postcode.\n\n### Patient contact\n\nThe contact information that patients can use to communicate with the dispensing pharmacy or organisation.\nThis includes the main telephone number that patients should call for prescription queries, medication advice, \nor to check if their prescription is ready. It may also include a website URL where patients can access online \npharmacy services such as prescription ordering or healthcare information. These contact methods allow patients \nto easily reach the pharmacy for their medication needs.\n\n### Prescriber contact\n\nThe contact information that healthcare professionals and prescribers should use to communicate with the dispensing pharmacy.\nThis includes a dedicated telephone line for prescriber queries that may be different from the patient contact number.\nHaving separate contact channels helps ensure urgent clinical communications from prescribers are handled appropriately and prioritised.\n\n### Location\n\nThe geographical coordinates specifying the physical location of the EPS dispensing pharmacy or organisation.\nThis includes the latitude and longitude values that pinpoint the exact position on a map.\nThe coordinates are used to calculate distances from patient locations and enable features such as \nfinding the nearest pharmacy. The location data is obtained from the official NHS Directory of Services (DoS)\nand is validated to ensure accuracy.\n\n### Opening\n\nThe opening hours when the EPS dispensing pharmacy or organisation is available to provide services.\nThis includes regular weekday and weekend hours, as well as any special holiday hours or closures.\nThe opening times are obtained from the NHS Directory of Services (DoS) and are kept up-to-date\nto ensure patients and prescribers know when they can access pharmacy services. The times are\ndisplayed in 24-hour format and specify opening and closing times for each day of the week.\nBank Holiday opening hours may vary and should be confirmed directly with the pharmacy.\n\n### Distance\n\nThe straight-line (as-the-crow-flies) distance in miles between the provided search postcode and the dispenser's physical location. \nThis distance is calculated using the geographical coordinates (latitude/longitude) of both locations and represents the shortest possible path between them. \nNote that actual travel distance by road may be longer. The distance is provided to help patients find nearby pharmacies, with closer dispensers appearing first in search results. \nThe value is rounded to 1 decimal place (for example 1.2 miles).\n"},"4XXError":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","description":"The HTTP status code of the error","example":404},"message":{"type":"string","description":"A human-readable error message","example":"Not Found"}},"description":"The error object containing the HTTP status code and descriptive error message"}},"description":"4XX Error response schema"},"5XXError":{"required":["error"],"type":"object","properties":{"error":{"required":["code","message"],"type":"object","properties":{"code":{"type":"integer","description":"The HTTP status code of the error","example":500},"message":{"type":"string","description":"A human-readable error message","example":"Internal Server Error"}},"description":"The error object containing the HTTP status code and descriptive error message"}},"description":"5XX Error response schema"}},"parameters":{"postcode":{"name":"postcode","in":"query","description":"The postcode to search within. This is used to limit the number of\nresults by filtering EPS dispensers to those within the same postcode\narea.\n\nA full valid UK postcode is required (for example SW1A 1AA) but only the first part (outward code) is used in the search. For example, searching with 'SW1A 1AA' will return results from the 'SW1A' area.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"SW1A 1AA"}},"name":{"name":"name","in":"query","description":"Part of the name of the dispenser to search for. The search is\ncase-insensitive and will match any part of the name - for example,\nsearching for \"pharmacy\" would match \"High Street Pharmacy\", \"Pharmacy\nPlus\", and \"My Local Pharmacy\". \n\nThe search term is automatically wildcarded at the beginning and end, so there is no need to add wildcards manually.\n","required":true,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"Vantage Pharmacy"}},"distance":{"name":"distance","in":"query","description":"The maximum distance in miles from the provided postcode to\nsearch for EPS dispensers. \n\nThis parameter limits the geographic scope of the search - only EPS dispensers within this radius from the postcode will be included in the results.\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"integer","format":"decimal","default":36}},"timeframe":{"name":"timeframe","in":"query","description":"The number of hours from the current time within which the service\nmust be open.\n\nTakes account of bank holidays, specified dates and timezone offsets.\n","required":true,"deprecated":false,"allowEmptyValue":true,"explode":false,"allowReserved":false,"schema":{"type":"number","format":"integer"}},"timeNow":{"name":"timeNow","in":"query","description":"Timestamp from which to start calculating the timeframe for checking dispenser availability.\n\nThis parameter allows you to specify a custom start time instead of using the current time.\n\n* Format: ISO 8601 timestamp (YYYY-MM-DDThh:mm:ssZ)\n* Example: 2024-01-25T09:30:00Z\n* Default: Current time if not specified\n\nIMPORTANT: This parameter is for testing purposes only. Using it in production can result in \nincorrect availability calculations since the specified time may not match real-world time.\n","required":false,"deprecated":false,"allowEmptyValue":true,"explode":false,"allowReserved":false,"schema":{"type":"string","format":"date-time"}},"service_type":{"name":"service_type","in":"query","description":"The service type to include in results. This parameter filters the\nsearch results to only include\n\nEPS dispensers of the specified type. Currently, the API only supports searching for EPS-enabled \n\ncommunity pharmacies that can receive and dispense electronic prescriptions:\n\n\n* eps_pharmacy - An EPS R2 enabled community pharmacy that can receive and dispense electronic\n prescriptions. These pharmacies have the necessary IT systems and accreditation to\n participate in the Electronic Prescription Service (EPS).\n","required":false,"deprecated":false,"allowEmptyValue":false,"explode":false,"allowReserved":false,"schema":{"type":"string","example":"eps_pharmacy"}}},"securitySchemes":{"basicHttpAuthentication":{"type":"http","description":"Basic HTTP Authentication","scheme":"basic"}}}}