*Address search from a given personal name*
The AddressSearchByName* function is used to drill down a hierarchy of matched items to locate a specific address and obtain its details. The initial search criteria can be a forename* and/or surname* plus an optional address filter. The address can be returned in a default format or can be customised into a formatted label. Individual address elements and additional data items may also be returned.
The actual search and recovery of matched detail is achieved via three separate requests; AddressSearchByName*, AddressExpand and AddressDetails.
- The AddressSearchByName request initiates the search, for the given search criteria plus request options, and returns a list of matched items.
- The AddressExpand request continues the search, by expanding a specific matched item, and returns a new list of matched items at the next search level. This is repeated until no further expansion is possible.
- The AddressDetails request obtains the address and associated data for a specific matched item.
NOTE: The AddressSearchByName* function is only available when the Master Address File contains appropriate data. For further details please refer to the How do I discover the searching capability of a given MAF? below.
AddressSearchByName request*
The AddressSearchByName request* consists of three core parameters; the Forename*, Surname* and optional AddressFilter (Input1..Input10).
-
- If the requested MAF only supports surname* searching, then the Surname* is mandatory.
-
- If the requested MAF supports both Forename* and Surname* searching, then either Forename* and/or Surname* parameter must be specified.
- The AddressFilter is optional, but would generally be provided to narrow the search to a specific area. This could be a postcode, a full or partial address. Splitting address elements (e.g. premise name, street, town, etc.) into separate input lines generally yields better results.
NOTE: The maximum number of supported search criteria inputs is 10. This means that only 10 items from the Forename*, Surname* and AddressFilter (Input1..Input10) should be given a value.
All other parameters are optional and should only be supplied when a non-default configuration is required.
| Parameter |
Mandatory/Optional |
Description |
| Forename* |
Optional |
Forename* search criteria. |
| Surname* |
Optional |
Surname* search criteria. |
| Input1..Input10 |
Optional |
Address filter – lines 1 to 10. |
| MAF |
Optional |
Specifies which MAF the lookup should be performed against. If omitted the user’s default MAF will be applied. Available MAFs are identified via the “Status” function. |
| RequestOptions |
Optional |
MaxMatches – the maximum number of matches to be returned in the response. The SOAP Address Service is provisioned with a default and upper limit. If a requested value exceeds the upper limit then the upper limit will be applied.
Timeout – the timeout period, in seconds, to perform the request. The SOAP Address Service is provisioned with a default and upper limit. If a requested value exceeds the upper limit then the upper limit will be applied. |
Below is an example AddressSearchByName* request for a fictitious person, “Joe Bloggs” in “Altrincham”.
<soapenv:Body>
<hpw:AddressSearchByNameRequest xmlns:hpw="http://hopewiser/soapaddrsvr">
<hpw:Forename>Joe</hpw:Forename>
<hpw:Surname>Bloggs</hpw:Surname>
<hpw:Input1>Altrincham</hpw:Input1>
</hpw:AddressSearchByNameRequest>
</soapenv:Body>
The response will always contain a status code and description (see Status Codes section below). Please note if a search does not fully complete (i.e. find all possible matches), then the entire request will be treated as a failure and an appropriate status code/description will be returned (e.g. “Too many matches”).
Successful responses will also contain one or more matched items. Each matched item will contain a number attribute (a simple count) and the elements listed below.
| Description |
| SID |
The matched item’s search identity. This is a unique reference that can be used to expand the item or obtain the item’s address details. |
| Text |
A textual description of the matched item. This should be presented to the user for selection purposes. |
| Expandable |
A flag indicating if the matched item can be expanded to search for premise details. Possible values are yes or no. When the flag contains the value yes further address details can be obtained via an “Address Expand Request”. When the flag contains the value no full address details can be obtained via an “Address Details Request”. |
| ExpandableToName* |
A flag indicating if the matched item can be expanded beyond premise details to return a list of resident names* for the address. Possible values are yes or no. |
Below is an example AddressSearchByName* response for “Joe Bloggs” in “Altrincham”.
<soapenv:Body>
<hpw:AddressSearchByNameResponse xmlns:hpw="http://hopewiser/soapaddrsvr">
<hpw:StatusCode>0</hpw:StatusCode>
<hpw:StatusDesc>Successful</hpw:StatusDesc>
<hpw:Match number="1">
<hpw:SID>
%+0%JOE@1||BLOGGS@2||ALTRINCHAMmx%uk-test-nc-extract-current
%single_step%250%EnglishAndWelsh%yes%no%no
</hpw:SID>
<hpw:Text>Hopewiser Ltd,Merlin Court,Atlantic Street,
Altrincham,Cheshire [Mr Joe Bloggs]</hpw:Text>
<hpw:Expandable>no</hpw:Expandable>
</hpw:Match>
</hpw:AddressSearchByNameResponse>
</soapenv:Body>
AddressExpand request
The AddressExpand request continues a search, by expanding a specific matched item, and returns a new list of matched items at the next search level. This should be repeated until no further expansion is possible.
Matched items with either the Expandable flag value yes or the ExpandableToName* flag value yes can be expanded.
It only requires the SID (Search IDentity) of the matched item to be expanded. This will have been obtained from either the initial search request or a preceding AddressExpand request.
All other parameters are optional and should only be supplied when a non-default configuration is required.
| Parameter |
Mandatory/Optional |
Description |
| SID |
Mandatory |
Search identity of a matched item |
| RequestOptions |
Optional |
One option is available for an Address Expand Request.
Timeout – the timeout period, in seconds, to perform the request. The SOAP Address Service is provisioned with a default and upper limit. If a requested value exceeds the upper limit then the upper limit will be applied. |
Below is an example AddressExpanded request – continuing the search for “Joe Bloggs” in “Altrincham”.
<soapenv:Body>
<hpw:AddressExpandRequest xmlns:hpw="http://hopewiser/soapaddrsvr">
<hpw:SID>
%+0%JOE@1||BLOGGS@2||ALTRINCHAMmx%uk-test-nc-extract-current
%EnglishAndWelsh%yes%no%no
</hpw:SID>
</hpw:AddressExpandRequest>
</soapenv:Body>
The response will always contain a status code and description (see Status Codes section below). Please note if a search does not fully complete (i.e. find all possible matches), then the entire request will be treated as a failure and an appropriate status code/description will be returned (e.g. “Too many matches”).
Successful responses will also contain one or more matched items. Each matched item will contain a number attribute (a simple count) and the elements listed below.
| Element |
Description |
| SID |
The matched item’s search identity. This is a unique reference that can be used to expand the item or obtain the item’s address details. |
| Text |
A textual description of the matched item. This should be presented to the user for selection purposes. |
| Expandable |
A flag indicating if the matched item can be expanded to search for premise details. Possible values are yes or no. When the flag contains the value yes further address details can be obtained via an “Address Expand Request”. When the flag contains the value no full address details can be obtained via an “Address Details Request”. |
| ExpandableToName* |
A flag indicating if the matched item can be expanded beyond premise details to return a list of resident names* for the address. Possible values are yes or no. |
Below is an example AddressExpand response – continuing the search for “Joe Bloggs” in “Altrincham”.
<soapenv:Body>
<hpw:AddressExpandResponse xmlns:hpw="http://hopewiser/soapaddrsvr">
<hpw:SID>
%+0%JOE@1||BLOGGS@2||ALTRINCHAMmx%uk-test-nc-extract-current %EnglishAndWelsh%yes%no%no
</hpw:SID>
</hpw:AddressExpandRequest>
</soapenv:Body>
AddressDetails Request
The AddressDetails request obtains the address and associated data for a specific matched item.
Generally a client would only obtain the details of matched items that contain a full address (i.e. those having the Expandable flag value no). However it is possible to obtain the details of any matched item.
It only requires the SID (Search IDentity) of the matched item to be expanded. This will have been obtained from either the initial search request or any AddressExpand request that followed.
All other parameters are optional and should only be supplied when a non-default configuration is required.
| Parameter |
Mandatory/Optional |
Description |
| SID |
Mandatory |
Search identity of a matched item |
| RequestOptions |
Optional |
Timeout – the timeout period, in seconds, to perform the request. The SOAP Address Service is provisioned with a default and upper limit. If a requested value exceeds the upper limit then the upper limit will be applied.
AddressType – the address type to be returned. Allowed values are address (default), formatted_label or both (see the How do I customise an address label? for further details). |
| FormattedLabelOptions |
Optional |
Eight options are available. These are used to customise the output formatted labels to meet the client’s requirements (see the How do I customise an address label? section for further details). |
| Data |
Optional |
Specifies the common data items to be returned (see the ‘How do I obtain individual address or common data fields’ section for further details). |
| ExtraData |
Optional |
Specifies the extra data items to be returned (see the ‘How do I obtain additional (‘extra’) data items?’ section for further details). |
Below is an example AddressDetails request – continuing the search for “Joe Bloggs” in “Altrincham”.
<soapenv:Body>
<hpw:AddressDetailsRequest xmlns:hpw="http://hopewiser/soapaddrsvr">
<hpw:SID>
%+0%JOE@1||BLOGGS@2||ALTRINCHAMmx%uk-test-nc-extract-current
%single_step%250%EnglishAndWelsh%yes%no%no
</hpw:SID>
</hpw:AddressDetailsRequest>
</soapenv:Body>
The response will always contain a status code and description (see Status Codes section below).
Successful responses will also contain a single matched item. The content of the matched item is dependent on the requested options. It will contain a number attribute (value 1) and any combination of the elements listed below. For a basic request this will only be an address.
| Element |
Description |
| Address |
An address will be present when the AddressType request option has been omitted or contains either the value address or both (see Common Output Fields section for further details). |
| FormattedLabel |
A formatted label will be present when the AddressType request option contains either the value formatted_label or both (see the How do I customise an address label? section for further details). |
| Data |
Only requested common data items will be present (see the How do I obtain individual address or common data fields section in for further details). |
| ExtraData |
Only requested extra data items will be present (see the How do I obtain additional (‘extra’) data items? section for further details). |
Below is an example AddressDetails response – continuing the search for “Joe Bloggs” in “Altrincham”.
<soapenv:Body>
<hpw:AddressDetailsResponse xmlns:hpw="http://hopewiser/soapaddrsvr">
<hpw:StatusCode>0</hpw:StatusCode>
<hpw:StatusDesc>Successful</hpw:StatusDesc>
<hpw:Match number="1">
<hpw:Address>
<hpw:Name>Mr Joe Bloggs</hpw:Name>
<hpw:Line1>Hopewiser Ltd</hpw:Line1>
<hpw:Line2>Merlin Court</hpw:Line2>
<hpw:Line3>Atlantic Street</hpw:Line3>
<hpw:Town>ALTRINCHAM</hpw:Town>
<hpw:County>Cheshire</hpw:County>
<hpw:Postcode>W14 5NL</hpw:Postcode>
<hpw:DP>1HQ</hpw:DP>
</hpw:Address>
</hpw:Match>
</hpw:AddressDetailsResponse>
</soapenv:Body>