Skip to main content

Search endpoint

Endpoint

https://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. The parameters can be used independently or as part of a search combination to help with reducing the number of search results returned. The below outlines the search parameter syntax used with some basic examples provided.

Parameters

Parameter Description
_format String - case sensitive
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.
Note that _format specifies the format in which summary information is displayed and also the links to individual records. If _format=xml is specified in the search term then the OrgLink entries will have the argument ?_format=xml appended to link the individual records.
Name string - not case sensitive
Search for organisations based on name. Organisations that contain the argument string in their name are returned.
PostCode string - not case sensitive
Search for 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 - not case sensitive
Search for organisations based on their active status. Arguments can be Active or Inactive.
PrimaryRoleId string - not case sensitive
Search for organisations based on their primary role codes. A role code must be passed through as an argument.
NonPrimaryRoleId string - not case sensitive
Search for organisations based on their non primary role codes. A role code must be passed through as an argument.
OrgRecordClass string - not case sensitive
Search for organisations based on their record class.
Limit integer
Used to limit the number of organisations returned by response. The argument can range from 1 to 1,000.
Offset

integer
Used to offset the start point of the result set by the value specified. The argument can range from 1 <x-total-count> see HTTP header page.

 

Summary Record Format

The following shows the attributes returned in a summary record format:

https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations?Name=ABES

COPY
{

  "Organisations": [

    {

      "Name": "ABES CROSSGATES DAY & NIGHT LTD",

      "OrgId": "P3JX",

      "Status": "Active",

      "OrgRecordClass": "RC1",

      "PostCode": "LS15 8BA",

      "LastChangeDate": "2015-02-10",

      "PrimaryRoleId": "RO181",

      "PrimaryRoleDescription": "PHARMACY HEADQUARTER",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/P3JX"

    }

  ]

}

JSON

Example

The following query returns summary information for one or more organisations where the Name attribute passed in is a substring of the organisation’s name (in this example the organisation name contains ‘Blackdown’.

https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations?Name=Blackdown

Find examples on the parameters page.

COPY
{

  "Organisations": [

    {

      "Name": "BLACKDOWN HOSPITAL",

      "OrgId": "5HV38",

      "Status": "Inactive",

      "OrgRecordClass": "RC2",

      "PostCode": "DY2 7BX",

      "LastChangeDate": "2013-05-08",

      "PrimaryRoleId": "RO180",

      "PrimaryRoleDescription": "PRIMARY CARE TRUST SITE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/5HV38"

    },

    {

      "Name": "BLACKDOWN HOSPITAL",

      "OrgId": "5PE66",

      "Status": "Active",

      "OrgRecordClass": "RC2",

      "PostCode": "DY2 7BX",

      "LastChangeDate": "2013-05-08",

      "PrimaryRoleId": "RO180",

      "PrimaryRoleDescription": "PRIMARY CARE TRUST SITE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/5PE66"

    },

    {

      "Name": "BLACKDOWN HOUSE",

      "OrgId": "VL8EV",

      "Status": "Active",

      "OrgRecordClass": "RC1",

      "PostCode": "TA9 4HQ",

      "LastChangeDate": "2015-09-25",

      "PrimaryRoleId": "RO101",

      "PrimaryRoleDescription": "CARE HOME SITE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/VL8EV"

    },

    {

      "Name": "BLACKDOWN NH (TAVISTOCK)",

      "OrgId": "8C201",

      "Status": "Active",

      "OrgRecordClass": "RC1",

      "PostCode": "PL19 9QB",

      "LastChangeDate": "2018-04-18",

      "PrimaryRoleId": "RO157",

      "PrimaryRoleDescription": "NON-NHS ORGANISATION",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8C201"

    },

    {

      "Name": "BLACKDOWN NURSING HOME",

      "OrgId": "VLLV9",

      "Status": "Active",

      "OrgRecordClass": "RC1",

      "PostCode": "PL19 9QB",

      "LastChangeDate": "2017-02-27",

      "PrimaryRoleId": "RO101",

      "PrimaryRoleDescription": "CARE HOME SITE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/VLLV9"

    },

    {

      "Name": "BLACKDOWN PRACTICE",

      "OrgId": "L83044",

      "Status": "Active",

      "OrgRecordClass": "RC1",

      "PostCode": "EX15 3SF",

      "LastChangeDate": "2016-04-20",

      "PrimaryRoleId": "RO177",

      "PrimaryRoleDescription": "PRESCRIBING COST CENTRE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/L83044"

    },

    {

      "Name": "BLACKDOWN PRACTICE",

      "OrgId": "NQT0F",

      "Status": "Active",

      "OrgRecordClass": "RC2",

      "PostCode": "EX15 3SF",

      "LastChangeDate": "2018-04-18",

      "PrimaryRoleId": "RO176",

      "PrimaryRoleDescription": "INDEPENDENT SECTOR H/C PROVIDER SITE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/NQT0F"

    },

    {

      "Name": "BPAS (BLACKDOWN CLINIC)",

      "OrgId": "8C980",

      "Status": "Inactive",

      "OrgRecordClass": "RC1",

      "PostCode": "CV32 6RW",

      "LastChangeDate": "2013-05-08",

      "PrimaryRoleId": "RO157",

      "PrimaryRoleDescription": "NON-NHS ORGANISATION",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8C980"

    },

    {

      "Name": "BPAS BLACKDOWN CLINIC",

      "OrgId": "RTHF3",

      "Status": "Active",

      "OrgRecordClass": "RC2",

      "PostCode": "CV32 6RW",

      "LastChangeDate": "2013-05-08",

      "PrimaryRoleId": "RO198",

      "PrimaryRoleDescription": "NHS TRUST SITE",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/RTHF3"

    },

    {

      "Name": "THE BLACKDOWN PRACTICE",

      "OrgId": "L83044001",

      "Status": "Active",

      "OrgRecordClass": "RC2",

      "PostCode": "EX14 4JP",

      "LastChangeDate": "2018-04-18",

      "PrimaryRoleId": "RO96",

      "PrimaryRoleDescription": "BRANCH SURGERY",

      "OrgLink": "https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/L83044001"

    }

  ]

}

JSON

Last edited: 3 July 2019 2:12 pm