Simply Postcode Lookup                     Phone: 01945 464854 

   Log In       
Postcode Address Lookup Software
 

  SOAP Web Service Programming manual:


  Advantages

  • Platform/Language independent using Simple Object Access Protocol (SOAP)

  • Offers full access to all data we provide (Full/Thoroughfare/Distance)

  • Data always up to date

  • No Data Administration Cost for you

  • Your Nearest Store location with optional Google Map

  • Can allow your customer to open an account, your get commission

      [More About being a Reseller]

     

 

  Please download examples here

   Tutorial Video : Programming interfaces & using example code

 

If you require web integration, we strongly recommend you look at the PHP/.NET Web integration, which will run on most servers.   It is quick and easy to add Full Address Postcode search lookup to any web page.  It uses AJAX technology to smoothly integrate Postcode Lookup into your Web site.

 

  [Click here for more PHP AJAX Address Lookup]

  [Click here for more .NET AJAX Address Lookup]

 

WSDL Specification


The following URL, gives your Web Service Discovery Tool (DISCO) the SOAP specification (WSDL) of the our the web service we provide:

 

Click here for the SOAP Web Service Specification

  http://www.SimplyLookupadmin.co.uk/WebService.asmx

 

Functions Available:


       Search for FULL PAF Address from Postcode

       Get for Thoroughfare Address from Postcode

       Get PostZon Data from Postcode (Longitude, Latitude and distance)

       Get Map/Nearest Service URL

       Your Nearest Store location with optional Google Map

       Get Route on Map URL

       Open an Account and associate with reseller

       Account Status and Postcode Lookup Usage

       Data Returned

    [What is Full, Thoroughfare and PostZon Data?]

 

Easy Integration using .NET Web Service:


Open an on-line account, to get a Data Key  

  [Open your account]

Simply create a Web Reference to http://www.simplylookupadmin.co.uk/WebService.asmx within SOAP compatible programming language or .NET project  

Simply use the example code to integrate a Postcode Lookup service into your .NET Application

 

  Example code for Full Postcode Lookup Services in VB.NET:


The following example calls our server to retrieve a list of address for a given postcode (or address words if using our Web Based data, more info).   These address are then displayed in a list box for user selection, with line ID, then the full address is finally retrieved from our server in the next step.  

An example of this is included in the Example Downloads file, plus a Thoroughfare version, where the user simply searches for an address and provides the building name/number.   

  Example code:

'Search for full Postcode or other address fields

Me.ListView1.Items.Clear()

Dim PostcodeSearch As New PostcodeWebService.WebService

Dim SearchPrima As New PL_SearchPrimaRecord

Dim AddressesDataReturned As New PL_AddressesDataReturnedRecord

 

'Set search criteria, either full Postcode or Two other address fields

With SearchPrima

  .Postcode = Me.InpPostcode.Text

End With

 

'Do Search, on Postcode or two or more address fields

AddressesDataReturned = PostcodeSearch.SearchForAddress( _

       Me.InpDataKey.Text, _

      "TestComputer", "UK", SearchPrima)

 

If AddressesDataReturned.SearchPerformedWithoutError Then

  'Display results, no major error

  If AddressesDataReturned.ErrorMessage <> "" Then 

    MsgBox(AddressesDataReturned.ErrorMessage)

 

  With AddressesDataReturned

    'Show amount of Postocde Lookup credits left

    Me.Text = .CreditsStatusText

 

    'Remember the URL to buy more Postocde Lookup credits

    LinkToBuyMoreCredits = .BuyMoreCreditsURL

    Me.LinkTOBuyMore.Visible = True

 

    'Put Address data in listview

    Dim x&

    For x = 0 To .LineCount

      Dim itemToAdd As ListViewItem = ListView1.Items.Add(   

                        _.Lines(x).ID, 0)

      itemToAdd.SubItems.Add(.Lines(x).Address)

    Next

  End With

 

  Me.TabControl1.SelectedIndex = 1

Else

  'Display error (Account stuff mostly)

  MsgBox(AddressesDataReturned.ErrorMessage)

End If

 

Retrieving residential property only.  To do this simply append “[” to the end of the Postcode.

Retrieving commercial property only.  To do this simply append “]” to the end of the Postcode.

  [Download .NET Examples]

 

  And to finally read the address:


This final step calls our server, with the AddressID, to retrieve the Full Address.

 

  Example code:

 

'Get ID from Listbox in hidden column 0

Dim AddressID As String = ListView1.Items(ListView1.SelectedItems.Item(0).Index).SubItems(0).Text

Dim PostcodeSearch As New PostcodeWebService.WebService

Dim Address As PL_AddressRecord

 

'Ask for Address by ID

Address = PostcodeSearch.GetAddressRecord(Me.InpDataKey.Text, _

          "TestComputer", "UK", AddressID)

 

