Skip to the content

Retrieve

Retreive the full address

Live Demo

To connect to this service you'll need to use one of these endpoints:

WSDL
https://webservices.data-8.co.uk/PredictiveAddress.asmx
JSON
https://webservices.data-8.co.uk/PredictiveAddress/Retrieve.json

Description

Retrieve the full details of an address returned from a previous call to either the Search or DrillDown endpoints where the container property was set to false.

Parameters

The following parameters can be supplied to this method

username

username

See the available authentication methods. If you are using username & password authentication, specify the username to authenticate as. If you are using API Key authentication and you are not using the JSON, Javascript or ADO APIs, use your API Key here with the prefix apikey-, e.g. apikey-ABCD-1234-EFGH-5678
password

password

If you are using username & password authentication, specify the password to use for authentication. Otherwise leave this blank.
country

country

The ISO-2 country code in which the address belongs.

id

id

The value property from the response of previous requests from either the Search or DrillDown methods, when the container property was false, should be supplied here.

options

options

An array of options that control further details of how this method operates. See the Advanced Options section below for more information.

Advanced Options

The following options can be specified as part of the option parameter. Each option is specified as a key/value pair. The list of available names is shown below, along with a description of the allowable values for that name.

FixBuilding

FixBuilding

Ensures the building name/number is always placed in the first line

FixPostcode

FixPostcode

true to ensure the postcode is placed in the last line of the formatted address, or false to place it according to the country-specific formatting rules. If you use the fields option this is worked out automatically.

FixTownCounty

FixTownCounty

true to ensure the last two lines of the formatted address are used to hold the town and county, or false otherwise. If you use the fields option this is worked out automatically.

Formatter

Formatter

This option can be set to the name of a pre-defined formatting type that controls how the address is formatted. The following values are allowed: DefaultFormatter - This is the standard formatting type as described above. NoOrganisationFormatter - This works in the same way as the DefaultFormatter, but omits any organisation or departmental information from the address. PAFStandardFormatter - This produces an address in the standard format recommended by the Royal Mail for printing addresses on envelopes. It produces formatted addresses containing however many lines are necessary to hold the information stored in each particular address, and does not use any county information.

IncludeCountry

IncludeCountry

Set to true to include ISO2 and full country name in the response

IncludeLocation

IncludeLocation

Retrieve geocode information about the address such as Latitude and Longitude as well as Easting, Northing, GridReference and much more.

IncludeMR

IncludeMR

Includes addresses from the Multiple Residency database in the results (requires additional licensing).

IncludeNYB

IncludeNYB

Includes addresses from the Not Yet Built database in the results (requires additional licensing).

IncludeUDPRN

IncludeUDPRN

set to true to include the UDPRN for any UK addresses. The UDPRN value is stored in the UniqueReference property of the response.

IncludeUPRN

IncludeUPRN

set to true to include the UPRN for UK addresses. This is not available by default - speak to your account manager to enable this option. Cannot be used in conjunction with IncludeUDPRN - only one of these options can be specified. The UPRN value is stored in the UniqueReference property of the response.

MaxLineLength

MaxLineLength

The maximum number of characters per line in the formatted address. Defaults to 255.

MaxLines

MaxLines

The number of lines to format the address over. If you use the fields option this is worked out automatically, but must be defined explicitly if you use the selectAddress option instead.

PreferredLanguage

PreferredLanguage

Set this to cy to retrieve addresses in Welsh where available, or en to prefer English. Addresses are returned in English when this option is not specified.

UnwantedPunctuation

UnwantedPunctuation

a string containing any characters that should be excluded from the formatted address.

Results

This method returns an object containing the following fields:

Status

Status

Indicates whether the method call was successful, or if some error occurred. If the Success field is true, the other results described below can be used to get the results of the method. If Success is false, some error occurred in calling the method, such as the authentication failed or the account is out of credits. The details of the error can be obtained from the ErrorMessage field, and any other results should be ignored
Result

Result

An object containing full details of a complete address. 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.

Live Demo

country
id
options
Name Value
Credits Remaining Today: 5

Sample Code

Start a Free 30 Day Trial Today

Start a free trial today