Get Full Address from SOAP Web Service:
Full Address Search functionality:
- Enter postcode to search for
- Presents a list of addresses at postcode entered
- Address is selected by user
- Full address for selection is returned
The following example calls our server to retrieve a list of addresses for a given postcode (or address words if using our Web Based data). These addresses are then displayed in a list box for user selection (step1), with line ID, then the full address is finally retrieved from our server in the next step (step2).
Step 1 Sign up for 30 day free trial
Simply use the "Sign Up for Trial" link at top right of this page to open a trial account. We will then send you a data key, which is used to identify your account, when using the following service.
Step 2 Add SOAP reference to your project
The following web references give access to our SOAP web service
.NET Web Reference
http://www.SimplyLookupadmin.co.uk/WebService.asmx
WSDL Web Reference
http://www.SimplyLookupadmin.co.uk/WebService.asmx?WSDL
You should add this SOAP reference to your project.
Parameters
Parameter name | Description |
---|---|
DataKey | Datakey, which is available when account has been created, under the “DataKey” tab of the online account administrator page. |
Username | Only needed if for internal postcode address use |
SearchType | Set to “UK” |
SearchPrima.Postcode | Postcode to find To retrieve residential property only. To do this simply append “[” to the end of the Postcode. To retrieve commercial property only. To do this simply append “]” to the end of the Postcode. |
Returns
Returns true if address search completed and General_credits_display_text contains summary of Credits/License status. Else errors reported in General_errormessage.
Step 3 Call SOAP Web Service to Present List of addresses at Postcode
The following code will call the SOAP Web Service to return a list of addresses given a postcode. The list should be displayed to the user for selection.
Example Code
VB.Net |
'Search for full Postcode or other
address fields |
C# .NET |
string myDataKey =
Request.QueryString["datakey"].ToString(); |
Where uk.co.simplylookupadmin.www is a web reference to: http://www.SimplyLookupadmin.co.uk/WebService.asmx
Please note: Section 3.5 of the terms and conditions state: "The Customer, when using the Postcode Lookup service via Web Service, must make sure each user is identified by a unique Computer name, in each call to the Web Service if used internally”. In simple language this means that each user must be identified by a unique computer name, if used by a company employee. In the above example "UserID" was passed as the computer name.
Step 3 Get Address Record
Having selected the address line from previous step, we now need to get the address record given the Address ID of record selected.
Parameters
Parameter name | Description |
---|---|
DataKey | Datakey, which is available when account has been created, under the “DataKey” tab of the online account administrator page. |
Username | Only needed if for internal postcode address use |
SearchType | Set to “UK” |
AddressID | Address ID of line selected in previous step |
Example code
VB.Net |
'Get ID from Listbox in hidden
column 0 |
C# .NET |
//Search for Address by
Postcode, but returning Thorughfare data |
Step 4 Testing
Final step is to test, to enable easy testing please use our special test postcodes.
Postcode Software Full Address Search - Example Code
Simply download the example code. The code is in the "SOAP/VBNET 2010 FULL PAFF" or "SOAP/VBNET 2003 FULL PAFF" directory of our example downloads.
These two examples demonstrate postcode lookup software using Full Address.
Data Returned:
General Information
Public AddressRecordGotWithoutError As Boolean
'True if address data returned
Public ErrorMessage As String
'Shows number of Credits/Users available
Public ErrorMessage As String
'Error Message if error
Public BuyMoreCreditsURL As String
'URL which takes use to buy more credits
PAF Address Information
Public Id As String ●
Public CompanyName As String
Public Line1 As String
Public Line2 As String
Public Line3 As String
Public Town As String
Public CountyState As String
Public PostZipCode As String
Public Country As String
'Note: When using getting Thoroughfare only:
'CompanyName is Not returned
'Line1 may return road name, but the user must supply the Building
'Name/Number in your software, so you will need to prompt them for this data
'Extra Address information contained in PAF data file
Public DeliveryPointSuffix As String ●
Public NoHouseHolds As String ●
Public SmallOrg As String ●
Public MailSort As String ●
Public Unique As String ●
Public UDPRN As String ●
Public Spare As String ●
● see Additional Data Returned by Postcode Finder API for more information