Me.TabControl1.SelectedIndex = 2

 

If Address.AddressRecordGotWithoutError Then

  'Display results

  If Address.ErrorMessage <> "" Then MsgBox(Address.ErrorMessage)

 

  'Process the Address to text field

  Dim AddressText As String

  With Address

    AddressText = "Company:" & .CompanyName & vbCrLf

    AddressText += "Line1:" & .Line1 & vbCrLf

    AddressText += "Line2:" & .Line2 & vbCrLf

    AddressText += "Line3:" & .Line3 & vbCrLf

    AddressText += "Town:" & .Town & vbCrLf

    AddressText += "Postcode:" & .PostZipcode & vbCrLf

    AddressText += "Country:" & .Country & vbCrLf

  [Click here for data returned]

  End With

  Me.TxtAddress.Text = AddressText

Else

  'Display error (Account stuff mostly, i.e. No License)

  MsgBox(Address.ErrorMessage)

End If

 

  [Download .NET Examples]

 

  Get Thoroughfare (Street Level) Address


The following example calls our server to retrieve the street level address for a given postcode.   

 

Dim PostcodeToGet as string = "PE132XQ"

Dim PostcodeSearch As New PostcodeWebService.WebService

Dim Address As PL_AddressRecord

 

'Ask for Address by ID

Address = PostcodeSearch.SearchForThoroughfareAddress(Me.InpDataKey.Text, _

          "TestComputer", "UK", PostcodeToGet )

 

If Address.AddressRecordGotWithoutError Then

  'Display results

  If Address.ErrorMessage <> "" Then MsgBox(Address.ErrorMessage)

 

  'Process the Address to text field

  Dim AddressText As String

  With Address

    AddressText + = "Line1:" & .Line1 & vbCrLf

    AddressText + = "Line2:" & .Line2 & vbCrLf

    AddressText + = "Line3:" & .Line3 & vbCrLf

    AddressText + = "Town:" & .Town & vbCrLf

    AddressText + = "Postcode:" & .PostZipcode & vbCrLf

    AddressText + = "Country:" & .Country & vbCrLf

  [Click here for data returned]

  End With

  Me.TxtAddress.Text = AddressText

Else

  'Display error (Account stuff mostly, i.e. No License)

  MsgBox(Address.ErrorMessage)

End If

  [What is Full, Thoroughfare and PostZon Data?]

 

  Get PostZon Data from Postcode (Longitude, Latitude and distance)


The following example calls our server to retrieve the PostZon address data for a given postcode, OSRef, Longitude/Latitude or Town.   It also returns the Distance in Km between two postcodes if HomePostcode is set.

 

Dim HomePostcode as string ="PE132QL"

Dim PostcodeToGet as string = "PE132XQ"

Dim PostcodeSearch As New PostcodeWebService.WebService

Dim Address As PL_AddressRecord

 

'Ask for Address by ID

Address = PostcodeSearch.SearchForPostZonData(Me.InpDataKey.Text, _

          "TestComputer", "UK", PostcodeToGet, HomePostcode)

 

If Address.AddressRecordGotWithoutError Then

  'Display results

  If Address.ErrorMessage <> "" Then MsgBox(Address.ErrorMessage)

 

  'Process the Address to text field

  Dim AddressText As String

  With Address

    AddressText + = "Longitude:" & .longitude_WGS84 & vbCrLf

    AddressText + = "Latitude:" & .latitude_WGS84 & vbCrLf

    AddressText + = "Distance Km:" & .GeoDistanceToHomePostcode & vbCrLf

  [Click here for data returned]

 

  End With

  Me.TxtAddress.Text = AddressText

Else

  'Display error (Account stuff mostly, i.e. No License)

  MsgBox(Address.ErrorMessage)

End If

 

To get the PostZon record by OSRef, simply set postcode to the OSRef, when calling SearchForPostZonData.

 

To get the PostZon record by Longtitude/Latitude, (closest within 10Km) set postcode to the "Longtitude|Latitude" (separated by |). 

 

The Postcode found will be returned in Address.PostZipCode.

To get the Longitude and Latitude of a Town, simply provide the Town name + “,SPACE“ + County in the postcode field.  The Longitude and Latitude will then be returned.  It is suggested that the town list in displayed using a AJAX search box.

[Download town list]

 

 

  Get/Display Maps or Nearest


Simply make a call to the following functions get the URL of map based on the Postcode, at one of three zoom levels.

'ZoomLevel can be "Street","District" or "Area"

GetUrlforPrefuredMap(postcode,zoomlevel)

 

To get the nearest service to Postcode or town, call:

GetUrlforPrefuredMap(postcode,zoomlevel)

Set Postcode to Postcode or Town Name

Set zoomlevel = "Service:" & Keywords

  Example code:

