Search for a relationship
Overview
Use this endpoint to search for relationship records. Most commonly you would use this endpoint to get all the relationships for a given organisation, based on its ODS code.
A FHIR OrganizationAffiliation Resource will be returned when a valid id is provided. Refer to our Implementation Guidance pages for profiles and other FHIR assets.
For relationships, this API returns the following details:
- related organisation ODS code
- relationship type and relationship name
- relationship legal start and end dates
- relationship operational start and end dates
you can search using various combinations of:
- 'primary-organization' - known within the ORD products as the Source Organisation
- 'participating-organization' - known within the ORD products as the Target Organisation
- relationship status
It is also possible to return the relevant Organization Resources in these searches using the _include parameter.
You can try out the sandbox using the 'Try this API' feature on this page.
Alternatively, you can try out the sandbox using our Postman collection:
Query parameters
The organisation's ID - also known as its ODS code. If you already know the ODS code, consider using the 'Get organsiation details' endpoint instead.
The 'Source' organisation which has a relationship.
referred to as the SourceOrganisation in the ORD schema
Must be a valid Organisation code with relationships to return results
The 'Target' or related organisation.
Referred to as the Target Organisation in the ORD schema Must be a valid Organisation code with relationships to return results
Whether the organisation's relationship record is still in active use.
Number of results to return. any search which generates more than 50,000 results will generate an error. we recomend you use a limit 1000 of and use _offset to page through the data, until you have collected all results
By default the first 20 records will be returned
Enables you return related resources.
OrganizationAffiliation:primary-organization will include Organization resource records for the 'Source' Organisations in the search results
OrganizationAffiliation:participating-organization will include Organization resource records for all the 'Target' Organisations in the search results
you can include both primary and participating organization resources by including multiple _include parameters
Return a count of the matching resources, without returning the actual matches.
Response
Valid request that returns any FHIR OrganizationAffiliation resources that match the search criteria (which may be 0).