Hi,
We’re currently moving from epracur.csv file load because it’ll be deprecated to FHIR API and my task is to load all practices by FHIR which are now held in epracur.csv.
I’ve read almost all articles I can access from here Organisation Data Terminology - FHIR API - NHS England Digital but only could access only sandbox where I could retrieve info by ‘/Organisation’.
- The received data looks incomplete, I couldn’t find even 5 digit Organisation Code, e.g. Y00275, is it because of sandbox or I’m going wrong way?
- I’ve registered few applications for Integration and Production and when applying API key either by curl as it’s described in your documentation or from application I get ‘Not Authorized’ error. Could you suggest what I’m doing wrong or point me where I can find more documentation about starting with FHIR?
Hi,
Welcome to the NHS Developer Community.
Great to hear you’re progressing with moving away from epracur.csv to the Organisation Data Service (ODS) FHIR API.
The Sandbox environment for the ODS FHIR API contains only synthetic (test) data, not the real organisational records used in epracur.csv. This could be why you’re not seeing real practice codes like Y00275 which is the GATESHEAD C.A.S.H SERVICES (GMP code G6573254)
To access actual NHS organisation data (including 5-character practice codes), you’ll need to query the Integration (INT) or Production (Live) environments using a valid access token and client registration.
Checks the following to troubleshoot the authorisation issue:
- Environment-specific API Key
- Make sure you’re using an API key and application that’s been approved for the Integration or Production environment.
- Sandbox credentials will not work in INT/Live.
- Authentication Flow
The ODS API requires an application-restricted access token, which means:
- You need to authenticate using the OAuth 2.0 client credentials flow with a signed JWT assertion. / OAuth2 JWT flow with a properly registered app.
- You will exchange this JWT for an access token which must be included in your header.
For further help, you could refer to the ODS FHIR API catalogue page and NHS security setup guide
Hope the above helps.
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 specific queries, please reach out the relevant API teams.