Get GB Building Data API

Get GB Building Data API will return all the available data for the supplied UK address ID.

Important :
  • This functionality is restricted. Please Contact us to enable Get GB Building Data for your licence key.
  • Only Northern Ireland address IDs are supported at this time.

Please read API Overview first


API Endpoint

The Get GB Building Data API endpoint won't change. It can be set as a constant.

https://api.autoaddress.ie/2.0/getGBBuildingData
N.B. This EndPoint URL resolves to a dynamic IP address, please be aware of this when making DNS and Firewall decisions.

Request

To get the data for a UK address ID, a simple GET request from your desired language is all that is needed.

curl -v "https://api.autoaddress.ie/2.0/get​gbbuildingdata?key=YOUR_KEY
&addressId=YOUR_UK_ADDRESS_ID"
$.ajax({
   type: "GET",
   dataType: "jsonp",
   url: "https://api.autoaddress.ie/2.0/get​gbbuildingdata",
data : {
key: "YOUR_KEY",
addressId: "YOUR_UK_ADDRESS_ID"
},
success: function(data){
//do something with data
}
});
$http.jsonp('https://api.autoaddress.ie/2.0/getgbbuildingdata',{
   params: {
      key: "YOUR_KEY",
      addressId: "YOUR_UK_ADDRESS_ID"
   }
}).success(function(data){
   //do something with data
});
require 'json'
require 'net/http'

uri = URI.parse("https://api.autoaddress.ie/2.0/getgbbuildingdata?key=YOUR_KEY&addressId=YOUR_UK_ADDRESS_ID")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
response = http.get(uri.request_uri)
result = JSON.parse(response.body)
import json
import urllib2
 
Response = urllib2.urlopen ("https://api.autoaddress.ie/2.0/getgbbuildingdata?key=YOUR_KEY&addressId=YOUR_UK_ADDRESS_ID")
jsonResult = json.load(Response)
using System.IO;
using System.Net;

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.autoaddress.ie/2.0/getgbbuildingdata?key=YOUR_KEY&addressId=YOUR_UK_ADDRESS_ID");
request.Method = WebRequestMethods.Http.Get;
request.Accept = "application/json";

using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
{
   var result = new StreamReader(response.GetResponseStream()).ReadToEnd();
}

Response

The following is a sample JSON response returned for a Get GB Building Data API request.

{
  "result": {
    "code": 100,
    "text": "AddressIdValid"
  },
  "postcode": "BT1 2AA",
  "spatialInfo": {
    "wgs84": {
      "location": {
        "longitude": -5.9274461458450913,
        "latitude": 54.599684944647436
      }
    }
  },
  "input": {
    "key": "YOUR_KEY",
    "txn": "dd558530-afe0-4321-abf6-08a3b7d9cc13",
    "addressId": "186398804"
  },
  "links": [
    {
      "rel": "self",
      "href": "http://api.autoaddress.ie/2.0/getgbbuildingdata?key=YOUR_KEY&addressId=186398804"
    }
  ]
}

Input Fields

Name Type Default Description
key* string Licence key
addressId* string UK address ID

* Required Field


Output Fields

Name Type Description
result enum Result of the search
  • Unknown,
  • AddressIdValid = 100,
  • AddressIdInvalid = 200
postcode string UK postcode
spatialInfo object This object contains spatial information which is outlined below
input object Input object with request input fields.
links link [ ] An array of Link objects (described below).

spatialInfo Object
Name Type Description
wgs84 object WGS 84 latitude and longitude

Link Object
Name Type Description
rel string API response usually includes an array of HATEOAS links. This allows interaction with the API solely through the hyperlinks we provide you. You no longer need to hardcode logic into your client in order to use our API.
href string The hyperlink the client should follow is stored in the value of “href” property. That value can have some internal parameters, so the client should not parse it or modify it in any way.

Enter Sample Input Fields

Input Field Value Type Default Description
Address ID* string UK address ID

Response