GetFullAddress
 

GetFullAddress

Definition

FormattedAddress[] GetFullAddress ( string username, string password, AddressCaptureLicence licence, string postcode, string building, Option[] options )

Description:

Finds a list of formatted PAF addresses that are in the requested postcode, and match the optional building search criteria. The postcode parameter is required, but the building parameter is optional. If the building parameter is not specified, every address in the postcode is included in the results.

This method provides the fastest and most accurate method of retrieving an address if you know the postcode.

View all Postcode Lookup Methods

Code Samples

Language:

<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="http://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">
</script>

<script type="text/javascript">

function loadIntegr8() {
  // Load the AddressCapture Integr8 service
  data8.load('AddressCapture');
}

function GetFullAddress(licence, postcode, building) {
  /// <param name="licence">string. One of the following values: WebServerFull, WebClickFull, WebClickThoroughfare, InternalUserFull, InternalUserThoroughfare, SmallUserFull, SmallUserThoroughfare, Lookup, InternalServerFull, InternalServerThoroughfare, FreeTrial, FreeTrialThoroughfare</param>
  /// <param name="postcode">string</param>
  /// <param name="building">string</param>
  var addresscapture = new data8.addresscapture();
  
  addresscapture.getfulladdress(
    licence,
    postcode,
    building,
    [
      new data8.option('FixTownCounty', 'true'),
      new data8.option('MaxLines', '6'),
      new data8.option('MaxLineLength', '255')
    ],
    showGetFullAddressResult
  );
}

function showGetFullAddressResult(result) {
  // Check that the call succeeded, and show the error message if there was a problem.
  if (!result.Status.Success) {
    alert('Error: ' + result.Status.ErrorMessage);
  }
  else {
    // TODO: Process method results here.
    // Results can be extracted from the following fields:
    // result.Results
    //   Contains an array of addresses that match the query.
    //   A formatted version of each address in the array is available in the Address field,
    //   and a structured version of the address is available in the RawAddress field.
  }
}

loadIntegr8();

</script>
Skip Navigation Links
Request handled by server S1 for client 38.107.179.216 at 23/05/2012 00:38:58