All organisations within organisation reference data have a primary role which denotes their core function. Organisations may also have one or more non primary roles if they carry out additional functions. Each Role has a Role ID and a Role Name as shown in the table below.
The roles endpoint allows consumers to query the Code Systems meta data relating to Roles – see guidance on the roles endpoint.
Primary RoleID |
Primary role name |
RO98 |
Clinical Commissioning Group |
RO101 |
Care Home Site |
RO177 |
Prescribing Cost Centre |
NonPrimary RoleID |
Non primary role name |
RO76 |
GP Practice Prescribing Cost Centre |
RO218 |
Commissioning Hub |
It is the RoleID that must be specified within the API search parameter. When used in a search the role ID is not case sensitive.
https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations?PrimaryRoleId=RO101
The above will return summary information for one or more organisations where the Primary Role ID specified (RO101) is stated within the organisation record (i.e. it will return all records flagged as 'Care Home Sites').
https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations?NonPrimaryRoleId=RO76
The above will return summary information for one or more organisations where a Non Primary Role ID of RO76 (GP Practice Prescribing Cost Centre) is stated within the organisation record. In this example, GP Practices have a primary role of RO177 Prescribing Cost Centre (along with Out of Hours, Walk in Centres etc), but to filter this down to only include GP Practice settings then a non primary role of RO76 must be specified.
https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations?Roles=RO197,RO107
The above API search allows users to query multiple Role IDs in a single search.
A mixture of Primary Role and Non Primary Role IDs can be specified if required.
Note that the argument when searching for multiple roles is:
https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations?Roles=
rather than ?PrimaryRoleId= or ?NonPrimaryRoleId= when searching for one specific role.
The above will return summary information for one or more organisations where a Primary Role ID of RO197 (NHS Trust) or RO107 (Care Trust) is stated within the organisation record. Multiple Role IDs should be separated by a comma and no spaces in the API search.