• API Hub
  • Search loading...

    API Hub

    Explore and Make use of Nationally Defined Messaging APIs


    Read a location

    Use case for reading a location resource.



    The Consumer system:

    API Use Case

    This specification describes a single use cases. For complete details and background please see the Foundations Capability Bundle.


    • GP Connect utilises TLS Mutual Authentication for system level authorization.
    • GP Connect utilises a JSON Web Tokens (JWT) to transmit clinical audit & provenance details.

    API Usage

    Request Operation

    FHIR Relative Request

    GET /Location/[id]

    FHIR Absolute Request

    GET https://[proxy_server]/https://[provider_server]/[fhir_base]/Location/[id]

    Request Headers

    Consumers SHALL include the following additional HTTP request headers:

    Header Value
    Ssp-TraceID Consumer’s TraceID (i.e. GUID/UUID)
    Ssp-From Consumer’s ASID
    Ssp-To Provider’s ASID
    Ssp-InteractionID urn:nhs:names:services:gpconnect:fhir:rest:read:location-1

    Payload Request Body


    Error Handling

    Provider systems SHALL return an GPConnect-OperationOutcome-1 resource that provides additional detail when one or more data fields are corrupt or a specific business rule/constraint is breached.

    For example the:

    • Logical identifier of the resource is not valid/can’t be found on the server.

    Refer to Development - FHIR API Guidance - Error Handling for details of error codes.

    Request Response

    Response Headers

    Provider systems are not expected to add any specific headers beyond that described in the HTTP and FHIR® standards.

    Payload Response Body

    Provider systems:

    • SHALL return a 200 OK HTTP status code on successful execution of the operation.
    • SHALL return Location resources that conform to the CareConnect-GPC-Location-1 profile.
    • SHALL include the URI of the CareConnect-GPC-Location-1 profile StructureDefinition in the Location.meta.profile element of the returned Location resource.
    • SHALL include the versionId of the current version of the Location resource.
    • SHALL include all relevant business identifier details (i.e. ODS Site Code) for the Location resource.
    	"resourceType": "Location",
    	"id": "17",
    	"meta": {
    		"versionId": "636064088100870233",
    		"lastUpdated": "2016-08-10T14:27:49.778+01:00",
    		"profile": ["https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Location-1"]
    	"identifier": [{
    		"system": "https://fhir.nhs.uk/Id/ods-site-code",
    		"value": "L001"
    	"name": "Honley Highstreet"



    var client = new FhirClient("http://gpconnect.aprovider.nhs.net/GP001/STU3/1/");
    client.PreferredFormat = ResourceFormat.Json;
    var resource = client.Read<Location>("Location/17");


    FhirContext ctx = new FhirContext().forStu3();
    IGenericClient client = ctx.newRestfulGenericClient("http://gpconnect.aprovider.nhs.net/GP001/STU3/1/");
    Location location = client.read().resource(Location.class).withId("17").execute();
    Tags: foundations

    All content is available under the Open Government Licence v3.0, except where otherwise stated