GetUrlforPrefuredMap("PE132QL","SERVICE:Hospital" )

This will result in a list of "hospitals" nearest to PE132QL.

 

  Display Route on Map


Simply make a call to the following functions get the URL or display a Map with a best route superimposed.

  GetUrlforPrefuredMap(HomePostcodeOrTown,"ROUTE:" & ListOfPostcodes)

  GetUrlforPrefuredMap(HomePostcodeOrTown,"ROUTE:" & ListOfPostcodes)

 

where HomePostcodeOrTown is the start point

and ListOfPostcodes is a list of delivery address (comma separated)

 

  Example code:

So calling GetUrlforPrefuredMap("PE132QL","ROUTE:PE132XQ,DG14BX") will display map of route

 

Open an Account and associate with reseller


Create an account and assign you as the reseller.  It can link your own Reseller account to a customers so you get commission on ALL purchases.  Please apply to be a reseller at http://www.simply-postcode-lookup.com/Reseller.htm

  SimplyPostCodeLookup.SetResellerID( 4 )

  [More About being a Reseller]

The call one of:

Internal Use

'For Internal Use (All Desktop Software and Web Software used internally within a company)

  http://www.simplylookupadmin.co.uk/A2CustomerAccount/

         WebAccountCreateFromReseller.aspx ?r=I&id=4

 

Where 4 is your reseller ID

Web Use    

'or For Web Use (All Web Software used by customer)

  http://www.simplylookupadmin.co.uk/A2CustomerAccount/

         WebAccountCreateFromReseller.aspx?r=W&id=4

Both

http://www.simplylookupadmin.co.uk/A2CustomerAccount/

         WebAccountCreateFromReseller.aspx?r=&id=4

  [What is Full, Thoroughfare and PostZon Data?]

Account Status and Postcode Lookup Usage


You may want to provide a screen to show the Simply Postcode account status, in your software, or for you customer.  We provide this functionality on our web server, this can be access from the link on the e-mail first sent to you when opening an account or from the [Licenses Status and Usage] link on the first page of your on line account.

It is advisable to bookmark this page, for easy access.

It shows you:

  • Graph of Postcode Lookup usage
  • PAF licenses, with Postcode Lookup credit count or number of users
  • Date predicted to expire, if credit based license
  • Simple links allow you to top up your account or add extra users *
  • Shows if you have an outstanding invoice with us *

 

* = not if a resellers customer, on direct invoice mode

 

 

  Royal Mail PAF 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     

 

The UK Address data returned by the call is similar to our Postcode XML Web service.  

   Fields of interest:

Name

Description

id Is only used for our internal use

deliverypointsuffix

This code can be added to the postcode to give a unique reference to each Delivery Point (letterbox) in a Postcode.  Although the UDPRN number is a better source of unique ID.

nohouseholds

Number of house holds at this postcode address

smallorg

Y = Small Organisation

mailsortcode

The Royal Mail offer discount if mail is sorted by this code

udprn

is a unique 8 digit code assigned to each addressable property (Delivery Point). 

unique

gives the unique portion of the address record, in the above example "44".  See Notes

spare

Contains "|" separated data  

Property No, Property Name, Street Name

See Notes

 

 

   PAF PostZon Data:

Public UK_IntroductionDate As String
Public UK_OS_grid_east As String
Public UK_OS_grid_north As String
Public UK_county As String
Public UK_district As String
Public UK_ward As String
Public UK_gridstatus As String
Public UK_country As String
Public UK_wardstatus As String
Public UK_NHS_code As String
Public UK_NHS_region As String
Public longitude_WGS84 As String
Public latitude_WGS84 As String
Public UK_os_reference As String 
Public GeoDistanceToHomePostcode As String 

    'Distance from "Home Postcode"

[More information on PostZon Data]

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."   In simple language this means that each user must be identified by a unique computer name.  

So "TestComputer" must be each unique Computer name, this is to ensure any future changes in the Royal Mail License agreement can be complied with.

 

Postcode Lookup Software © ComTek Accounts 2005

Internet Postcode Address Lookup Software

 

PAF Postcode Address Lookup Software for Web Sites

PAF Postcode Address Lookup Software using .NET and SOAP Services

COM Object for PAF Postcode Address Lookup Software

PAF Postcode Address Lookup Software Desktop Application Manual

Nearest Store Location functionality

PAF Postcode Address Lookup using HTTP to request XML data

PAF Postcode Address Lookup Software Troubleshooting

PAF Postcode Address Lookup Software WEB Troubleshooting

Terms and Conditions

Home Page

 
  • Competitive pricing
  • No set-up Charges
  • Over 99.9% Availability
  • Always up to date
  • Free Trial software
  • Free Technical Support
  • No hidden extra charges
  • Instant Access
  • Programming Examples
  • Local or Internet Data
 
Simply Postcode Lookup Software Award