HTTP/XML : Get Premises Address Level
Getting the address at premises level is a two stage process.
First we get the list of addresses at a postcode, to display to the
user. When the user selects the address, we can then retrieve
the full address data from the Postcode Lite server.
URL : XMLService/XMLSearchForAddress.aspx
Returns a series of lines, from which the user can select full
royal mail address information (Royal mail PAF Database).
XMLGetAddressRecord.aspx is then called with the selected address
id, to get full address information.
|
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.
Elements Returned
Element |
Description |
errormessage |
Contains a message if error
occurred when searching for Address by Postcode |
credits_display_text |
Status of Postcode
Address licenses.
This shows the number of users/credit lookups available
|
found |
Equals “1” if data has been
returned, thus process records below |
addressdata |
Contains address lines to
display, with their ID, for next call |
Example call
http://www.postcodelite.co.uk/xmlservice/XMLSearchForAddress.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,
addressdata)>
<!ELEMENT found (#PCDATA)>
<!ELEMENT credits_display_text (#PCDATA)>
<!ELEMENT accountadminpage (#PCDATA)>
<!ELEMENT errormessage (#PCDATA)>
<!ELEMENT addressdata (maxresults,recordcount,records*)>
<!ELEMENT maxresults (#PCDATA)>
<!ELEMENT recordcount(#PCDATA)>
<!ELEMENT records (record)>
<!ELEMENT record (id, line)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT line (#PCDATA)>
]>
<data>
<found>1</found>
<errormessage></errormessage>
<accountadminpage>http://xxx...xxx</accountadminpage>
<credits_display_text>1/1 users</credits_display_text>
<addressdata>
<maxresults>0</maxresults>
<recordcount>2</recordcount>
<records>
<record>
<id>11570840_0e</id>
<line>44 Victoria Road
Wisbech</line>
</record>
<record>
<id>11570841_0e</id>
<line>48 Victoria Road Wisbech</line>
</record>
</records>
</addressdata>
</data>
URL : XMLService/XMLSearchForAddress.aspx
Returns the full address record for the selected address id.
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.
|
id |
Record ID, to identify the Royal mail
address record. Royal mail PAF File |
Failure to use the correct license may result in us with drawing
your service.
Elements Returned
Element |
Description |
errormessage |
Contains a message if error
occurred when searching for Address by Postcode |
credits_display_text |
Status of Postcode
Address licenses.
This shows the number of users/credit lookups available
|
found |
Equals “1” if data has been
returned, thus process records below |
addressdata |
Contains address to display with
their ID for next call |
Example call
http://www.postcodelite.co.uk/xmlservice/XMLGetAddressRecord.aspx
?datakey=xxxx&id=351224_0F&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 (id, organisation, line1, line2, line3,
town, county, postcode,
country, rawpostcode,
deliverypointsuffix,nohouseholds,
smallorg, pobox, mailsortcode,
extra)>
<!ELEMENT id (#PCDATA)>
<!ELEMENT organisation (#PCDATA)>Â
<!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 deliverypointsuffix (#PCDATA)>
<!ELEMENT nohouseholds (#PCDATA)>
<!ELEMENT smallorg (#PCDATA)>
<!ELEMENT pobox (#PCDATA)>
<!ELEMENT mailsortcode (#PCDATA)>]>
<!ELEMENT udprn (#PCDATA)>
<!ELEMENT unique (#PCDATA)>
<!ELEMENT extra (#PCDATA)>
<data>
<found>1</found>
<credits_display_text>Evaluation expires 28 Jul 2010</credits_display_text>
<accountadminpage>https:/...</accountadminpage>
<errormessage></errormessage>
<record>
<id>11570840_0E</id>
<organisation>Comtek</organisation>
<line1>44 Victoria Road</line1>
<line2></line2>
<line3></line3>
<town>Wisbech</town>
<county>Cambridgeshire</county>
<postcode>PE13 2QL</postcode>
<country>England</country>
<deliverypointsuffix>NA</deliverypointsuffix>
<nohouseholds>NA</nohouseholds>
<smallorg>NA</smallorg>
<pobox></pobox>
<rawpostcode>PE132QL</rawpostcode>
<mailsortcode>NA</mailsortcode>
<udprn>NA</udprn>
<unique>NA</unique>
<extra>NA</extra>
</record>
</data>
Fields which contain "NA" are not available in Postcode Lite.
|