Hackney Council REST API
Last updated
Was this helpful?
Last updated
Was this helpful?
This address look up is specific to Hackney Council.
Hackney Council has a RESTful API that is open and combines LLPG/NLPG data to facilitate an address look up. We have modified our eDesigner solution to facilitate the use of this API.
To add the address look up to a form navigate to design mode and click 'Add Item':
Add a section as shown here:
Select Address Fields from the list of section types:
Give it a field id, click 'Use address lookup' and select Hackney address lookup as the provider:
Follow these three simple steps and you'll have added an address look up to your form:
1) For some postcodes more than one property with the exact same information is returned. The API should clearly not do this. Example below where the postcode BS5 8DD was used:
api/v1/addresses/?format=simple&postcode=BS58DD
{"line1": "23 ST GEORGES AVENUE","line2": "ST GEORGE","line3": "BRISTOL","line4": "BS5 8DD","town": "BRISTOL","postcode": "BS5 8DD","UPRN": 256024},{"line1": "23 ST GEORGES AVENUE","line2": "ST GEORGE","line3": "BRISTOL","line4": "BS5 8DD","town": "BRISTOL","postcode": "BS5 8DD","UPRN": 256024},{"line1": "23 ST GEORGES AVENUE","line2": "ST GEORGE","line3": "BRISTOL","line4": "BS5 8DD","town": "BRISTOL","postcode": "BS5 8DD","UPRN": 256024},
2) Postcode is shown both the line4 element of the address as well as the postcode element.
3) Addresses are not ordered as a human would expect to interact with the results. For example, when you give the postcode BS5 8DD you get results ordered as follows:
{ "data": { "address": [ { "line1": "1 ST GEORGES AVENUE" }, { "line1": "10 ST GEORGES AVENUE" }, { "line1": "11 ST GEORGES AVENUE" }, { "line1": "15 ST GEORGES AVENUE" }, { "line1": "16 ST GEORGES AVENUE", }, { "line1": "20 ST GEORGES AVENUE" }, { "line1": "21 ST GEORGES AVENUE", }, { "line1": "22 ST GEORGES AVENUE", }, { "line1": "23 ST GEORGES AVENUE", }, { "line1": "5 ST GEORGES AVENUE" }, { "line1": "6 ST GEORGES AVENUE" },
{ "line1": "7 ST GEORGES AVENUE" }, { "line1": "8 ST GEORGES AVENUE", }, { "line1": "9 ST GEORGES AVENUE", }
], "page_count": 1, "total_count": 36 }, "statusCode": 200 }
This means the address results are ordered like this for citizens searching for their address:
1 ST GEORGES AVENUE
10 ST GEORGES AVENUE
11 ST GEORGES AVENUE
15 ST GEORGES AVENUE
20 ST GEORGES AVENUE
21 ST GEORGES AVENUE
22 ST GEORGES AVENUE
23 ST GEORGES AVENUE
5 ST GEORGES AVENUE
6 ST GEORGES AVENUE
7 ST GEORGES AVENUE
8 ST GEORGES AVENUE
9 ST GEORGES AVENUE
Given that many applications would all need to code workarounds to the above foibles it is much more logical for the API to sort the above list as follows:
1 ST GEORGES AVENUE
5 ST GEORGES AVENUE
6 ST GEORGES AVENUE
7 ST GEORGES AVENUE
8 ST GEORGES AVENUE
9 ST GEORGES AVENUE
10 ST GEORGES AVENUE
11 ST GEORGES AVENUE
15 ST GEORGES AVENUE
20 ST GEORGES AVENUE
21 ST GEORGES AVENUE
22 ST GEORGES AVENUE
23 ST GEORGES AVENUE
And to not have duplicates/triplicates.