Welcome to the ANANA Test Instance of the Organisation Data Service (ODS) API Suite

The ODS API Suite provides a searchable national repository of NHS Organisation Reference Data. The data returned by the interfaces is managed and published by the ODS Team within NHS Digital. More information relating to the ODS API Suite can be found on the ODS team’s website at: https://digital.nhs.uk/services/organisation-data-service/apis-for-the-organisation-data-service.

Examples of use are provided on the ORD panel at the top of this page.

Implementation guidance for the ORD interface can be found at: https://developer.nhs.uk/library/identifiers/ods-ord-api-implementation-guide/.

Implementation guidance for the FHIR interface can be found at: https://developer.nhs.uk/apis/ods.

Please contact the ODS team via exeter.helpdesk@nhs.net with any queries regarding this service. The helpdesk is contactable 9am - 5pm, Monday to Friday (Excluding Bank Holidays).

Three different endpoints are available for the ORD schema:

Endpoint

https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/<ods_code>?

Description

Return the full organisational data of a single organisation via ODS code.

Parameters

Parameter Description
_format string Can take "xml", "json", "text/json", "text/xml", "application/json" and "application/xml" as arguments. If this parameter is not supplied, the format will default to JSON.

Example usage

Example Description
https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/RRF Returns data for an organisation with the ODS code RRF in the format JSON.
https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/RRF12?_format=xml Returns data for an organisation with the ODS code RRF12 in the format XML.

Endpoint

https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/organisations?{search parameters}

Description

Search the ODS database based on several parameters, and return a summary of multiple organisations.

Parameters

Parameter Description
_format string Can take "xml", "json", "text/json", "text/xml", "application/json" and "application/xml" as arguments. If this parameter is not supplied, the format will default to JSON.
Name string Search organisations based on name. Organisations that contain the argument string in their name are returned.
PostCode string Search organisations based on postcode. Organisations that contain the argument string in their postcode are returned.
LastChangeDate date Search for organisations based on their last changed date. Date must be in format "YYYY-MM-DD". The search is greater than or equal to. Dates are restricted to 185 days from present.
Status string Search for organisations based on their active status. Arguments can be "Active" or "Inactive".
PrimaryRoleId string Search for organisations based on their primary role codes. A role code must also be passed through as an argument.
NonPrimaryRoleId string Search for organisations based on their non primary role codes. A role code must also be passed through as an argument.
OrgRecordClass string Search for oganisations based on their record class.
Limit integer Used to limit the number of organisations returned per response. The argument can range from 1-1000.
Offset integer Used to offset the start point of the result set, by the value specified. The argument can range from 1-****.

Example usage

Example Description
https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/organisations?Name=Leeds&Limit=5 Returns organisations that contain Leeds in their name and limits the result count to 5, in the format JSON.
https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/organisations?PostCode=LS28&Status=Active&_format=xml Returns organisations that contain LS28 in their postcode and have a status that is active, in the format XML.

Endpoint

https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/sync?{search parameters}

Description

Returns a list of organisations that have been modified since a specific date.

Parameters

Parameter Description
LastChangeDate date Date in the format "YYYY-MM-DD". Note that the API will only return records that have been updated in the last 6 months.
_format string Can take "xml", "json", "text/json", "text/xml", "application/json" and "application/xml" as arguments. If this parameter is not supplied, the format will default to JSON.

Example usage

Example Description
https://uat.directory.spineservices.nhs.uk/ORD/2-0-0/sync?LastChangeDate=2017-10-25 Returns a list of organisations that have been modified since 25/10/2017.

Content-Type Header

The request Content-Type header can be used to set the format of the response. The following MIME types are accepted:

  • application/json
  • application/xml
  • text/json
  • text/xml