Signup Login

Find people at an address

API Method: address_person

Description

Returns person(s) living at a specified postcode and house number, and any telephone numbers.

The API requires a unique UK address in order that it may return the above information.

A full UK postcode is required. If the house number or name is not specified, the method returns a free list of the premises at which there is data about one or more persons. The final user may be presented with that list, and may opt to select an address at which to view the data. If there is no residential data at an address, that address will not appear in the list

Mandatory Parameters

Name Description
api_key or javascript_key Use your API key if invoking server-side. If invoking from the browser via JavaScript, generate a JavaScript key using the javascript_key method.
postcode Enter a full UK postcode; this can include spaces and can be in any case.

Optional Parameters

Name Description
client You can optionally include an identifier for your final client or user. This is logged in your usage log and you will be able to view your usage statistics by client.
output Set to json for a JSON response; the default response is XML. Not applicable to the SOAP API.
callback When using JSON, specify a JSONP wrapper in which the JSON response is to be wrapped.
premises Enter the house number or name.

Leave blank to return a free (no charge) list of the premises at which there is one or more occupant the end user will then select a premises from that list, at which to view the occupant(s) and telephone number(s)

Returned Values

The XML response is contained within a <address_person_res> element.

Name Description
status Returns ok if the operation has succeeded, or error if an error has occurred; Returns the error_code for error details.
error_code Returns the error code when the status is error. See below for error codes.
t2a_version_number The current API version number.
credit_used The number of credits used in order to execute the request.
mode Returns normal or test when executed in the free test mode.
person_list An array of person records.
premises_list

An array of premises records.

This is seen if the premises parameter is ambiguous or not specified; it is a free list of addresses at which there is data about the resident(s), and can be used to allow the end user to select the household to be viewed.

Use the name value from the selected premises to replace the premises input parameter value when re-invoking this method. No charge is made when a premises_list is returned.

Error Codes

See the common error codes. There are no errors which are specific to this method.

Free Test Mode

When operating in the free test mode errors are returned if mandatory parameters are missing, or it returns a dummy data response, in an identical format to a real response.

Note that the mode is returned as test when the method is operating in the free test mode.

Example XML Response


<?xml version="1.0" encoding="utf-8" ?>
<address_person_res>
	<t2a_version_number>2.7.4.0</t2a_version_number>
	<status>ok</status>
	<mode>normal</mode>
	<person_list>
		<person>
		  <title>Mr</title>
		  <forename>Alan</forename>
		  <middle_initial/>
		  <surname>Fiction</surname>
		  <line_1>4 Imagination Gardens</line_1>
		  <line_2>Magic Street</line_2>
		  <line_3/>
		  <place>Heslingdown</place>
		  <town>York</town>
		  <addr_single_line>4 Imagination Gardens, Magic Street, 
		  Heslingdown, 
		  York, YO10 5DG</addr_single_line>
		  <postcode>YO10 5DG</postcode>
		  <telephone_number>(01904) 000000</telephone_number>
		</person>
		<person>
		  <title>Mrs</title>
		  <forename>Jean</forename>
		  <middle_initial>Z</middle_initial>
		  <surname>Fiction</surname>
		  <line_1>4 Imagination Gardens</line_1>
		  <line_2>Magic Street</line_2>
		  <line_3 />
		  <place>Heslingdown</place>
		  <town>York</town>
		  <addr_single_line>4 Imagination Gardens, Magic Street, 
		  Heslingdown, 
		  York, YO10 5DG</addr_single_line>
		  <postcode>YO10 5DG</postcode>
		  <telephone_number>(01904) 000000</telephone_number>
		</person>
	</person_list>
</address_person_res>