HTTP/XML : Get Street Level Address
URL : XMLService/XMLSearchForThoroughfareAddress.aspx
This call will retrieve the Street/Thoroughfare Address Data (Royal Mail
Thoroughfare PAF) for a given Postcode. The Thoroughfare Address
is a cut down version of the Full Address, basically it does not
contain the Building name or number. Therefore the programmer
should allow the user to enter the House Name/Number for the
address. These licenses are cheaper the Full Postcode data.
|
Parameter |
Description |
datakey |
Datakey, which is available when account
has been created, under the “DataKey” tab of the online
account administrator page.
When Postcode Lite is used within an
organisation use the data key beginning with "I", and buy
User licenses to access the data.
When supplying the address data to the general public, on a
web site, use the data key beginning with "W" and purchase
Web Credit Packs.
|
username |
When Postcode Lite is used within
an organisation (Web site or Application), this must provide
a unique name of the user workstation.
When supplying the address data to the general public, on a
web site, you do not need to specify this.
|
postcode |
Postcode to search for |
|
Failure to use the correct license may result in us with drawing
your service.
Returns
Parameter |
Description |
data |
Data regarding the status of the account |
record |
Address fields. Some fields may be
blank. |
Example call
http://www.postcodelite.co.uk/xmlservice/XMLSearchForThoroughfareAddress.aspx
?datakey=xxxx&postcode=pe132ql&username=admin
Returns XML
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<!DOCTYPE data [
<!ELEMENT data(found,credits_ display_text,
accountadminpage,errormessage,record)>
<!ELEMENT found (#PCDATA)>
<!ELEMENT credits_display_text (#PCDATA)>
<!ELEMENT accountadminpage (#PCDATA)>
<!ELEMENT errormessage (#PCDATA)>
<!ELEMENT record (line1,line2,line3,town,county,postcode,country,
rawpostcode,
mailsortcode,extra)>
<!ELEMENT line1 (#PCDATA)>
<!ELEMENT line2 (#PCDATA)>
<!ELEMENT line3 (#PCDATA)>
<!ELEMENT town (#PCDATA)>
<!ELEMENT county (#PCDATA)>
<!ELEMENT postcode (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT rawpostcode (#PCDATA)>
<!ELEMENT mailsortcode (#PCDATA)>
<!ELEMENT extra (#PCDATA)>
]>
<data>
<found>1</found>
<errormessage></errormessage>
<credits_display_text>Evaluation expires 28 Jul 2010</credits_display_text>
<accountadminpage>https://www.xxx...</accountadminpage>
<errormessage></errormessage>
<record>
<line1>Vicrotia Rd</line1>
<line2></line2>
<line3></line3>
<town>Wisbech</town>
<county>Cambridgeshire</county>
<postcode>PE13 2QL</postcode>
<country>England</country>
<rawpostcode>PE132QL</rawpostcode>
<mailsortcode>NA</mailsortcode>
<extra>NA</extra>
</record>
</data>
Fields which contain "NA" are not available in Postcode Lite.
|