Discovery API

Important: You must have a valid discovery username and password to obtain a valid authentication token.
You must have a valid authentication token to call the secure APIs.
Use this form to request access.

Authentication

Method POST
Path <auth host>/auth/realms/endeavour/protocol/openid-connect/token
Header Content-Type: application/x-www-form-urlencoded
Body client_id = <client>
username = <username>
password = <password>
grant_type = password



Get FHIR resource types

Method GET
Path <api host>/api/fhir/resourceType
Header Authorization: Bearer <Token>(for client eds-data-checker)



Get patients for NHS Number

Method GET
Path <api host>/api/fhir/patients
Header Authorization: Bearer <Token>(for client eds-data-checker)
Query parameters nhsNumber=<NHS number>



Get resources for patients

Method POST
Path <api host>/api/fhir/resources
Headers Authorization: Bearer <Token>(for client eds-data-checker)
Content-Type: Application/Json
Body {
    "resources": [<resource>, ...],
    "patients": <patient bundle>
}



Get referenced resource

Method GET
Path <api host>/api/fhir/reference
Headers Authorization: Bearer <Token>(for client eds-data-checker)
Content-Type: Application/Json
Query parameters reference=<Reference>



Get flag for patient

Method GET
Path <api host>/api/subscriber/flag
Headers Authorization: Bearer <Token>(for client eds-subscriber)
OdsCode: <ODS Code>
Query parameters code=<Flag code>
subject=<NHS number>



UPRN lookup

Method GET
Path <api host>/api/getinfo
Headers Authorization: Bearer <Token>(for client uprn)
Query parameters adrec=<Address string, ending with Post Code>
qpost=<List of Post Code areas> (optional)
orgpost=<Local organisation post code> (optional)
country=<England|Wales> (optional)
summary=<0|1> (optional)