FetchRawAddress
 

FetchRawAddress

Definition

RawPAFAddress FetchRawAddress ( string username, string password, AddressCaptureLicence licence, string addressKey, Option[] options )

Description:

Retrieves the full structured PAF address of an address that has already been found using the FindAddress, AddressesByLocalityKey, or AddressesByStreetKey methods.

The address to retrieve is identified by the addressKey parameter, which should be taken from the ID of a PartialAddress that has been returned from one of these methods.

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 FetchRawAddress(licence, addressKey) {
  /// <param name="licence">string. One of the following values: WebServerFull, WebClickFull, WebClickThoroughfare, InternalUserFull, InternalUserThoroughfare, SmallUserFull, SmallUserThoroughfare, Lookup, InternalServerFull, InternalServerThoroughfare, FreeTrial, FreeTrialThoroughfare</param>
  /// <param name="addressKey">string</param>
  var addresscapture = new data8.addresscapture();
  
  addresscapture.fetchrawaddress(
    licence,
    addressKey,
    [
      new data8.option('FixTownCounty', 'true'),
      new data8.option('MaxLines', '6'),
      new data8.option('MaxLineLength', '255')
    ],
    showFetchRawAddressResult
  );
}

function showFetchRawAddressResult(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.
    //   Each field in the items in the array contains a specific address element defined by
    //   the Royal Mail.
  }
}

loadIntegr8();

</script>
Skip Navigation Links
Request handled by server S2 for client 38.107.179.216 at 08/02/2012 04:02:17