We are trying to use the API to access NHS medicines ( Medicines A to Z - NHS ) via an API.
We have been attempting to use the APIs described in the following documentation:
* https://digital.nhs.uk/developer/api-catalogue/nhs-website-content/v2#get-/medicines
We have obtained an API key by registering our application through the NHS Digital Onboarding Service Developer Portal and have been granted Sandbox environment access. However, despite this, we have been unable to successfully authenticate or retrieve data using the API, and the API key does not appear to be working as expected.
We tried other sandbox APIs, such as conditions and symptoms, but none of them is working. The reply we get is:
503 Service Temporarily Unavailable
503 Service Temporarily Unavailable
We tried to use the APIs through curl, postman, and the online OAS page, but without success.
Could you please advise us what we are doing wrong?
Thank you,
Elena
Hi Elena,
Apologies for the delayed response to your query. Have you managed to resolve this yet?
The NHS Website Content API is an open-access API, so it does not require OAuth authentication. Access is controlled using the API key issued to your application.
A 503 Service Temporarily Unavailable response would not normally indicate an authentication or API key issue and means the request reached the platform, but the backend service was unavailable or unable to process the request at that time.
Can you check the following:
- Confirm that you are calling the exact sandbox base URL and operation shown in the NHS Website Content API v2 OpenAPI specification.
- Do not request an OAuth access token for this API.
- Where the specification asks for an API key, send it in the
apikey request header.
- Ensure that you are using the API key value from the application, rather than the application ID, key name or secret.
- Download the OAS file from the API catalogue page and compare its server URL and paths with the URLs being used in Postman or cURL.
If the issue is still occurring, please raise it through the NHS England ServiceNow support route and include the above evidence, selecting the NHS Website Content API or API Platform service where available.
It could be a service-side availability issue than a client configuration issue.
To help the relevant team investigate this further, please provide:
- the full request URL, with credentials removed
- the HTTP method
- the complete response headers and body
- any request or correlation identifier returned in the response
- confirmation of whether the failure is continuous or intermittent
Thanks,
NHS England API Platform team
Please note: The API Platform team can only address queries relevant to the NHS England API platform, including security, rate limiting, logging, monitoring and alerting. For any API, CIS2, NHS Login specific queries, please reach out the relevant API / Service teams.