Food Hygiene Rating API Version 2 Resource Detail
GET Establishments?name={name}&address={address}&longitude={longitude}&latitude={latitude}&maxDistanceLimit={maxDistanceLimit}&businessTypeId={businessTypeId}&schemeTypeKey={schemeTypeKey}&ratingKey={ratingKey}&ratingOperatorKey={ratingOperatorKey}&localAuthorityId={localAuthorityId}&countryId={countryId}&sortOptionKey={sortOptionKey}&pageNumber={pageNumber}&pageSize={pageSize}
Returns a collection of establishment details, based on provided search parameters. All search parameters are optional.
Request Information
Parameters
Name | Description | Additional information |
---|---|---|
name | Terms to search for within the Business address and postcode of the establishments. |
Define this parameter in the request URI. |
address | Terms to search for within the Business name of the establishments. |
Define this parameter in the request URI. |
longitude | The longitude of the centre point of a spatial query. |
Define this parameter in the request URI. |
latitude | The latitude of the centre point of a spatial query. |
Define this parameter in the request URI. |
maxDistanceLimit | The max distance limit in miles from the centre of the spatial query. Note: This value maybe capped by the system to limit the size of the result set |
Define this parameter in the request URI. |
businessTypeId | Filter the results based on the Business Type of the establishment (See BusinessTypes for more details). |
Define this parameter in the request URI. |
schemeTypeKey | Filter the results based on the Scheme Type (FHRS or FHIS) of the establishment (See SchemeTypes for more details). Valid options are 'FHRS' and 'FHIS'. |
Define this parameter in the request URI. |
ratingKey | Filter the results based on the FHIS/FHRS Rating of the establishment (See Ratings for more details). Valid options for FHRS are '0', '1', '2', '3', '4' and '5' and for FHIS are 'Pass', 'ImprovementRequired', 'AwaitingPublication', 'AwatingInspection' and 'Exempt' |
Define this parameter in the request URI. |
ratingOperatorKey | Operator for increasing the flexibility of the rating search. Valid options are 'LessThanOrEqual', 'GreaterThanOrEqual' and 'Equal', the default for this value is 'Equal' (See RatingOperators for more details). Note: These operators only function on FHRS Ratings. |
Define this parameter in the request URI. |
localAuthorityId | Filter the results based on the Local Authority of the establishment (See Authorities for more details). |
Define this parameter in the request URI. |
countryId | Filter the results based on the Country of the establishment (See Countries for more details). |
Define this parameter in the request URI. |
sortOptionKey | Set the options for sort field and direction of the results (See SortOptions for more details). Valid options are 'Relevance', 'rating', 'desc_rating', 'alpha', 'desc_alpha' and 'distance' |
Define this parameter in the request URI. |
pageNumber | The page number of the result set to return. |
Define this parameter in the request URI. |
pageSize | Size of the page of results to return. (Note: Maximum value is system capped, so less results maybe returned than requested) |
Define this parameter in the request URI. |
Request body formats
application/json, text/json
Sample:
{ "establishments": [ { "AddressLine1": "sample string 2", "AddressLine2": "sample string 3", "AddressLine3": "sample string 4", "AddressLine4": "sample string 5", "BusinessName": "sample string 1", "BusinessType": "sample string 23", "BusinessTypeID": 7, "ChangesByServerID": 21, "Distance": 1.1, "FHRSID": 20, "LocalAuthorityBusinessID": "sample string 22", "LocalAuthorityCode": "sample string 8", "LocalAuthorityEmailAddress": "sample string 30", "LocalAuthorityName": "sample string 28", "LocalAuthorityWebSite": "sample string 29", "NewRatingPending": true, "Phone": "sample string 24", "PostCode": "sample string 6", "RatingDate": "2024-04-26T18:39:53.3623801+01:00", "RatingKey": "sample string 25", "RatingValue": "sample string 10", "RightToReply": "sample string 31", "SchemeType": "sample string 13", "geocode": { "longitude": "1.1", "latitude": "1.1" }, "scores": { "Hygiene": null, "Structural": null, "ConfidenceInManagement": null } }, { "AddressLine1": "sample string 2", "AddressLine2": "sample string 3", "AddressLine3": "sample string 4", "AddressLine4": "sample string 5", "BusinessName": "sample string 1", "BusinessType": "sample string 23", "BusinessTypeID": 7, "ChangesByServerID": 21, "Distance": 1.1, "FHRSID": 20, "LocalAuthorityBusinessID": "sample string 22", "LocalAuthorityCode": "sample string 8", "LocalAuthorityEmailAddress": "sample string 30", "LocalAuthorityName": "sample string 28", "LocalAuthorityWebSite": "sample string 29", "NewRatingPending": true, "Phone": "sample string 24", "PostCode": "sample string 6", "RatingDate": "2024-04-26T18:39:53.3623801+01:00", "RatingKey": "sample string 25", "RatingValue": "sample string 10", "RightToReply": "sample string 31", "SchemeType": "sample string 13", "geocode": { "longitude": "1.1", "latitude": "1.1" }, "scores": { "Hygiene": null, "Structural": null, "ConfidenceInManagement": null } }, { "AddressLine1": "sample string 2", "AddressLine2": "sample string 3", "AddressLine3": "sample string 4", "AddressLine4": "sample string 5", "BusinessName": "sample string 1", "BusinessType": "sample string 23", "BusinessTypeID": 7, "ChangesByServerID": 21, "Distance": 1.1, "FHRSID": 20, "LocalAuthorityBusinessID": "sample string 22", "LocalAuthorityCode": "sample string 8", "LocalAuthorityEmailAddress": "sample string 30", "LocalAuthorityName": "sample string 28", "LocalAuthorityWebSite": "sample string 29", "NewRatingPending": true, "Phone": "sample string 24", "PostCode": "sample string 6", "RatingDate": "2024-04-26T18:39:53.3623801+01:00", "RatingKey": "sample string 25", "RatingValue": "sample string 10", "RightToReply": "sample string 31", "SchemeType": "sample string 13", "geocode": { "longitude": "1.1", "latitude": "1.1" }, "scores": { "Hygiene": null, "Structural": null, "ConfidenceInManagement": null } } ], "meta": { "dataSource": "sample string 1", "extractDate": "2024-04-26T18:39:53.3623801+01:00", "itemCount": 3, "returncode": "sample string 4", "totalCount": 5, "totalPages": 6, "pageSize": 7, "pageNumber": 8 }, "links": [ { "rel": "sample string 1", "href": "sample string 2" }, { "rel": "sample string 1", "href": "sample string 2" }, { "rel": "sample string 1", "href": "sample string 2" } ] }
application/xml, text/xml
Sample:
<EstablishmentDetailCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FHRS.Model.Detailed"> <links xmlns="http://schemas.datacontract.org/2004/07/FHRS.Model.MetaLinks"> <link> <href>sample string 2</href> <rel>sample string 1</rel> </link> <link> <href>sample string 2</href> <rel>sample string 1</rel> </link> <link> <href>sample string 2</href> <rel>sample string 1</rel> </link> </links> <meta xmlns="http://schemas.datacontract.org/2004/07/FHRS.Model.MetaLinks"> <dataSource>sample string 1</dataSource> <extractDate>2024-04-26T18:39:53.3623801+01:00</extractDate> <itemCount>3</itemCount> <pageNumber>8</pageNumber> <pageSize>7</pageSize> <returncode>sample string 4</returncode> <totalCount>5</totalCount> <totalPages>6</totalPages> </meta> <establishments> <establishment> <AddressLine1>sample string 2</AddressLine1> <AddressLine2>sample string 3</AddressLine2> <AddressLine3>sample string 4</AddressLine3> <AddressLine4>sample string 5</AddressLine4> <BusinessName>sample string 1</BusinessName> <BusinessType>sample string 23</BusinessType> <BusinessTypeID>7</BusinessTypeID> <ChangesByServerID>21</ChangesByServerID> <Distance>1.1</Distance> <FHRSID>20</FHRSID> <LocalAuthorityBusinessID>sample string 22</LocalAuthorityBusinessID> <LocalAuthorityCode>sample string 8</LocalAuthorityCode> <LocalAuthorityEmailAddress>sample string 30</LocalAuthorityEmailAddress> <LocalAuthorityName>sample string 28</LocalAuthorityName> <LocalAuthorityWebSite>sample string 29</LocalAuthorityWebSite> <NewRatingPending>true</NewRatingPending> <Phone>sample string 24</Phone> <PostCode>sample string 6</PostCode> <RatingDate>2024-04-26T18:39:53.3623801+01:00</RatingDate> <RatingKey>sample string 25</RatingKey> <RatingValue>sample string 10</RatingValue> <RightToReply>sample string 31</RightToReply> <SchemeType>sample string 13</SchemeType> <geocode> <latitude>1.1</latitude> <longitude>1.1</longitude> </geocode> <scores> <ConfidenceInManagement i:nil="true" /> <Hygiene i:nil="true" /> <Structural i:nil="true" /> </scores> </establishment> <establishment> <AddressLine1>sample string 2</AddressLine1> <AddressLine2>sample string 3</AddressLine2> <AddressLine3>sample string 4</AddressLine3> <AddressLine4>sample string 5</AddressLine4> <BusinessName>sample string 1</BusinessName> <BusinessType>sample string 23</BusinessType> <BusinessTypeID>7</BusinessTypeID> <ChangesByServerID>21</ChangesByServerID> <Distance>1.1</Distance> <FHRSID>20</FHRSID> <LocalAuthorityBusinessID>sample string 22</LocalAuthorityBusinessID> <LocalAuthorityCode>sample string 8</LocalAuthorityCode> <LocalAuthorityEmailAddress>sample string 30</LocalAuthorityEmailAddress> <LocalAuthorityName>sample string 28</LocalAuthorityName> <LocalAuthorityWebSite>sample string 29</LocalAuthorityWebSite> <NewRatingPending>true</NewRatingPending> <Phone>sample string 24</Phone> <PostCode>sample string 6</PostCode> <RatingDate>2024-04-26T18:39:53.3623801+01:00</RatingDate> <RatingKey>sample string 25</RatingKey> <RatingValue>sample string 10</RatingValue> <RightToReply>sample string 31</RightToReply> <SchemeType>sample string 13</SchemeType> <geocode> <latitude>1.1</latitude> <longitude>1.1</longitude> </geocode> <scores> <ConfidenceInManagement i:nil="true" /> <Hygiene i:nil="true" /> <Structural i:nil="true" /> </scores> </establishment> <establishment> <AddressLine1>sample string 2</AddressLine1> <AddressLine2>sample string 3</AddressLine2> <AddressLine3>sample string 4</AddressLine3> <AddressLine4>sample string 5</AddressLine4> <BusinessName>sample string 1</BusinessName> <BusinessType>sample string 23</BusinessType> <BusinessTypeID>7</BusinessTypeID> <ChangesByServerID>21</ChangesByServerID> <Distance>1.1</Distance> <FHRSID>20</FHRSID> <LocalAuthorityBusinessID>sample string 22</LocalAuthorityBusinessID> <LocalAuthorityCode>sample string 8</LocalAuthorityCode> <LocalAuthorityEmailAddress>sample string 30</LocalAuthorityEmailAddress> <LocalAuthorityName>sample string 28</LocalAuthorityName> <LocalAuthorityWebSite>sample string 29</LocalAuthorityWebSite> <NewRatingPending>true</NewRatingPending> <Phone>sample string 24</Phone> <PostCode>sample string 6</PostCode> <RatingDate>2024-04-26T18:39:53.3623801+01:00</RatingDate> <RatingKey>sample string 25</RatingKey> <RatingValue>sample string 10</RatingValue> <RightToReply>sample string 31</RightToReply> <SchemeType>sample string 13</SchemeType> <geocode> <latitude>1.1</latitude> <longitude>1.1</longitude> </geocode> <scores> <ConfidenceInManagement i:nil="true" /> <Hygiene i:nil="true" /> <Structural i:nil="true" /> </scores> </establishment> </establishments> </EstablishmentDetailCollection>
application/x-www-form-urlencoded
Sample:
Currently Unsupported :(