Postcode Evolution – Manual

Contents

Introduction

The Postcode Evolution Service provides full access to the AFD API for all our products. The API is easy to use and quick to implement and returns XML/JSON data, whilst providing full flexibility.

This enables you to rapidly develop using the API with practically any development environment to provide the data that you require. All AFD products provide rapid lookup and search functionality allowing you to implement address management solutions and provide bank data, account, and card validation.

The API is also backed up by our free customer support services. For full developer support, you can visit our website at https://www.afd.co.uk/supportΒ or contact us below:

ContactPhoneEmail
Sales+44 1624 811711postcode@afd.co.uk
Support+44 1624 811712support@afd.co.uk

Installation

  1. Download the AFD Postcode Performance Evolution Service here.
  2. Install Postcode Evolution on your Windows Server.
  3. To register a serial number, use the following URL from your browser: “http://localhost:81/admin.pce?command=register&serial=333333&password=pwd”Β (Replace 333333 and pwd with the serial and password you have been provided).
  4. The software will then automatically download the data for the registered product, this process can take up to 10 minutes.

Getting Started

Using any standard environment, you can simply make GET requests to our service and retrieve JSON or XML.

PCE is capable of integrating with any development platform that can make HTTP requests. We provide tools for some popular development platforms and frameworks, and recommend using these tools for projects built in these environment.

For projects built in other environments, below is a full documentation of the PCE service.

Calling the Postcode Evolution Server

All calls to the Postcode Evolution XML/JSON server follow the same basic structure. The parameters that make up each call to the server can either be specified as parameters in the URL string, separated by ampersands i.e., using GET functionality, or can be sent to the server as a POST.

Note that in the case of Internet applications we strongly recommend that you have calls to the service running server-side with the code inaccessible to end-users to prevent abuse of the service, and in the case of the hosted service to protect your serial number and password.

Building a PCE Request URL

The base URL for PCE requests is SERVER + /afddata.pce?. For example, https://pce.afd.co.uk/afddata.pce? would be our hosted server URL for Common-API requests.

The parameters usually supplied are then as follows:

ParameterDescription
SerialYour assigned serial number
PasswordYour assigned password
UserID

Enables you to identify different users or systems when comparing requests to any logs you may hold

πŸ›ˆ

DataSpecifies the data you are using (see Data Selector below)
TaskSpecifies the task to carry out.
FieldsSpecifies the fields to use (see Field Presets (Section 5))
MaxQuantity

Specifies the maximum number of records to return

πŸ›ˆ

FormatSpecifies the format (XML or JSON)

πŸ›ˆ You should note that regardless of the maximum quantity setting there is a timeout setting (default 30 seconds) and a 128 KB buffer limit for the server to retain server responsiveness and prevent buffer overflows.

AFD’s performance engine doesn’t impose arbitrary field limits on data. This provides maximum compatibility and flexibility with future changes. We recommend where possible, customer applications do not set small fixed length limits for fields and use variable length fields where possible. For example in the past the Office of National Statistics provided a number of fields that were limited to between 3-5 characters. They then standardised on 9 characters which meant applications had to be updated to accommodate that, having a variable length field in the first place would have avoided that issue.

However, we appreciate some development environments and database systems may require fixed length fields and in such cases our Support team can assist you in setting appropriate lengths. These can be set to accommodate the maximum possible values currently in use and add headroom for future expansion where likely.

Example PCE Request

URL partValueDescription
Service URLhttps://pce.afd.co.ukThis is our hosted service. (Local installed is available)
DataaddressSee the data selector below for other options
Country ISOGBROther countries are available.
Taskfast findThe task endpoint is the action being carried out (see Address Products (Section 6)) for all supported tasks
FieldslistSee Field Presets (Section 5)
Serial333333Supplied by AFD
PasswordpwdSupplied by AFD
QuerystringlookupThis is the last part where you can choose to have lookup or a search
FormatJSON or XMLThis can be either JSON or XML

Taking each part above, the following is the complete URL to send to the service:

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&CountryISO=GBR&task=fastfind&fields=list&serial=333333&password=pwd&lookup=B6%204AA&format=json

This would then show as:

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B6 4AA",
      PostcodeFrom: "",
      List: "B6 4AA Royal Mail, Birmingham Mail Centre, St Stephens Street, BIRMINGHAM",
      Key: "3388990",
      CountryISO: "GBR"
    }
  ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?data=address&CountryISO=GBR&task=fastfind&fields=list&serial=333333&password=pwd&lookup=B6%204AA&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B6 4AA</Postcode>
    <PostcodeFrom/>
    <List>B6 4AA Royal Mail, Birmingham Mail Centre, St. Stephens Street, BIRMINGHAM</List>
    <Key>338899</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Data Selector

The below table shows which AFD product maps to which data selector in the API.
For example, if using the Postcode Plus product, then address data should be specified in the call with GBR as the country ISO.

Product Data CountryISO Description
Postcode / Plotter address GBR UK thoroughfare (see Section 6) (street) level address data

πŸ›ˆ

Postcode Plus address GBR UK address level data with postcode level grids

πŸ›ˆ

Eircode Validation address IRL Irish address data

πŸ›ˆ

ZipAddress address USA USA address data

πŸ›ˆ

WorldAddress address See List Rest of world not including GBR, USA and IRL

πŸ›ˆ

Names & Numbers address GBR UK address level data with postcode level grids, business data and electoral roll information
BankFinder bank GBR,IRL or ALL BACS (GBR) and IPSO (IRL) data and validation
Email email GBR Provides access to Email validations (see Section 13)
Phone phone ALL Provides access to Phone validations (see Section 12)
Refiner refiner GBR Provides access to Refiner (see Section 10)
Nearest nearest GBR Provides access to Nearest (see Section 11)
Grid grid GBR Provides access to Grid (see Section 8)
List list GBR Provides access to Utilities (see Section 7)

If you do not know which data is accessible to you, please use the following ListProducts Task URL: https://pce.afd.co.uk/afddata.pce?data=list&task=listproducts&serial=333333&password=pwd&format=json
Data in AFD Postcode Plus is sourced from the Royal Mail.
It is important to note that the standards regarding what is an acceptable address vary widely from country to country as do the levels of data that are available. So you must accommodate for different levels of data coming back and therefore different amounts of manual entry which may be required by users of your software to provide a complete address.

Field Presets

Some products or tasks support different field presets as output. A preset is selected by including &fields= followed by the name of the preset in the query string to specify which fields should be returned.

Fields Preset Valid for Data Selectors Description
List Address (see Section 6), Bank (see Section 9), Nearest (see Section 11) Only the bare essential fields to allow the user to select the desired result from a list box. This includes the list item and key and for Address fields also includes the Postcode and PostcodeFrom parameters to allow changed postcodes to be detected.
Standard (All) Returns all applicable fields for the data type, including a fully formatted address, as would be used on an address label, where applicable.
Raw Address (see Section 6), Bank (see Section 9) Returns all applicable fields for the data type, but the address is included in the raw PAF format, for example house number, dependant thoroughfare and thoroughfare are returned as individual fields rather than a single Street field.
BS7666 Address (see Section 6) Returns all applicable fields for the data type, but the address is included in a BS7666 compliant format which is useful if you require to store addresses in this form.
USA Address (see Section 6) Returns fields in the format used in the USA, most useful when used with ZipAddress for looking up US addresses. However, this format will also work with UK addresses just as the UK formats will work with US addresses.
Simple Address (see Section 6) Returns only the standard UK name and address, list and key fields when you require address data only and wish to minimise the amount of data returned.
International Address (see Section 6) Recommended for international addresses, but also useable with UK addresses. This returns formatted address lines which provide the address in a format ready for printing on an envelope or address label, as well as component address fields.
Account Bank (see Section 9) Contains applicable fields for Account Number validation.
Card Bank (see Section 9) Contains applicable fields for Card Number validation.
GeoList Address (see Section 6) Only returns fields specifically for the task fastfindgeo, along with any special data sets.
Fflist Address (see Section 5) Can be used as a substitute for List, where the postcode is required at the end of the list box
Custom * Address (see Section 6), Bank (see Section 9), Nearest (see Section 11), Refiner (see Section 10) You can return any of the available fields once specified.

* You can specify any of our Available Fields (see Section 6.1) to be returned with an @, for example &fields=address1@address2@address3

Address Products

PostcodePlus, Postcode, Plotter, Names & Numbers, Eircode Validation, Zip Address, World Address

This section describes the Addressing group of product tasks for retrieving address information for a wider range of countries. The &CountryISO parameter coupled with your AFD license determines which product you access.

When integrating with Address Management products the same code will work with any of our Address Management products (AFD Postcode, AFD Plotter, AFD Postcode Plus, AFD Names & Numbers, AFD Zip Address, Eircode Validation, and AFD World Address).

Available Fields

The fields within the Item block will be dependent on the task carried out.
Result is numeric and either indicates an error (value less than 0) or success (value > 0).
ErrorText contains a description of the error which occurred if the value for Result is less than 0.

The results are contained in Item nodes (there will be one or more nodes if the operation was successful). Email, Phone and Bank validation will only ever return 1 item node.

● = Fields returned by this product and fully searchable.
⚬ = Fields returned by this product, but not searchable.

πŸ›ˆ Please note that the Field Lengths are only guidelines and are not limits.

The following shows addressing fields:

FieldnameField LengthData TypePostcodePostcode PlusNames & NumbersZip
Address
World
Address
Eircode Validation

Postcode πŸ›ˆ

10Text●●●●●●

PostcodeFrom πŸ›ˆ

10Textβš¬β—β—Β Β β—

List πŸ›ˆ

512Text⚬⚬⚬⚬⚬⚬

Key πŸ›ˆ

8Numeric●●●●●●

CountryISO πŸ›ˆ

3Text●●●●●●

Organisation πŸ›ˆ

120Text ●●●●●

Property πŸ›ˆ

120Text ●●●●●

Street πŸ›ˆ

120Text●●●●●●

Locality πŸ›ˆ

70Text●●●●●●

Town πŸ›ˆ

30Text●●●●●●

DPS (Delivery Point Suffix) πŸ›ˆ

3TextΒ βš¬β—Β Β Β 

UDPRN (Unique Delivery Point Reference Number) πŸ›ˆ

8Numeric ●●  ●

JustBuilt πŸ›ˆ

10Numeric ●●   

Phone πŸ›ˆ

20Text●●●   

PostalCounty πŸ›ˆ

30Text ●●●●●

Abbreviated
PostalCounty πŸ›ˆ

30Text ●●●●●

OptionalCounty πŸ›ˆ

30Text●●●●●●

Abbreviated
OptionalCounty πŸ›ˆ

30Text●●●●●●

Traditional
County πŸ›ˆ

30Textβ—βš¬β—β—β—β—

Administrative
County πŸ›ˆ

30Textβ—βš¬β—β—β—β—

NHSCode (National Health Service Code) πŸ›ˆ

6TextΒ βš¬β—Β Β Β 

NHSName (National Health Service Name) πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

NHSRegion
Code (National Health Service Region Code) πŸ›ˆ

3TextΒ βš¬β—Β Β Β 

NHSRegion
Name (National Health Service Region Name) πŸ›ˆ

20TextΒ βš¬β—Β Β Β 

PCTCode (Primary Care Trust Code) πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

PCTName (Primary Care Trust Name) πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

WardCode πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

WardName πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

Constituency
Code πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

Constituency πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

AuthorityCode πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

Authority πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

LEACode (Local Education Authority Code) πŸ›ˆ

3TextΒ βš¬β—Β Β Β 

LEAName (Local Education Authority Name) πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

TVRegion πŸ›ˆ

30TextΒ βš¬β—Β Β Β 

MailsortCode πŸ›ˆ

5Numericβš¬βš¬β—Β Β Β 

SubCountry
Name πŸ›ˆ

20TextΒ βš¬β—Β Β Β 

Devolved
Constituency
Code πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

Devolved
Constituency
Name πŸ›ˆ

50TextΒ βš¬β—Β Β Β 

SOALower (Super Output Area Lower) πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

SOAMiddle (Super Output Area Middle) πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

UrbanRural
Code πŸ›ˆ

2TextΒ βš¬β—Β Β Β 

UrbanRural
Name πŸ›ˆ

60TextΒ βš¬β—Β Β Β 

EERCode (European Electoral Region Code) πŸ›ˆ

9TextΒ βš¬β—Β Β Β 

EERName (European Electoral Region Name) πŸ›ˆ

40TextΒ βš¬β—Β Β Β 

GridE (Grid East) * πŸ›ˆ

10Numericβš¬β—β—Β β—β—

GridN (Grid North) * πŸ›ˆ

10Numericβš¬β—β—Β β—β—

GBGridE (Great Britain Grid East) ** πŸ›ˆ

10Numericβš¬β—β—Β βš¬βš¬

GBGridN (Great Britain Grid North) ** πŸ›ˆ

10Numericβš¬β—β—Β βš¬βš¬

NIGridE (Northern Ireland Grid East) ** πŸ›ˆ

10Numericβš¬β—β—Β β—β—

NIGridN (Northern Ireland Grid North) ** πŸ›ˆ

10Numericβš¬β—β—Β β—β—

Miles πŸ›ˆ

6Numeric ●●   

Km πŸ›ˆ

6Numeric ●●   

Latitude * πŸ›ˆ

10Numericβš¬βš¬β—Β β—β—

Longitude * πŸ›ˆ

10Numericβš¬βš¬β—Β β—β—

PostcodeType πŸ›ˆ

6Textβš¬βš¬β—Β Β Β 

CensationCode πŸ›ˆ

10Textβš¬βš¬β—Β Β Β 

CensationLabel πŸ›ˆ

24Textβš¬βš¬β—Β Β Β 

Affluence πŸ›ˆ

30Textβš¬βš¬β—Β Β Β 

Lifestage πŸ›ˆ

100Textβš¬βš¬β—Β Β Β 

Additional
CensusInfo πŸ›ˆ

200Textβš¬βš¬β—Β Β Β 

AddressType πŸ›ˆ

6Numericβš¬βš¬β—Β Β Β 

AddressType
Description πŸ›ˆ

55Text⚬⚬⚬   

Occupancy πŸ›ˆ

6Numericβš¬βš¬β—Β Β Β 

Occupancy
Description πŸ›ˆ

30Text⚬⚬⚬   

Name πŸ›ˆ

120Text  ⚬   

Residency πŸ›ˆ

6Numeric  ●   

Household
Composition πŸ›ˆ

106Text  ●   

Business πŸ›ˆ

100Text  ●   

Size πŸ›ˆ

6Text  ●   

SICCode (Standard Industry Classification Code) πŸ›ˆ

10Numeric  ●   

LocationType πŸ›ˆ

6Text  ●   

BranchCount πŸ›ˆ

6Numeric  ●   

GroupID πŸ›ˆ

6Numeric  ●   

Modelled
Turnover πŸ›ˆ

15Numeric  ●   

NationalSize πŸ›ˆ

6Text  ●   

OnEditedRoll πŸ›ˆ

6Text  ●   

Gender πŸ›ˆ

6Text  ●   

Forename πŸ›ˆ

30Text  ●   

MiddleInitial πŸ›ˆ

6Text  ●   

Surname πŸ›ˆ

30Text  ●   

DateOfBirth πŸ›ˆ

10Numeric  ●   

Product πŸ›ˆ

40Text●●●● ●

Country πŸ›ˆ

30Text●●●●●●

UPRN (Unique Postal Reference Number) ** πŸ›ˆ

12Numeric ●    

NUTS3Code (Nomenclature of Territorial Units for Statistics 3 Code) ** πŸ›ˆ

5Text ●    

NUTS3Name (Nomenclature of Territorial Units for Statistics 3 Name) ** πŸ›ˆ

50 †Text ●    

Council
TaxBand ** πŸ›ˆ

6 †Text  ●   

GridLevel ** πŸ›ˆ

1Numeric ●    

POLAR3Young ** πŸ›ˆ

8 †Numeric ●    

POLAR3Adult ** πŸ›ˆ

8 †Numeric ●    

POLAR4 ** πŸ›ˆ

8 †Numeric ●    

Deprivation
Rank ** πŸ›ˆ

8 †Numeric ●    

Deprivation
Decile ** πŸ›ˆ

1Numeric ●    

LEPCode (Local Enterprise Parnership Code) ** πŸ›ˆ

9Text ●    

LEPName (Local Enterprise Parnership Name) ** πŸ›ˆ

50 †Text ●    

LEPCode2 (Local Enterprise Parnership Code 2) ** πŸ›ˆ

9Text ●    

LEPName2 (Local Enterprise Parnership Name 2) ** πŸ›ˆ

50 †Text ●    

AEBArea (Adult Education Budget Area) ** πŸ›ˆ

50 †Text ●    

AEBSource (Adult Education Budget Source) ** πŸ›ˆ

3Numeric ●    

AEB
EffectiveFrom (Adult Education Budget Effective From) ** πŸ›ˆ

10Text ●    

AEB
EffectiveTo (Adult Education Budget Effective To) ** πŸ›ˆ

10Text ●    

Multiple
Residency
Indicator ** πŸ›ˆ

1Text ●    

NotYetBuilt ** πŸ›ˆ

1Text ●    

Abase (AddressBase) ** πŸ›ˆ

1Text ●    

DXNumber ** πŸ›ˆ

10Text ●●   

DXExchange ** πŸ›ˆ

30Text ●●   

DXOrganisation ** πŸ›ˆ

120Text ●●   

DXProfession ** πŸ›ˆ

30Text ●●   

Outcode πŸ›ˆ

4Text⚬⚬⚬   

Incode πŸ›ˆ

3Text⚬⚬⚬   

* GridE/GridN and Latitude/Longitude not included in Postcode (requires at least Plotter). (Optional: International Grids)
** This is an optional data field and requires a license to return
† No fixed length, so safety margin is used

Raw PAF Fields (Formatted closer to how they appear on Raw PAF, useful if your database stores fields this way)

FieldnameField LengthData TypePostcodePostcode PlusNames & NumbersZip
Address
World
Address
Eircode Validation

Organisation
Name πŸ›ˆ

60Text●●●●●●

Department
Name πŸ›ˆ

60Textβ—βš¬β—β—β—β—

SubBuilding πŸ›ˆ

60Text●●●●●●

Building πŸ›ˆ

60Text●●●●●●

Number πŸ›ˆ

10Numeric●●●●●●

Dependant
Thoroughfare πŸ›ˆ

60Text●●●●●●

Thoroughfare πŸ›ˆ

60Text●●●●●●

Double
Dependant
Locality πŸ›ˆ

35Text●●●●●●

Dependant
Locality πŸ›ˆ

35Text●●●●●●

Town πŸ›ˆ

30Text●●●●●●

Postcode πŸ›ˆ

10Text●●●●●●

BS7666 Fields (Fields to help provide addresses which conform to BS 7666-5:2006)

FieldnameField LengthData TypePostcodePostcode PlusNames & NumbersZip
Address
World
Address
Eircode Validation

Identifier πŸ›ˆ

8Numeric ●●  ●

BuildDate πŸ›ˆ

10Text ⚬⚬⚬⚬⚬

Administrator πŸ›ˆ

20Text ⚬⚬⚬⚬⚬

Language πŸ›ˆ

5Text ⚬⚬⚬⚬⚬

Department πŸ›ˆ

60Text ●●  ●

Organization πŸ›ˆ

60Text ●●● ●

SubUnit πŸ›ˆ

60Text ●●  ●

BuildingName πŸ›ˆ

60Text ●●● ●

BuildingNumber πŸ›ˆ

10Numeric ●●● ●

SubStreet πŸ›ˆ

60Text ●●  ●

DeliveryStreet πŸ›ˆ

60Text●●●●●●

SubLocality πŸ›ˆ

60Text●●●  ●

DeliveryLocality πŸ›ˆ

60Text●●●●●●

DeliveryTown πŸ›ˆ

30Text●●●●●●

Code πŸ›ˆ

10Text●●●●●●

USA Address Fields

FieldnameField LengthData TypePostcodePostcode PlusNames & NumbersZip
Address
World
Address
Eircode Validation

ZipCode πŸ›ˆ

20Text●●●●●●

Key πŸ›ˆ

8Numeric●●●●●●

List πŸ›ˆ

512Text⚬⚬⚬⚬⚬⚬

CountryISO πŸ›ˆ

3Text●●●●●●

Recipient πŸ›ˆ

120Text ●●●●●

Secondary πŸ›ˆ

120Text ●●●●●

Primary πŸ›ˆ

120Text●●●●●●

Urbanization πŸ›ˆ

60Text●●●●●●

City πŸ›ˆ

30Text●●●●●●

State πŸ›ˆ

30Text●●●●●●

RecordType πŸ›ˆ

30Text     ⚬

CarrierRouteID πŸ›ˆ

4Text     ⚬

LACSStatus πŸ›ˆ

2Text     ⚬

FinanceNumber πŸ›ˆ

7Numeric     ⚬

Congressional
District πŸ›ˆ

3Numeric     ⚬

CountyNumber πŸ›ˆ

4Numeric     ⚬

CountyName πŸ›ˆ

26Text     ⚬

City
Abbreviation πŸ›ˆ

14Text     ⚬

Product πŸ›ˆ

40Text●●●● ●

Country πŸ›ˆ

30Text●●●●●●

International Address Fields These are additional fields supplied with the standard field list

FieldnameField LengthData TypePostcodePostcode PlusNames & NumbersZip
Address
World
Address
Eircode Validation

Address1…7 πŸ›ˆ

120Text●●●●●●

Principality πŸ›ˆ

60Text●●●  ●

Region πŸ›ˆ

60Text●●●  ●

Cedex πŸ›ˆ

60Text●●●  ●

Country πŸ›ˆ

30Text ●●●●●

CountryISO πŸ›ˆ

3Text ●●●●●

Alias Localities (Non-postally required Localities)

FieldnameField LengthData TypePostcodePostcode PlusNames & NumbersZip
Address
World
Address
Eircode Validation

AliasLocalities πŸ›ˆ

4Text ⚬⚬   

CountryISO πŸ›ˆ

35Text ⚬⚬   

Result Codes

The below table describes the possible result codes and error messages:

ResultDescription
1Success
-1Invalid Field spec
-2No Results Found
-4Error Loading Data Files
-7Data License Error

For the correct data option to use, please see the Data Selector section (see Section 4).

Lookup Tasks

Lookup Tasks are a group of different calls that each accepts only one search parameter, specified using a Lookup string.

FastFindV4

FastFindV4 optimises the Fast Find task for TypeAhead situations.

It is necessary to specify a &uniqueID that should remain the same for a single search. This allows our billing system to make sure that each keypress is not being charged separately. We also recommend setting the &maxquantity to a number between 5 and 7 as this will increase the responsiveness of your TypeAhead control.

DescriptionExample
UK PostcodeB11
House No. and Postcode276,B111AA
OrganisationRoyal Mail

πŸ›ˆ This task allows a single text string containing search terms to be entered and is used to provide typeahead functionality (“search as you type”).
πŸ›ˆ We also recommend setting the &maxquantity to a number between 5 and 7 as this will increase the responsiveness of your TypeAhead control.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&CountryISO=GBR&task=fastfindv4&fields=list&format=json&lookup=ROYAL&maxquantity=1

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "AB10 1BD",
      PostcodeFrom: "",
      List: "AB10 1BD    The Royal British Legion, 46a Union Street, ABERDEEN",
      Key: "105",
      CountryISO: "GBR"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&CountryISO=GBR&task=fastfindv4&fields=list&format=xml&lookup=ROYAL&maxquantity=1

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>AB10 1BD</Postcode>
    <PostcodeFrom/>
    <List>AB10 1BD The Royal British Legion, 46a Union Street, ABERDEEN</List>
    <Key>105</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Fast Find

To lookup matching addresses quickly from search criteria such as Commercial Street, Birmingham.

The Fast Find task accepts a single string as input, and if successful returns one or more records. The input can be a postcode, or an address element, or a combination of these separated by a comma.

DescriptionExample
UDPRN00338899
Organisation and TownRoyal Mail, Birmingham
Street and TownCommercial Street, Birmingham
Organisation and PostcodeRoyal Mail, B6 4AA

πŸ›ˆ This task is highly flexible as it allows a single text string containing search terms to be entered.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=fastfind&fields=list&format=json&lookup=Royal%20Mail,B6%204AA&maxquantity=5

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B6 4AA",
      PostcodeFrom: "",
      List: "B6 4AA      Royal Mail, Birmingham Mail Centre, St. Stephens Street, BIRMINGHAM",
      Key: "338899",
      CountryISO: "GBR"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=fastfind&fields=list&format=xml&lookup=Royal%20Mail,B6%204AA&maxquantity=5

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B6 4AA</Postcode>
    <PostcodeFrom/>
    <List>B6 4AA Royal Mail, Birmingham Mail Centre, St. Stephens Street, BIRMINGHAM</List>
    <Key>338899</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Lookup

To lookup matching addresses quickly from a postcode, e.g., B11 1AA. Only a full postcode without any property information included will yield results.

By entering a single string, the user can find the results matching their lookup criteria.

  • This task should be used when the full postcode is always known.
  • It will only accept a full postcode.
  • Including a space in the postcode is optional.
  • It can return one or more results (including multiple streets when a postcode is on a multiple locality record).
DescriptionExample
UK PostcodeB6 4AA

πŸ›ˆ This task should be used if you only ever intend to send a postcode as input, as it will not attempt to search for invalid input.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=Lookup&fields=list&format=json&lookup=B6%204AA

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B6 4AA",
      PostcodeFrom: "",
      List: "B6 4AA      Royal Mail, Birmingham Mail Centre, St. Stephens Street, BIRMINGHAM",
      Key: "338899",
      CountryISO: "GBR"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=Lookup&fields=list&format=xml&lookup=B6%204AA

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B6 4AA</Postcode>
    <PostcodeFrom/>
    <List>B6 4AA Royal Mail, Birmingham Mail Centre, St. Stephens Street, BIRMINGHAM</List>
    <Key>338899</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Property Lookup

To lookup matching addresses quickly from a postcode, which may optionally include property information to find a match, e.g., 276, B11 1AA.

  • The Property Lookup task can accept either a postcode or a postcode and property name or number.
  • It can return one or more results.
DescriptionExample
House No. and Postcode276,B111AA
Property and PostcodeFlat 2,B11 1AA

πŸ›ˆ This task is useful if using input that always includes a full postcode but may also include a property or street number.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=PropertyLookup&fields=list&format=json&lookup=280,B11%201AA

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B11 1AA",
      PostcodeFrom: "",
      List: "B11 1AA     280 Stratford Road, Sparkhill, BIRMINGHAM",
      Key: "379670",
      CountryISO: "GBR"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=PropertyLookup&fields=list&format=xml&lookup=280,B11%201AA

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B11 1AA</Postcode>
    <PostcodeFrom/>
    <List>B11 1AA 280 Stratford Road, Sparkhill, BIRMINGHAM</List>
    <Key>379670</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

The search function allows records to be located by searching using specific fields rather than a general lookup string. Any Available Fields (see Section 6.1) are supported as the input, and if successful it returns one or more records.

For the correct data option to use, please see the Data Selector section (see Section 4).

DescriptionsExample
Searchable Field&Street=280%20Stratford%20Road&Town=Birmingham

πŸ›ˆ This task should be used if the input fields conform to a rigid mapping.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=search&fields=list&format=json&Street=280%20Stratford%20Road&Town=Birmingham

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B11 1AA",
      PostcodeFrom: "",
      List: "B11 1AA     280 Stratford Road, Sparkhill, BIRMINGHAM",
      Key: "379670",
      CountryISO: "GBR"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=search&fields=list&format=xml&Street=280%20Stratford%20Road&Town=Birmingham

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B11 1AA</Postcode>
    <PostcodeFrom/>
    <List>B11 1AA 280 Stratford Road, Sparkhill, BIRMINGHAM</List>
    <Key>379670</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Retrieve

πŸ›ˆ Only one item will ever be returned from a Retrieve Task as you are requesting a single item, by its key, which was earlier returned in a list.

To retrieve the record selected, you should use the key Field which will have been returned with each result.

For the correct data option to use, please see the Data Selector section (see Section 4).

DescriptionExample
Key379670

πŸ›ˆ This task should be used with the specified key to retrieve the address.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=retrieve&fields=list&format=json&key=379670

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B11 1AA",
      PostcodeFrom: "",
      List: "B11 1AA     280 Stratford Road, Sparkhill, BIRMINGHAM",
      Key: "379670",
      CountryISO: "GBR"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&CountryISO=GBR&task=retrieve&fields=list&format=xml&key=379670

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B11 1AA</Postcode>
    <PostcodeFrom/>
    <List>B11 1AA 280 Stratford Road, Sparkhill, BIRMINGHAM</List>
    <Key>379670</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Geolocation

This functionality is available with an optional high-resolution license which will return the nearby addresses in the correct order.

FastFindGeo

This works in the same way as FastFindV4 (see Section 6.2); however, uses a special field preset of geolist to return location data.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&CountryISO=GBR&task=fastfindgeo&fields=geolist&lookup=280%20Stratford%20Road,Birmingham&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B11 1AA",
      PostcodeFrom: "",
      List: "280 Stratford Road, Sparkhill, BIRMINGHAM, B11 1AA",
      Key: "379670",
      CountryISO: "GBR",
      GridE: "408834",
      GridN: "284629",
      Latitude: "52.4596",
      Longitude: "-1.8714"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&CountryISO=GBR&task=fastfindgeo&fields=geolist&lookup=280%20Stratford%20Road,Birmingham&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B11 1AA</Postcode>
    <PostcodeFrom/>
    <List>280 Stratford Road, Sparkhill, BIRMINGHAM, B11 1AA</List>
    <Key>379670</Key>
    <CountryISO>GBR</CountryISO>
    <GridE>408834</GridE>
    <GridN>284629</GridN>
    <Latitude>52.4596</Latitude>
    <Longitude>-1.8714</Longitude>
  </Item>
</AFDPostcodeEverywhere>
				
			

Nearest

This accepts Latitude/Longitude coordinates as input and returns nearby addresses to the supplied location. This feature is most useful on mobile devices, such as mobile phones or other devices equipped with GPS.

JSON Format

http://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&fields=list&CountryISO=GBR&task=nearest&maxquantity=5&longitude=-1.6787&latitude=53.8507&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "LS19 6ET",
      PostcodeFrom: "",
      List: "LS19 6ET    Welbeck House, Over Lane, Rawdon, LEEDS",
      Key: "14057846",
      CountryISO: "GBR"
    }
				
			

XML Format

http://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&fields=list&CountryISO=GBR&task=nearest&maxquantity=5&longitude=-1.6787&latitude=53.8507&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>LS19 6ET</Postcode>
    <PostcodeFrom/>
    <List>LS19 6ET Welbeck House, Over Lane, Rawdon, LEEDS</List>
    <Key>14057846</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>
				
			

Additional Parameters

These are parameters that you can specify for additional functionality. The detail below outlines the parameter function and the default value if the parameter is not specified.

&noAlias – the service returns alias localities as default.

OptionDescription
0Returns Alias Localities
1Returns no Alias Localities

&skip – the service does not skip any results as default.

Field ValueDescription
None (or blank)Returns all records matching the lookup or search criteria specified.
AddressOnly the first record per address (e.g. first listed resident) is returned. Only has any effect in Names & Numbers.
PostcodeOnly the first record per postcode is returned.
SectorOnly the first record in each postcode sector is returned. (A postcode sector is the portion of the postcode before the space plus the first digit after it, e.g. B11 1 is a sector).
OutcodeOnly the first record per Outcode is returned. The Outcode is the portion of the postcode before the space, e.g. B11.
TownOnly the first record per Post Town, e.g. Birmingham is returned.
AreaOnly the first record per Postcode Area is returned. A Postcode Area is the letters at the start of the postcode, e.g. B11 1AA is in Postcode Area B, IM8 is in Postcode Area IM.

&NoSort – this sort option is for Names & Numbers only.

OptionDescription
0Returns in number sorted order
1Returns sorted by DPS

&ApproxGrids – works with Address Management Products Containing Grid References only.

OptionDescription
0No approximations
1Returns an approximate grid reference for the postal town or locality of a postcode where no postcode level grid reference exists in the data.

&Postzon

OptionDescription
0Standard Grids returned
1Return Royal Mail Postzon grid references in preference to DataTalk GeoRef grids.

&crownISO – this option is for Postcode Plus only.

OptionDescription
0Default Country ISO returned for Crown Dependencies (GBR)
1Crown Dependancy ISO returned (IMN,JSY,GGY)

DX Data

πŸ›ˆ DX is available in our Postcode Plus and Names & Numbers product

DX enables you to look up and search for DX addresses just as you can do with Royal Mail postal addresses. Uniquely, the API also allows you to easily identify DX addresses associated with a PAF address to route your mail through a DX member’s box wherever possible resulting in savings over Royal Mail.

Postcode Evolution will automatically return a DXNumber and DXExchange field in the XML if you have the DX data enabled.

When results are returned following any lookup or search if the address is also a DX Member the DXNumber, DXExchange, and DXProfession fields will also be returned to indicate this. You can format a DX address as follows for printing:

LabelAddress
OrganisationGateley LLP
DXNumberDX 14317
DXExchangeMANCHESTER

International Data

World address works the same as all our address products. The only difference in normal operation is the need to specify the Country or CountryISO code (as parameters in the GET request) of the country that you wish to use in all lookup, search and record retrieval operations.

Making use of the data returned

If you have opted to use Standard, Raw PAF, or BS7666 fields the data will be returned in the same fields as those for the UK (including the county in some cases) which you can use to store the data in your database in the same format as you do for UK addresses.

However, when it comes to generating an address label, you should note that the formatting rules for addresses vary from country to country (for example in many Western European countries the post/zip code comes before the town on the same line). Unless you have your own printing or formatting routines for the country in question, you may therefore actually prefer to use our International address format which provides both the consistent address fields (broadly the same as Raw PAF fields but also adding the Principality, Region, and Cedex which is relevant to some international addresses) as well as address label formatted fields (address1 through to address7). This enables you to both have a structure ideal for data storage and for label formatting.

If you need to store addresses in a more UK based format, but then need to format them for printing you can easily do so by carrying out a search operation specifying the address data with the International field type to obtain the address for printing at the time that you wish to generate an address label.

Utilities

List

List Countries

You can populate a drop-down list of countries in your application for the user to choose from. If you wish to have a complete list you can do so programmatically by calling the Country List function.

  • Use this Task to list the Alpha-3 Country ISO Codes.
  • Any license will show these CountryISO’s.
JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCountries&fields=list&serial=333333&password=pwd&CountryISO=FRA&format=json

				
					{
	Result: "1",
	ErrorText: "",
	Item: [
		{
			@value: "1",
			iso: "AFG",
			name: "Afghanistan"
		},
		{
			@value: "2",
			iso: "ALA",
			name: "Aland Islands"
		},
		{
			@value: "3",
			iso: "ALB",
			name: "Albania"
		}
	]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCountries&fields=list&serial=333333&password=pwd&CountryISO=FRA&format=xml

				
					<AFDPostcodeEverywhere>
	<Result>1</Result>
	<ErrorText/>
	<Item value="1">
		<iso>AFG</iso>
		<name>Afghanistan</name>
	</Item>
	<Item value="2">
		<iso>ALA</iso>
		<name>Aland Islands</name>
	</Item>
	<Item value="3">
		<iso>ALB</iso>
		<name>Albania</name>
	</Item>
</AFDPostcodeEverywhere>
				
			

List Country

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCountry&fields=list&serial=333333&password=pwd&CountryISO=FRA&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
		{
			@value: "1",
			List: "Afghanistan"
		},
		{
			@value: "2",
			List: "Aland Islands"
		},
		{
			@value: "3",
			List: "Albania"
		}
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCountry&fields=list&serial=333333&password=pwd&CountryISO=FRA&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>Afghanistan</List>
    </Item>
    <Item value="2">
        <List>Aland Islands</List>
    </Item>
    <Item value="3">
        <List>Albania</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List CountryISO

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCountryISO&fields=list&serial=333333&password=pwd&CountryISO=FRA&format=json

				
					{
	Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "AFG"
        },
        {
            @value: "2",
            List: "ALA"
        },
        {
            @value: "3",
            List: "ALB"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCountryISO&fields=list&serial=333333&password=pwd&CountryISO=FRA&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>AFG</List>
    </Item>
    <Item value="2">
        <List>ALA</List>
    </Item>
    <Item value="3">
        <List>ALB</List>
    </Item>
<AFDPostcodeEverywhere>
				
			

List Address

List Organisation

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListOrganisation&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Royal%20Parks&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "ROYAL PARKS"
        },
        {
            @value: "2",
            List: "ROYAL PARKS AGENCY"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListOrganisation&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Royal%20Parks&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>ROYAL PARKS</List>
    </Item>
    <Item value="2">
        <List>ROYAL PARKS AGENCY</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Property

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListProperty&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Stratford%20park&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "STRATFORD PARK"
        },
        {
            @value: "2",
            List: "STRATFORD PARK LEISURE CENTRE"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListProperty&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Stratford%20park&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>STRATFORD PARK</List>
    </Item>
    <Item value="2">
        <List>STRATFORD PARK LEISURE CENTRE</List>
    </Item>
</AFDPostcodeEverywhere>
				
			
JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListStreet&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Stratford%20park&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "STRATFIELD PARK"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListStreet&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Stratford%20park&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>STRATFORD PARK</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Locality

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLocality&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Lee%20bank&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "LEE BANK"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLocality&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Lee%20bank&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>LEE BANK</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Town

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListTown&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Birmingham&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "BIRMINGHAM"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListTown&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Birmingham&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>BIRMINGHAM</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List County

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCounty&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Westminster&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "WESTMINSTER"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCounty&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Westminster&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>WESTMINSTER</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Mailsort Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListMailsortCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=34439&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "34439"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListMailsortCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=34439&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>34439</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Names

This function requires a Names & Numbers license.

List Forename

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListForename&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Joe&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "JOE"
        },
        {
            @value: "2",
            List: "JOE A"
        },
        {
            @value: "3",
            List: "JOE DAVID"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListForename&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Joe&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>JOE</List>
    </Item>
    <Item value="2">
        <List>JOE A</List>
    </Item>
    <Item value="3">
        <List>JOE DAVID</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Surname

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListSurname&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Bloggs&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "BLOGGS"
        },
        {
            @value: "2",
            List: "BLOGGSY"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListSurname&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Bloggs&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>BLOGGS</List>
    </Item>
    <Item value="2">
        <List>BLOGGSY</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Council Tax Band

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCouncilTaxBand&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=A&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "A"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCouncilTaxBand&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=A&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>A</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Censation

The Censation fields provide coding and descriptors based on Census information. The following List tasks will return all possible values returned within the Censation fields.

Censation classifies each postcode into one of 52 ‘segments’ each with its own 4 character Censation segment code.

The first letter indicates how rich or poor people living in a postcode are likely to be. Are your customers wealthy, prosperous, comfortable, striving or struggling?

The second letter in a Censation code indicates the life-stage of your customers. Young singles, young families, older families, families with children who have left home (empty nesters), or seniors.

The last two digits of a Censation code highlight distinctive characteristics drawn from the underlying Census, Residential or Commercial data or from research, residential, and transaction data. A short additional description is put in descending order with the strongest or most likely attribute first. Finally, a detailed supporting table with over 30 different characteristics is provided.

Further ‘unclassified’ codes are allocated to postcodes for which census data is unavailable. These mainly describe the make-up of commercial areas.

List Censation Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCensationCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=AY0&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "AY04"
        },
        {
            @value: "2",
            List: "AY08"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListCensationCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=AY0&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>AY04</List>
    </Item>
    <Item value="2">
        <List>AY08</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Affluence

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAffluence&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=B&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "B, Prosperous"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAffluence&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=B&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>B, Prosperous</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Lifestage

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLifestage&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=X&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "X, Older families"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLifestage&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=X&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>X, Older families</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Additional Census Info

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAdditionalCensusInfo&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=11&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "11, High incomes, with many Christians, employed in finance and business services"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAdditionalCensusInfo&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=11&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>11, High incomes, with many Christians, employed in finance and business services</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Business

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListBusiness&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Dry&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "DRY CLEANERS"
        },
        {
            @value: "2",
            List: "DRY CLEANING AND LAUNDRY SERVICES"
        },
        {
            @value: "3",
            List: "DRYSTONE WALLING"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListBusiness&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Dry&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>DRY CLEANERS</List>
    </Item>
    <Item value="2">
        <List>DRY CLEANING AND LAUNDRY SERVICES</List>
    </Item>
    <Item value="3">
        <List>DRYSTONE WALLING</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Size

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListSize&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=I&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item": [
        {
            @value: "1",
            List: "I: 501+"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListSize&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=I&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>I: 501+</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List SIC

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListSIC&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=841&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "84110"
        },
        {
            @value: "2",
            List: "84120"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListSIC&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=841&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>84110</List>
    </Item>
    <Item value="2">
        <List>84120</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Geographical

List Urban Rural Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListUrbanRuralCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=A1&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "A1"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListUrbanRuralCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=A1&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>A1</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Urban Rural Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListUrbanRuralName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Urban&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "URBAN CITY AND TOWN"
        },
        {
            @value: "2",
            List: "URBAN MAJOR CONURBATION"
        },
        {
            @value: "3",
            List: "URBAN MINOR CONURBATION"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListUrbanRuralName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Urban&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>URBAN CITY AND TOWN</List>
    </Item>
    <Item value="2">
        <List>URBAN MAJOR CONURBATION</List>
    </Item>
    <Item value="3">
        <List>URBAN MINOR CONURBATION</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List TV Region

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListTVRegion&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Midlands&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "MIDLANDS"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListTVRegion&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Midlands&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>MIDLANDS</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Health

List NHS Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=7A&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "7A1"
        },
        {
            @value: "2",
            List: "7A2"
        },
        {
            @value: "3",
            List: "7A3"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=7A&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>7A1</List>
    </Item>
    <Item value="2">
        <List>7A2</List>
    </Item>
    <Item value="3">
        <List>7A3</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List NHS Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=borders&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "BORDERS"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=borders&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>BORDERS</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List NHS Region Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSRegionCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Y2&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "Y21"
        },
        {
            @value: "2",
            List: "Y22"
        },
        {
            @value: "3",
            List: "Y23"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSRegionCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Y2&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>Y21</List>
    </Item>
    <Item value="2">
        <List>Y22</List>
    </Item>
    <Item value="3">
        <List>Y23</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List NHS Region Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSRegionName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Midlands&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "MIDLANDS AND EASTERN"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListNHSRegionName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Midlands&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>MIDLANDS AND EASTERN</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List CCG Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListPCTCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E3800000&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "E38000004"
        },
        {
            @value: "2",
            List: "E38000006"
        },
        {
            @value: "3",
            List: "E38000007"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListPCTCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E3800000&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>E38000004</List>
    </Item>
    <Item value="2">
        <List>E38000006</List>
    </Item>
    <Item value="3">
        <List>E38000007</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List CCG Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListPCTName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=EAST%20AND%20NORTH&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "EAST AND NORTH HERTFORDSHIRE"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListPCTName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=EAST%20AND%20NORTH&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>EAST AND NORTH HERTFORDSHIRE</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Administrative

List Ward Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListWardCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E0500002&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "E05000026"
        },
        {
            @value: "2",
            List: "E05000027"
        },
        {
            @value: "3",
            List: "E05000028"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListWardCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E0500002&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>E05000026</List>
    </Item>
    <Item value="2">
        <List>E05000027</List>
    </Item>
    <Item value="3">
        <List>E05000028</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Ward Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListWardName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Westhill&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "WESTHILL AND DISTRICT"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListWardName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Westhill&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>WESTHILL AND DISTRICT</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List EER Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListEERCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E15&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "E15000001"
        },
        {
            @value: "2",
            List: "E15000002"
        },
        {
            @value: "3",
            List: "E15000003"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListEERCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E15&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>E15000001</List>
    </Item>
    <Item value="2">
        <List>E15000002</List>
    </Item>
    <Item value="3">
        <List>E15000003</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List EER Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListEERName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=West%20Midlands&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "WEST MIDLANDS"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListEERName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=West%20Midlands&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>WEST MIDLANDS</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Authority Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAuthorityCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E0800000&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "E08000001"
        },
        {
            @value: "2",
            List: "E08000002"
        },
        {
            @value: "3",
            List: "E08000003"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAuthorityCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E0800000&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>E08000001</List>
    </Item>
    <Item value="2">
        <List>E08000002</List>
    </Item>
    <Item value="3">
        <List>E08000003</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Authority

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAuthority&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=birmingham&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "BIRMINGHAM"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAuthority&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=birmingham&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>BIRMINGHAM</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List LEA Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLEACode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=330&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "330"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLEACode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=330&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>330</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List LEA Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLEAName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=birmingham&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "BIRMINGHAM"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListLEAName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=birmingham&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>BIRMINGHAM</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Constituency Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListConstituencyCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E1400053&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "E14000530"
        },
        {
            @value: "2",
            List: "E14000531"
        },
        {
            @value: "3",
            List: "E14000532"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListConstituencyCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=E1400053&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>E14000530</List>
    </Item>
    <Item value="2">
        <List>E14000531</List>
    </Item>
    <Item value="3">
        <List>E14000532</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Constituency Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListConstituency&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Birmingham&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "BIRMINGHAM, EDGBASTON"
        },
        {
            @value: "2",
            List: "BIRMINGHAM, ERDINGTON"
        },
        {
            @value: "3",
            List: "BIRMINGHAM, HALL GREEN"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListConstituency&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Birmingham&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>BIRMINGHAM, EDGBASTON</List>
    </Item>
    <Item value="2">
        <List>BIRMINGHAM, ERDINGTON</List>
    </Item>
    <Item value="3">
        <List>BIRMINGHAM, HALL GREEN</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Devolved Constituency Code

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListDevolvedConstituencyCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=S16&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "S16000074"
        },
        {
            @value: "2",
            List: "S16000075"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListDevolvedConstituencyCode&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=S16&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>S16000074</List>
    </Item>
    <Item value="2">
        <List>S16000075</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Devolved Constituency Name

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListDevolvedConstituencyName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Aberd&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "ABERDEEN CENTRAL"
        },
        {
            @value"2",
            List: "ABERDEEN DONSIDE"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListDevolvedConstituencyName&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=Aberd&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>ABERDEEN CENTRAL</List>
    </Item>
    <Item value="2">
        <List>ABERDEEN DONSIDE</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

List Products

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=listproducts&fields=list&serial=333333&password=pwd&CountryISO=GBR&format=json

				
					{
    Result: 1,
    ErrorText: "",
    AccountDetails: {
        Serial: "333333",
        Status: "Enabled"
    },
    Products: {
        Product: [
            {
                Name: "Postcode Plus",
                Data: "address"
            },
            {
                Name: "BankFinder",
                Data: "bank"
            },
            {
                Name: "Email Validation",
                Data: "email"
            },
            {
                Name: "Phone Validation",
                Data: "phone"
            }
        ]
    }
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=listproducts&fields=list&serial=333333&password=pwd&CountryISO=GBR&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <AccountDetails>
        <Serial>333333</Serial>
        <Status>Enabled</Status>
    </AccountDetails>
    <Products>
        <Product>
            <Name>Postcode Plus</Name>
            <Data>address</Data>
        </Product>
        <Product>
            <Name>BankFinder</Name>
            <Data>bank</Data>
        </Product>
        <Product>
            <Name>Email Validation</Name>
            <Data>email</Data>
        </Product>
        <Product>
            <Name>Phone Validation</Name>
            <Data>phone</Data>
        </Product>
    </Products>
</AFDPostcodeEverywhere>
				
			

List Alias Locality

This Task is a per postcode lookup. This will not supply a list of Alias Localities in the UK.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAliasLocality&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=B13%200AA&format=json

				
					{
    Result: "1",
    ErrorText: "",
    Item: [
        {
            @value: "1",
            List: "Alcester Lane's End"
        },
        {
            @value: "2",
            List: "Billesley Common"
        },
        {
            @value: "3",
            List: "Springfield"
        }
    ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=address&task=ListAliasLocality&fields=list&serial=333333&password=pwd&CountryISO=GBR&lookup=B13%200AA&format=xml

				
					<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <List>Alcester Lane's End</List>
    </Item>
    <Item value="2">
        <List>Billesley Common</List>
    </Item>
    <Item value="3">
        <List>Springfield</List>
    </Item>
</AFDPostcodeEverywhere>
				
			

Grid

This section applies to all UK address products

These functions are used to carry out operations related to grid references and latitude and longitude values. You can convert between GB and Irish based grid references and also convert to and from latitude and longitude values. The facility to convert a value in kilometers to miles and vice-versa, return an approximate grid reference for a location and also calculate the distance between two geographical locations is also included.

To carry out a grid operation you would pass the grid or latitude and longitude to the afddata.pce? URL on the Postcode Evolution server as described above.

Convert and Convert1m

ParametersDescription
&GBGridE, &GBGridN Or
&NIGridE, &NIGridN Or
&Latitude, &Longitude Or
&TextualLatitude, &TextualLongitude And/Or
&Miles/&Km
Converts a GB or NI based grid reference, or latitude and longitude value to all other grid reference types and latitude and longitude values.

The Convert1m function returns grids to a 1m resolution (6-digit), whereas Convert returns 5-digit grids. |

JSON Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=Grid&Task=Convert&Fields=Standard&GBGridE=40660&GBGridN=28650&format=json

				
					{
   Result: "1",
   ErrorText: "",
   Item: [
       {
          @value: "1",
          Lookup: "",
          GBGridE: "40660",
          GBGridN: "28650",
          NIGridE: "61409",
          NIGridN: "15357",
          Latitude: "52.4764",
          Longitude: "-1.9043",
          TextualLatitude: "N 52Β°, 28' 35\"",
          TextualLongitude: "W 1Β°, 54' 15\"",
          Km: "0.0",
          Miles: "0.0",
          GBGridEFrom: "",
          GBGridNFrom: "",
          NIGridEFrom: "",
          NIGridNFrom: "",
          LatitudeFrom: "",
          LongitudeFrom: "",
          TextualLatitudeFrom: "",
          TextualLongitudeFrom: ""
        }
    ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=Grid&Task=Convert&Fields=Standard&GBGridE=40660&GBGridN=28650&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Lookup/>
    <GBGridE>40660</GBGridE>
    <GBGridN>28650</GBGridN>
    <NIGridE>61409</NIGridE>
    <NIGridN>15357</NIGridN>
    <Latitude>52.4764</Latitude>
    <Longitude>-1.9043</Longitude>
    <TextualLatitude>N 52Β° 28' 35"</TextualLatitude>
    <TextualLongitude>W 1Β° 54' 15"</TextualLongitude>
    <Km>0.0</Km>
    <Miles>0.0</Miles>
    <GBGridEFrom/>
    <GBGridNFrom/>
    <NIGridEFrom/>
    <NIGridNFrom/>
    <LatitudeFrom/>
    <LongitudeFrom/>
    <TextualLatitudeFrom/>
    <TextualLongitudeFrom/>
  </Item>
</AFDPostcodeEverywhere>
				
			

LookupLocation and LookupLocation1m

ParametersDescription
LookupLooks up a town, locality, or partial postcode specified in the Lookup field and provides an approximate grid reference and latitude and longitude values for the location if a match is found. Multiple matches may be returned if the location is ambiguous.

The LookupLocation1m function returns grids to a 1m resolution (6-digit), whereas LookupLocation returns 5-digit grids. |

JSON Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=Grid&Task=LookupLocation&Fields=Standard&Lookup=Isle%20of%20man&format=json

				
					{
   Result: "1",
   ErrorText: "",
   Item: [
      {
         @value: "1",
         Lookup: "Isle of Man, IM",
         GBGridE: "23770",
         GBGridN: "47560",
         NIGridE: "42961",
         NIGridN: "32811",
         Latitude: "54.1505",
         Longitude: "-4.4866",
         TextualLatitude: "N 54Β°, 9' 1\"",
         TextualLongitude: "W 4Β°, 29' 11\"",
         Km: "",
         Miles: "",
         GBGridEFrom: "",
         GBGridNFrom: "",
         NIGridEFrom: "",
         NIGridNFrom: "",
         LatitudeFrom: "",
         LongitudeFrom: "",
         TextualLatitudeFrom: "",
         TextualLongitudeFrom: ""
      }
   ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=Grid&Task=LookupLocation&Fields=Standard&Lookup=Isle%20of%20man&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Lookup>Isle of Man, IM</Lookup>
    <GBGridE>23770</GBGridE>
    <GBGridN>47560</GBGridN>
    <NIGridE>42961</NIGridE>
    <NIGridN>32811</NIGridN>
    <Latitude>54.1505</Latitude>
    <Longitude>-4.4866</Longitude>
    <TextualLatitude>N 54Β° 9' 1"</TextualLatitude>
    <TextualLongitude>W 4Β° 29' 11"</TextualLongitude>
    <Km/>
    <Miles/>
    <GBGridEFrom/>
    <GBGridNFrom/>
    <NIGridEFrom/>
    <NIGridNFrom/>
    <LatitudeFrom/>
    <LongitudeFrom/>
    <TextualLatitudeFrom/>
    <TextualLongitudeFrom/>
  </Item>
</AFDPostcodeEverywhere>
				
			

DistanceMulti

ParametersDescription
lat1, lng1 and lat2, lng2, etc.Addition of multiple way points

JSON Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=grid&Task=distancemulti&fields=standard&lat1=57.1496&lng1=-2.0969&lat2=55.7433&lng2=-4.1996&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Km: "248.47",
      Miles: "154.42",
      Time: "179"
    }
  ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=grid&Task=distancemulti&fields=standard&lat1=57.1496&lng1=-2.0969&lat2=55.7433&lng2=-4.1996&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Km>248.47</Km>
    <Miles>154.42</Miles>
    <Time>179</Time>
  </Item>
</AFDPostcodeEverywhere>
				
			

Distance and Distance1m

ParametersDescription
&GBGridE, &GBGridN Or
&NIGridE, &NIGridN Or
&Latitude, &Longitude
AND: &GBGridEFrom, &GBGridNFrom Or
&NIGridEFrom, &NIGridNFrom Or
&LatitudeFrom, &LongitudeFrom

Calculates the distance between a pair of grid references or latitude and longitude values specified. You will need to set a grid or latitude and longitude value in both the normal fields and those prefixed with β€œFrom” to find the distance in both Miles and Km. The Distance1m function returns grids to a 1m resolution (6-digit), whereas Distance returns 5-digit grids.

JSON Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=Grid&Task=Distance&Fields=Standard&GBGridEFrom=40650&GBGridNFrom=28550&GBGridE=40660&GBGridN=28650&format=json

				
					{
   Result: "1",
   ErrorText: "",
   Item: [
      {
         @value: "1",
         Lookup: "",
         GBGridE: "40660",
         GBGridN: "28650",
         NIGridE: "61409",
         NIGridN: "15357",
         Latitude: "52.4764",
         Longitude: "-1.9043",
         TextualLatitude: "N 52Β°, 28' 35\"",
         TextualLongitude: "W 1Β°, 54' 15\"",
         Km: "1.0",
         Miles: "0.6",
         Time: "",
         GBGridEFrom: "40650",
         GBGridNFrom: "28550",
         NIGridEFrom: "61407",
         NIGridNFrom: "15257",
         LatitudeFrom: "52.4674",
         LongitudeFrom: "-1.9057",
         TextualLatitudeFrom: "N 52Β°, 28' 2\"",
         TextualLongitudeFrom: "W 1Β°, 54' 20\""
      }
   ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&UserID=MyApp&Data=Grid&Task=Distance&Fields=Standard&GBGridEFrom=40650&GBGridNFrom=28550&GBGridE=40660&GBGridN=28650&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Lookup/>
    <GBGridE>40660</GBGridE>
    <GBGridN>28650</GBGridN>
    <NIGridE>61409</NIGridE>
    <NIGridN>15357</NIGridN>
    <Latitude>52.4764</Latitude>
    <Longitude>-1.9043</Longitude>
    <TextualLatitude>N 52Β° 28' 35"</TextualLatitude>
    <TextualLongitude>W 1Β° 54' 15"</TextualLongitude>
    <Km>1.0</Km>
    <Miles>0.6</Miles>
    <Time/>
    <GBGridEFrom>40650</GBGridEFrom>
    <GBGridNFrom>28550</GBGridNFrom>
    <NIGridEFrom>61407</NIGridEFrom>
    <NIGridNFrom>15257</NIGridNFrom>
    <LatitudeFrom>52.4674</LatitudeFrom>
    <LongitudeFrom>-1.9057</LongitudeFrom>
    <TextualLatitudeFrom>N 52Β° 28' 2"</TextualLatitudeFrom>
    <TextualLongitudeFrom>W 1Β° 54' 20"</TextualLongitudeFrom>
   </Item>
</AFDPostcodeEverywhere>
				
			

Bank Finder

An application programming interface to access the BankFinder data. Please see the BankFinder Manual for more information.

Available Bank Fields

● = Field returned by this product and fully searchable
⚬ = Field returned by this product, but not searchable

πŸ›ˆ Please note that the Field Lengths are only guidelines and are not limits.

The following shows the banking fields.

Field NameField LengthData TypeDescriptionBankFinder
Key40NumericUnique Identifier of this record●
List512TextProvides a list item formatted to be added to a list box for this record⚬
SortCode6NumericBank’s Sort code●
BankBIC8TextBank BIC Code●
BranchBIC3TextBranch BIC Code●
SubBranchSuffix2NumericAllows a branch to be uniquely identified where there is a cluster of branches sharing the same Sort Code⚬
ShortBranchTitle27TextThe official title of the branch●
CentralBankCountryCode2NumericThe ISO Country code for beneficiary banks in other countries⚬
CentralBankCountryName20TextThe country name corresponding to the ISO code given⚬
SupervisoryBodyCode1NumericIndicates the supervisory body for an institution that is an agency in any of the clearings⚬
SupervisoryBodyName50TextThe name of the supervisory body⚬
DeletedDate10TextSpecifies the date the branch was closed if it is not active⚬
BranchType20TextThe branch type – Main Branch, Sub or NAB Branch, Linked Branch⚬
BranchName35TextDefines the actual name or place of the branch⚬
FullBranchTitle105TextExtended title for the institution⚬
Location60TextWhere present, this field indicates the physical location of the branch●
AlternativeBranchName35TextAn alternative name or place for the branch where applicable●
MainBranchSortCode6NumericSet for linked branches in a cluster. It identifies the main branch for the cluster. For IPSO records this is set to the branch that would handle transactions for this sort code when the branch has been amalgamated with another⚬
BuildingSocietyName70TextFor building society accounts requiring a roll number this will contain the name of the receiving building society as this sometimes differs from the bank branch that the payment passes through⚬
OwnerBankShortName20TextShort version of the name of the Owning Bank●
OwnerBankFullName70TextFull version of the name of the Owning Bank●
OwnerBankCode4NumericThe four-digit bank code of the Owning Bank⚬
Organisation120TextOwner Bank Full Name●
Property65TextBank Postal Address: Property (Building)⚬
Street60TextBank Postal Address: Street⚬
Locality60TextBank Postal Address: Locality⚬
Town30TextBank Postal Address: Town●
County30TextBank Postal Address: County (Optional)⚬
Postcode8TextThe Royal Mail Postcode for this address●
Phone20NumericPhone Number for this bank●
Phone220NumericAdditional Phone Number for this bank●
Fax20NumericFax Number for this bank (IPSO only)⚬
ClearingSystem25TextClearing system for this record⚬
BACSStatus5TextIndicates the BACS Clearing Status⚬
BACSStatusDescription60TextDate on which BACS data was last amended⚬
BACSClosedClearing10TextIndicates the date the branch was closed in BACS clearing if applicable⚬
BACSRedirectedFromFlag1NumericSet to R if other branches are redirected to this sort code⚬
BACSRedirectedToSortCode6NumericThis specifies the sort code to which BACS should redirect payments addressed to this sort code if applicable⚬
BACSSettlementBankCode4NumericBACS Bank Code of the bank that will settle payments for this branch⚬
BACSSettlementBankShortName20TextShort form name of the settlement bank⚬
BACSSettlementBankFullName70TextFull form name of the settlement bank⚬
BACSSettlementBankSection2NumericNumeric data required for BACS to perform it’s settlement⚬
BACSSettlementBankSubSection2NumericNumeric data required for BACS to perform it’s settlement⚬
BACSHandlingBankCode4NumericBACS Bank Code of the member that will take BACS output from this branch⚬
BACSHandlingBankShortName20TextShort form name of the handling bank⚬
BACSHandlingBankFullName70TextFull form name of the handling bank⚬
BACSHandlingBankStream2NumericNumeric code defining the stream of output within the Handling Bank that will be used or payments to this branch⚬
BACSAccountNumbered1NumericSet to 1 if numbered bank accounts are used⚬
BACSDDIVoucher1NumericSet to 1 if Paper Vouchers have to be printed for Direct Debit Instructions⚬
BACSDirectDebits1NumericSet to 1 if branch accepts Direct Debits⚬
BACSBankGiroCredits1NumericSet to 1 if branch accepts Bank Giro Credits⚬
BACSBuildingSocietyCredits1NumericSet to 1 if branch accepts Building Society Credits⚬
BACSDividendInterestPayments1NumericSet to 1 if branch accepts Dividend Interest Payments⚬
BACSDirectDebitInstructions1NumericSet to 1 if branch accepts Direct Debit Instructions⚬
BACSUnpaidChequeClaims1NumericSet to 1 if branch accepts Unpaid Cheque Claims⚬
CHAPSPStatus1NumericIndicates the CHAPS Sterling clearing Status⚬
CHAPSPStatusDescription80TextProvides a description for the status⚬
CHAPSPLastChange10TextDate on which CHAPS Sterling data was last amended⚬
CHAPSPClosedClearing10TextIndicates the date the branch is closed in CHAPS Sterling clearing if applicable⚬
CHAPSPSettlementBankCode3NumericCHAPS ID of the bank that will settle payments for this branch⚬
CHAPSPSettlementBankShortName20TextShort form of the name of the settlement bank⚬
CHAPSPSettlementBankFullName70TextFull form of the name of the settlement bank⚬
CCCCStatus1NumericIndicates the C&CCC clearing Status⚬
CCCCStatusDescription40TextProvides a description for the status⚬
CCCCLastChange6NumericDate on which C&CCC data was last amended⚬
CCCCClosedClearing30TextIndicates the date the branch is closed in C&CCC clearing if applicable⚬
CCCCSettlementBankCode3NumericBACS generated code of the bank that will settle payments for this branch⚬
CCCCSettlementBankShortName20TextShort form of the name of the settlement bank⚬
CCCCSettlementBankFullName70TextFull form of the name of the settlement bank⚬
CCCCDebitAgencySortCode50NumericWhen the Status field is set to ‘D’ this specifies where cheque clearing is handled for this branch⚬
CCCCReturnIndicator6NumericSet if this is the branch that other banks should return paper to. It will only be set for a sort code of a Member⚬
CCCCGBNIIndicator1TextIndicates for C&CCC purposes if the office is in mainland Great Britain (GB) or Northern Ireland (NI)⚬
FPSStatus1TextIndicates if the branch can accept FPS payments and whether or not it is an agency⚬
FPSStatusDescription60TextThe description for the FPStatus field⚬
FPSLastChange10TextThe date on which FPS data for this record was last amended⚬
FPSClosedClearing10TextThe date when the status of the branch was set to ‘N’ (does not accept FPS payments) if applicable⚬
FPSRedirectedFromFlag1TextIf the branch is set as the redirection sort code for one or more bank offices this will be indicated here⚬
FPSRedirectToSortCode6NumericIf output destined for this sort code has been redirected the sort code to redirect payment too will be displayed here⚬
FPSSettlementBankCode4NumericThe Bank code of the FPS member that settles the FPS output for this sort code⚬
FPSSettlementBankShortName20TextThe short name that goes with the above code⚬
FPSSettlementBankFullName70TextThe full name that goes with the above code⚬
FPSSettlementBankConnection2NumericTwo-digit connectivity code for settlement⚬
FPSHandlingBankCode4NumericThe Bank code of the FPS member that handles the FPS output for this sort code⚬
FPSHandlingBankShortName20TextThe short name that goes with the above code⚬
FPSHandlingBankFullName70TextThe full name that goes with the above code⚬
FPSHandlingBankConnection2NumericTwo-digit connectivity code for handling⚬
FPSAccountNumberedFlag1NumericSet to Y is bank office has transferrable account numbers. N if it does not⚬
FPSAgencyType1TextIndicates if the Bank office is a direct agency (D) or an indirect agency (I)⚬
FPSAgencyTypeDescription60TextThe description for the above code, i.e., the code field has D/I that has a human-readable text version⚬

Bank Result Codes

The below table describes the possible result codes and error messages when using the bank data product:

Result CodeDescription
2Validation Not Available
1Successful
-7Data License Error
-12Sort Code Not Found
-13Invalid Sort Code
-14Invalid Account Number
-15Invalid Expiry Date
-16Card Expired
-18Invalid Card Number
-19Visa ATM Only
-20Unrecognised Card Type
-21Invalid Roll Number
-22Invalid IBAN
-23Unrecognised Country
-24IBAN Mismatch

Bank Lookup Tasks

Lookup Tasks are a group of different calls that each accepts only one search parameter, specified using a Lookup string.

Bank Lookup

  • This task should be used when the full postcode/sort code is always known.
  • It will only accept a full postcode/sort code.
  • Including a space or hyphens in the sort code are optional.
  • It can return one or more results (including multiple streets when a postcode is on a multi locality record).
DescriptionExample
GBR Sort Code401101
IRL Sort Code930008
JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=lookup&clearing=all&fields=list&lookup=401101&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Key: "4011010",
      List: "401101    Solihull, HSBC UK Bank PLC, Birmingham"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=lookup&clearing=all&fields=list&lookup=401101&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Key>4011010</Key>
    <List>401101 Solihull, HSBC UK Bank PLC, Birmingham</List>
  </Item>
</AFDPostcodeEverywhere>
				
			

Bank Property Lookup

DescriptionExample
BranchName, SortCodePudsey,560036
JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=propertyLookup&clearing=all&fields=list&lookup=Pudsey,560036&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Key: "5600366",
      List: "560036    Pudsey, Nat West Bank PLC, Bradford"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=propertyLookup&clearing=all&fields=list&lookup=Pudsey,560036&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Key>5600366</Key>
    <List>560036 Pudsey, Nat West Bank PLC, Bradford</List>
  </Item>
</AFDPostcodeEverywhere>
				
			

Bank Fast Find

Used to lookup bank data from a lookup string, for example, a sort code or bank and branch name, e.g. 560036.

The Search task accepts multiple strings as input, and if successful returns one or more records. The input can be a postcode, or an address element, or a combination of these separated by a comma.

DescriptionExample
OrganisationHSBC Bank PLC
Organisation, TownHSBC, BIRMINGHAM
JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=fastfind&clearing=all&fields=list&lookup=HSBC,%20BIRMINGHAM&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Key: "4011010",
      List: "401101    Solihull, HSBC UK Bank PLC, Birmingham"
    },
    {
      @value: "2",
      Key: "4011020",
      List: "401102    Birmingham, New Street, HSBC UK Bank PLC, Birmingham"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=fastfind&clearing=all&fields=list&lookup=HSBC,%20BIRMINGHAM&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Key>4011010</Key>
    <List>401101 Solihull, HSBC UK Bank PLC, Birmingham</List>
  </Item>
  <Item value="2">
    <Key>4011020</Key>
    <List>401102 Birmingham, New Street, HSBC UK Bank PLC, Birmingham</List>
  </Item>
</AFDPostcodeEverywhere>
				
			

Search Tasks are a group of different calls that each accepts multiple search parameters, specified using a Search string. It searches for matching bank records based on specific search criteria.

The Search task accepts multiple strings as input, and if successful returns one or more records. The input can be a postcode, or an address element, or a combination of these separated by a comma.

Another way to do searches is to use any of the fields when using &fields=standard.

DescriptionsExample
Searchable Field&Organisation=RBS&Town=Birmingham

πŸ›ˆ Any field can be searched.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=search&clearing=all&fields=list&organisation=RBS&town=Birmingham&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Key: "413590",
      List: "041359    Optimus Cards UK Limited, Optimus Cards, Birmingham"
    },
    {
      @value: "2",
      Key: "502460",
      List: "050246    Yorkshire Bank Bft 2, Yorkshire Bank"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=search&clearing=all&fields=list&organisation=RBS&town=Birmingham&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Key>413590</Key>
    <List>041359 Optimus Cards UK Limited, Optimus Cards, Birmingham</List>
  </Item>
  <Item value="2">
    <Key>502460</Key>
    <List>050246 Yorkshire Bank Bft 2, Yorkshire Bank</List>
  </Item>
</AFDPostcodeEverywhere>
				
			

Bank Retrieve

A retrieve is a call that returns individual address information specified using the key value, for example, when selected from a list.

DescriptionExample
Solihull, HSBC UK Bank PLC, Birmingham4011010
International Banking Services93000890
JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=retrieve&clearing=all&fields=list&key=4011010&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Key: "4011010",
      List: "401101    Solihull, HSBC UK Bank PLC, Birmingham"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=retrieve&clearing=all&fields=list&key=4011010&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Key>4011010</Key>
    <List>401101 Solihull, HSBC UK Bank PLC, Birmingham</List>
  </Item>
</AFDPostcodeEverywhere>
				
			

Account Number Validation

This task provides the ability to validate a sort code and account number. It checks that the account number is valid for the branch of the bank to which the sort code belongs.
This does not guarantee that the account number exists or sufficient funds exist for any transaction but greatly cuts down on errors due to incorrectly entered numbers.
The Task will also translate any non-standard account numbers (e.g. a 10-digit account number).

You can also supply a Roll Number in the case of crediting some building society accounts which require one which will also be checked.

If the account number is invalid, the Result field returned will be set to a value less than zero and the ErrorText will contain a corresponding error message.

Assuming no error occurred, you can assume the account number is valid but should read the SortCode, AccountNumber, IBAN, and RollNumber (if required) and TypeOfAccount parameters in-case the number has been translated.

If the return value is 1 then the account number has been validated, if the return value is 2 then account numbers on this sort code cannot be validated and so the number should still be treated as valid. This return code is provided so you can carry out an additional check on the account number, e.g. asking a customer on the phone to repeat it, checking it has been entered from a paper form correctly, etc. if you wish to do so.

Note that the only Field type valid for validating account numbers is Standard as the result contains no address. Only a single result will ever be returned so there is no need to list results.

Should you also wish to check the branch details match those that the customer has supplied, check the transaction types allowed at this branch, or obtain the address to use for this branch (may not be the branch physical location) then you can carry out a lookup for the sort code to obtain the branch information.

DescriptionExample
SortCode, Account774814, 24782346
IBANGB58 TSBS 7748 1424 7823 46
JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=account&clearing=all&fields=account&sortcode=774814&accountnumber=24782346&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      SortCode: "774814",
      AccountNumber: "24782346",
      RollNumber: "",
      TypeOfAccount: "0",
      ClearingSystem: "United Kingdom (BACS)",
      IBAN: "GB58 TSBS 7748 1424 7823 46"
    }
  ]
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=account&clearing=all&fields=account&sortcode=774814&accountnumber=24782346&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <SortCode>774814</SortCode>
    <AccountNumber>24782346</AccountNumber>
    <RollNumber/>
    <TypeOfAccount>0</TypeOfAccount>
    <ClearingSystem>United Kingdom (BACS)</ClearingSystem>
    <IBAN>GB58 TSBS 7748 1424 7823 46</IBAN>
  </Item>
</AFDPostcodeEverywhere>
				
			

Credit Card Validation

This Task provides the ability to validate a card number, and optionally check that an expiry date indicates that the card is in-date. It checks that the card number is a valid one for the type of card and can indicate the card type. This does not guarantee that the card exists or that a transaction will be authorized, but greatly cuts down on errors due to incorrectly entered numbers.

If the card number is invalid, the Result field returned will be set to a value less than zero and the ErrorText will contain a corresponding error message.

Assuming no error occurred, you can assume the card number is valid. If you wish to determine the card type, the CardType field will hold this information.

DescriptionExample
Card Number4903005748392742
JSON Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=card&clearing=all&fields=card&cardnumber=4903%200057%204839%202742&expirydate=01/25&format=json

				
					{
  Result: "-19",
  ErrorText: "Visa ATM Card Only"
}
				
			
XML Format

https://pce.afd.co.uk/afddata.pce?data=bank&serial=333333&password=pwd&task=card&clearing=all&fields=card&cardnumber=4903%200057%204839%202742&expirydate=01/25&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>-19</Result>
  <ErrorText>Visa ATM Card Only</ErrorText>
</AFDPostcodeEverywhere>
				
			

Refiner

This section describes the Refiner product tasks for cleansing address information.

Note: This is only an installed product.

Clean

This product requires a Refiner API license.

You will need to set address fields in your structure to specify the address to be cleaned. These do not need to match up to the actual fields. For example, if you have Address Line 1, Address Line 2, Address Line 3, and Postcode in your database you could set these to Property, Street, Locality, and Postcode fields in the structure and they will be cleaned and returned in the correct named fields when matched. Note that if you set any non-address fields they will be ignored (please see Input and Output table for the list of fields that Refiner will use).

The request will return a negative value (less than zero) in the case where an address cannot be fully matched. This could be because the address was unmatchable, a non-UK address, or an ambiguous result was found (see Result Codes). An address will still be returned as this will include the address with Field Placement correction, which you can use if you desire.

Where the function returns a positive value (greater than zero) this means that the address has been uniquely matched. You may still like to examine the return value as this will give details as to the level to which the address was matched (see Result Codes). Many other fields are also available with additional non-address data, which you may require.

In the case of an ambiguous or suggested result (see Result Codes), the first address returned from the function will be the original address with field placement. For non-batch processes, you may wish to present a list of addresses for the user to choose from and in this case, you can continue to call the request as above repeatedly with the same operation code as before.

Input

Refiner will take address field input in the following format:

Input FieldsDescription
Address(n)(where n is 1 to 10) which allows address data to be sent in
UDPRNwhich specifies a UDPRN number of a record
UPRNwhich specifies an OS UPRN number (optional dataset available)
Other FieldsFields which specify a list of fields to output

Output

Refiner will output the following fields:

Output FieldsDescription
Result CodeIndicates the status of the match (see Result Codes)
ClosenessIndicates how close the original address is to the one output on a percentage scale
Other FieldsFields specified in the preset which include all fields supported by Postcode Plus with the addition of Address(n) (where n is 1 to 10) as the address data output (each line in a separate field)

Fields Parameter

The possible field string, which determines what data is output in addition to the fields above:

  • Organisation@Property@Street@Locality@Town@PostalCounty@Postcode
  • Organisation@addr1:60@addr2:60@addr3:60@addr4:60@Postcode
  • standard
  • list
  • raw
  • bs7666
  • simple

Refiner Result Codes

The below table describes the possible result codes and error messages:

Result CodeDescription
100Complete PAF Match – Address verified from Postcode and matches a record in PAF (shown in Postcode Plus) identically.
200Postcode Match – Address verified from the Postcode and matches a record in PAF (shown in Postcode Plus) with some correction.
201Postcode Match (Postcode changed) – Address verified from a postcode which was substituted due to a Royal Mail recoding and now matches a record in PAF (shown in Postcode Plus).
202Assume Postcode Correct – Property Match assuming the postcode is correct.
203Assume Changed Postcode Correct – Postcode, Property Match with Changed Postcode assuming the original postcode is correct.
204Postcode Match (non-matched property added in).
205Postcode Match (postcode changed and non-matched property added in).
300Full DPS Match (Different postcode returned) – Address verified to PAF (shown in Postcode Plus) with some correction, looking wider than just the specified Postcode.
301Full DPS Match (Ambiguous Organisation omitted) – Address verified to PAF (shown in Postcode Plus). Multiple PAF Organisations were listed as this address so the PAF Organisation has not been returned.
400Non-DPS Match (Street level) – Address verified to Street Level, i.e. the property was not on PAF, but a unique match to the street was identified on a single postcode.
-1No Match Found – Refiner has been unable to match this record.
-2Ambiguous Postcode – Refiner has matched this record to Street Level but cannot determine which is the correct Postcode and so has presented each of the possibilities.
-3Suggested Record – Refiner has found a unique possible match for this record but there is not enough address data to reliably match it.
-4Ambiguous Address – Refiner has given several possibilities that this address could match to.
-5International Address – This address was detected as being an International Address and therefore cannot be cleaned as data is only present for cleaning UK, Channel Isles and Isle of Man addresses.
-6No Address Data Supplied – No record data was supplied. Refiner cannot clean this address as no address data was given.
-7Data License Error

Example

JSON Format

http://localhost:81/afddata.pce?serial=333333&password=pwd&Data=Address&task=Clean&format=json&fields=organisation@property@street@locality@town@county@postcode@list@udprn&address1=AFD%20Software%20Ltd&address2=&address3=Lezayre,%20Ramsey&address4=&address5=ISLE%20OF%20MAN&address6=&address7=IM7%202DZ

				
					{
  ResultCode: 200,
  Closeness: 66,
  organisation: "A F D Software Ltd",
  property: "Mountain View Innovation Centre",
  street: "Jurby Road",
  locality: "Lezayre, Ramsey",
  town: "Isle of Man",
  county: "",
  postcode: "IM7 2DZ",
  list: "IM7 2DZ     A F D Software Ltd, Mountain View Innovation Centre, Jurby Road, Lezayre, Ramsey, ISLE OF MAN",
  udprn: "53708644"
}
				
			
XML Format

http://localhost:81/afddata.pce?serial=333333&password=pwd&Data=Address&task=Clean&format=xml&fields=organisation@property@street@locality@town@county@postcode@list@udprn&address1=AFD%20Software%20Ltd&address2=&address3=Lezayre,%20Ramsey&address4=&address5=ISLE%20OF%20MAN&address6=&address7=IM7%202DZ

				
					<AFDPostcodeEverywhere>
  <Result>200</Result>
  <ErrorText>Postcode Match</ErrorText>
  <Item value="1">
    <Closeness>66</Closeness>
    <organisation>A F D Software Ltd</organisation>
    <property>Mountain View Innovation Centre</property>
    <street>Jurby Road</street>
    <locality>Lezayre, Ramsey</locality>
    <town>Isle of Man</town>
    <county/>
    <postcode>IM7 2DZ</postcode>
    <list>IM7 2DZ A F D Software Ltd, Mountain View Innovation Centre, Jurby Road, Lezayre, Ramsey, ISLE OF MAN</list>
    <udprn>53708644</udprn>
  </Item>
</AFDPostcodeEverywhere>
				
			

Refiner Additional Options

ParameterDescription
FieldName(n)=(value)(where n is 1 to 10) which allows the field name to be specified (when known) for the data, valid values are Organisation, Property, HouseNumber, Street, Locality, Town, County, and Postcode
AttachMode=1Used to simply attach data based on the postcode, doesn’t verify the address
PostcodeOnly=1If it can, it will verify an address purely using the postcode (returning only 100/200 result codes)
FullMatch=1Only returns full PAF matches, i.e. if the property is not on PAF, a street-level match will not be offered
Speed=1Skips slower portions of processing (lowers match rate but improves performance)
Interactive=1Specifies the address is being returned to a user interactively to check. (For example, when a user has entered an address manually and the suggested address is displayed). This allows results to be returned with low confidence for an automated match
Ambiguous=1This allows ambiguous matches the user can choose from
Dedupe=1Enables deduplication
DedupeFields=List of fields, separated by @ to dedupe on (e.g. Postcode|UDPRN|Name)
FormatNonMatched=1This provides a formatted result for non-matched addresses (by default only the result code is returned unless using compatibility (non-path based) calls)
POBoxLast=1Means Refiner attempts to match to a street address in preference to PO Box when both are present in the source address
RetainAlias=1Means that Refiner will retain Alias Localities if present in the source address
NoDefaultDPS=1For non-DPS matches (e.g. 400) Refiner will use a default DPS value of 9Z as that is acceptable for mailing purposes. This option means the field will instead be blank in such cases
NoOrgFill=1This means un-matched data will not be moved to the organisation from the source address. This is useful if the customer doesn’t map back an organisation field
PostcodeCorrect=1When this is specified, Refiner will assume the source postcode is correct and therefore match records with otherwise lower confidence on the same postcode. This should only be used where there is a very high confidence level about the postcode or in manual matching

Line Squeezing

This allows you to specify field lengths and a fixed town field as well as to optionally include the county which allows for more control over squeezing fields.

For example: addr1:60@addr2@60:addr3:60 squeezes the address fields (minus the postcode) into 3 fields, concatenating fields as required to do so.

The below table gives optional fields that may help in squeezing fields:

ParameterDescription
fixtown=(n)Fix the town to the (n) address field
upper(field)=1Sets the field to upper case. Eg uppertown=1 sets town to upper case
includeCounty=YIncludes the county if a dedicated county field has not already been specified
includeCounty=SThe county is included if there is space

Batch of POST Requests

To allow greater performance, batch requests are also handled by the system. Up to 100 records can be submitted at once for processing. These will be returned within a pre-set time out (default 60 seconds, URL parameter &maxTime= can reduce this).

The MaxPOSTRecs and MaxPOSTTime settings in the pceConfig.xml file allow these limits to be tweaked.

The format of the return will provide the number of records processed (as may be less than supplied if maximum time interval exceeded – those records not processed should be re-posted to the service).
Each item returned represents a single record processed.

An example POST request would be:

http://localhost:81/afddata.pce?data=refiner&task=clean&serial=333333&password=pwd&fields=organisation@property@street@locality@town@county@postcode@list@udprn

With POST data:

172 Hereson Road~ramsgate~Ct117el
AFD software~mountain view~isle of man~im72dz
33 cannan avenue~kirk michael~isle of man~im61hg

Compatibility Information

A compatibility layer is provided that aliases old-style requests to new ones and provides any omitted functionality so that existing API users can migrate to the new API without any issues. All functionality, as documented in the current evolution API, should function with this in-place.

For clarity, the cleaning options from the older style relate to the following new style options:

Previous Implementation CodeNew Refiner Parameter
0Standard cleaning (no additional options unless specified)
1&postcodeonly=1
2&fullmatch=1
3&attachmode=1
T&ambiguous=1
S&interactive=1
P&poboxlast=1
L&retainalias=1
W&nodefaultdps=1
O&noorgfill=1
U&postcodecorrect=1
Fno equivalent but is taken account of
Compatibility CodesNew Refiner CodeDescription
302301Full DPS Match Limited
-101-1No Match Found
-102-2Ambiguous Postcode
-103-3Suggest Record
-104-4Ambiguous Match
-105-5International Address
-106-6No Record Data

Refiner Business

This section describes the Refiner Business product tasks for cleansing organisation’s address information and appending business data, where available.

Note: This is only an installed product.

Clean

This product requires a special Refiner API license.

You will need to set address fields in your structure to specify the address to be cleaned. These do not need to match up to the actual fields. For example, if you have Organisation, Address Line 1, Address Line 2, Address Line 3, and Postcode in your database you could set these to Organisation, Property, Street, Town and Postcode fields in the structure and they will be cleaned and returned in the correct named fields when matched. Note that if you set any non-address fields they will be ignored (please see Input and Output table for the list of fields that Refiner will use).

The request will return a negative value (less than zero) in the case where an address cannot be matched. This could be because the address was unmatchable, a non-UK address, or an ambiguous result was found (see Result Codes). An address will still be returned as this will include the address with Field Placement correction, which you can use if you desire.

Where the function returns a positive value (greater than zero) this means that the address has been uniquely matched. You may still like to examine the return value as this will give details as to the level to which the address was matched (see Result Codes). Many other fields are also available with additional non-address data, which you may require.

In the case of an ambiguous or suggested result (see Result Codes), the first address returned from the function will be the original address with field placement. For non-batch processes, you may wish to present a list of addresses for the user to choose from and in this case, you can continue to call the request as above repeatedly with the same operation code as before.

Input

Refiner will take address field input in the following format:

Input FieldsDescription
Address(n) (where n is 1 to 10)Allows address data to be sent in
UDPRNSpecifies a UDPRN number of a record
UPRNSpecifies an OS UPRN number (optional dataset available)
Other FieldsFields which specify a list of fields to output

Data parameter

  • Β busRefiner

Output

Refiner will output the following fields:

Output FieldsDescription
Result CodeIndicates the status of the match (see Result Codes)
ClosenessIndicates how close the original address is to the one output on a percentage scale
Other FieldsFields specified in the pre-set, which include all fields supported by Postcode Plus Business with the addition of Address(n) (where n is 1 to 10) as the address data output (each line in a separate field)

Fields Parameter

The possible field string, which determines what data is output in addition to the fields above:

  • Organisation@Property@Street@Locality@Town@PostalCounty@Postcode
  • Organisation@addr1:60@addr2:60@addr3:60@addr4:60@Postcode
  • Standard
  • List
  • Raw
  • bs7666
  • simple

Refiner Result Codes

The below table describes the possible result codes and error messages:

Result CodeDescription
100Complete PAF Match – Address verified from Postcode and matches a record in PAF (shown in Postcode Plus) identically.
200Postcode Match – Address verified from the Postcode and matches a record in PAF (shown in Postcode Plus) with some correction.
201Postcode Match (Postcode changed) – Address verified from a postcode which was substituted due to a Royal Mail recoding and now matches a record in PAF (shown in Postcode Plus).
202Assume Postcode Correct – Property Match assuming the postcode is correct.
203Assume Changed Postcode Correct – – Postcode, Property Match with changed postcode assuming the original postcode is correct.
204Postcode Match (non-matched property added in).
205Postcode Match (postcode changed and non-matched property added in).
300Full DPS Match (Different postcode returned) – Address verified to PAF (shown in Postcode Plus) with some correction, looking wider than just the specified Postcode.
301Full DPS Match (Ambiguous Organisation omitted) – Address verified to PAF (shown in Postcode Plus). Multiple PAF Organisations were listed as this address so the PAF Organisation has not been returned.
400Non-DPS Match (Street level) – Address verified to Street Level, i.e. the property was not on PAF, but a unique match to the street was identified on a single postcode.
-1No Match Found – Refiner has been unable to match this record.
-2Ambiguous Postcode – Refiner has matched this record to Street Level but cannot determine which is the correct Postcode and so has presented each of the possibilities.
-3Suggested Record – Refiner has found a unique possible match for this record but there is not enough address data to reliably match it.
-4Ambiguous Address – Refiner has given several possibilities that this address could match to.
-5International Address – This address was detected as being an International Address and therefore cannot be cleaned as data is only present for cleaning UK, Channel Isles and Isle of Man addresses.
-6No Address Data Supplied – No record data was supplied. Refiner cannot clean this address as no address data was given.
-7Data License Error

Examples

GET Requests

JSON Format

http://localhost:81/v1/busrefiner/GBR/clean?serial=333333&password=pwd&fields=organisation@property@street@locality@town@county@postcode@business@size@nationalSize@locationType@SICCode@branchCode@groupId@modelledTurnover@phone@list&address1=AFD Software Ltd&address2=&address3=Lezayre, Ramsey&address4=&address5=Isle of Man&address6=&address7=IM7 2DZ

Response:

				
					{
  ResultCode: 200,
  Closeness: 66,
  organisation: "A F D Software Ltd",
  property: "Mountain View Innovation Centre",
  street: "Jurby Road",
  locality: "Lezayre, Ramsey",
  town: "Isle of Man",
  county: "",
  postcode: "IM7 2DZ",
  GridE: "243661",
  GridN: "495386",
  business: "Computer Software (Development)",
  size: "E",
  nationalSize: "C",
  locationType: "S",
  SICCode: "62012",
  branchCode: "",
  groupId: "",
  modelledTurnover: "",
  phone: "01624811711",
  list: "IM7 2DZ     A F D Software Ltd, Mountain View Innovation Centre, Jurby Road, Lezayre,
Ramsey, ISLE OF MAN"
}
				
			

Or the following type of request:

http://localhost:81/afddata.pce?serial=333333&password=pwd&data=busrefiner&task=clean&format=json&fields=organisation@property@street@locality@town@county@postcode@GridE@GridN@business@size@nationalSize@locationType@SICCode@branchCode@groupId@modelledTurnover@phone@list&address1=AFD%20Software%20Ltd&address2=&address3=Lezayre,%20Ramsey&address4=&address5=ISLE%20OF%20MAN&address6=&address7=IM7%202DZ

Response:

				
					{
  ResultCode: 200,
  Closeness: 66,
  organisation: "A F D Software Ltd",
  property: "Mountain View Innovation Centre",
  street: "Jurby Road",
  locality: "Lezayre, Ramsey",
  town: "Isle of Man",
  county: "",
  postcode: "IM7 2DZ",
  GridE: "243661",
  GridN: "495386",
  business: "Computer Software (Development)",
  size: "E",
  nationalSize: "C",
  locationType: "S",
  SICCode: "62012",
  branchCode: "",
  groupId: "",
  modelledTurnover: "",
  phone: "01624811711",
  list: "IM7 2DZ     A F D Software Ltd, Mountain View Innovation Centre, Jurby Road, Lezayre, Ramsey, ISLE OF MAN"
}
				
			

XML Format

http://localhost:81/afddata.pce?serial=333333&password=pwd&data=busrefiner&task=clean&fields=organisation@property@street@locality@town@county@postcode@GridE@GridN@business@size@nationalSize@locationType@SICCode@branchCode@groupId@modelledTurnover@phone@list&address1=AFD%20Software%20Ltd&address2=&address3=Lezayre,%20Ramsey&address4=&address5=ISLE%20OF%20MAN&address6=&address7=IM7%202DZ

Response:

				
					<AFDPostcodeEverywhere>
  <Result>200</Result>
  <ErrorText>Postcode Match</ErrorText>
  <Item value="1">
    <Closeness>66</Closeness>
    <organisation>A F D Software Ltd</organisation>
    <property>Mountain View Innovation Centre</property>
    <street>Jurby Road</street>
    <locality>Lezayre, Ramsey</locality>
    <town>Isle of Man</town>
    <county/>
    <postcode>IM7 2DZ</postcode>
    <GridE>243661</GridE>
    <GridN>495386</GridN>
    <business>Computer Software (Development)</business>
    <size>E</size>
    <nationalSize>C</nationalSize>
    <locationType>S</locationType>
    <SICCode>62012</SICCode>
    <branchCode></branchCode>
    <groupId></groupId>
    <modelledTurnover></modelledTurnover>
    <phone>01624811711</phone>
    <list>IM7 2DZ A F D Software Ltd, Mountain View Innovation Centre, Jurby Road, Lezayre, Ramsey, ISLE OF MAN</list>
  </Item>
</AFDPostcodeEverywhere>
				
			

POST Requests

To allow greater performance, batch requests are also handled by the system. Up to 100 records can be submitted at once for processing. These will be returned within a pre-set time out (default 60 seconds).

The MaxPOSTRecs and MaxPOSTTime settings in the pceConfig.xml file allow these limits to be tweaked. After making these changes the AFD Postcode Evolution Service need to be restarted.

The format of the return will provide the number of records processed (as may be less than supplied if maximum time interval exceeded – those records not processed should be re-posted to the service).

Each item returned represents a single record processed.

JSON Format

http://localhost:81/v1/busrefiner/GBR/clean?serial=333333&password=psw&fields=organisation@property@street@locality@town@county@postcode@business@size@nationalSize@locationType@SICCode@branchCode@groupId@modelledTurnover@phone

XML Format

http://localhost:81/afddata.pce?serial=333333&password=pwd&data=busrefiner&task=clean&fields=organisation@property@street@locality@town@county@postcode@GridE@GridN@business@size@nationalSize@locationType@SICCode@branchCode@groupId@modelledTurnover@phone

With POST data:

AB10 6BR~Pizza Hut (UK) Ltd~53 Holburn Street~ABERDEEN

AFD software~mountain view~isle of man~im72dz

Your Housing Group Ltd~Eaves Brook House~Navigation Way~PR2 2YP

Refiner Additional Options

ParameterDescription
FieldName(n)=(value)(where n is 1 to 10) which allows the field name to be specified (when known) for the data, valid values are Organisation, Property, HouseNumber, Street, Locality, Town, County, and Postcode
AttachMode=1Used to simply attach data based on the postcode, doesn’t verify the address
PostcodeOnly=1If it can, it will verify an address purely using the postcode (returning only 100/200 result codes)
FullMatch=1Only returns full PAF matches, i.e. if the property is not on PAF, a street-level match will not be offered
Speed=1Skips slower portions of processing (lowers match rate but improves performance)
Interactive=1Specifies the address is being returned to a user interactively to check. (For example, when a user has entered an address manually and the suggested address is displayed). This allows results to be returned with low confidence for an automated match
Ambiguous=1*This allows ambiguous matches the user can choose from
Dedupe=1 **Enables deduplication
DedupeFields= **List of fields, separated by @ to dedupe on (e.g. Postcode|UDPRN|Name)
FormatNonMatched=1This provides a formatted result for non-matched addresses (by default only the result code is returned unless using compatibility (non-path based) calls)
POBoxLast=1Means Refiner attempts to match to a street address in preference to PO Box when both are present in the source address
RetainAlias=1Means that Refiner will retain Alias Localities if present in the source address
NoDefaultDPS=1For non-DPS matches (e.g. 400) Refiner will use a default DPS value of 9Z as that is acceptable for mailing purposes. This option means the field will instead be blank in such cases
NoOrgFill=1This means un-matched data will not be moved to the organisation from the source address. This is useful if the customer doesn’t map back an organisation field
PostcodeCorrect=1When this is specified, Refiner will assume the source postcode is correct and therefore match records with otherwise lower confidence on the same postcode. This should only be used where there is a very high confidence level about the postcode or in manual matching

* When Ambiguous=1 option is used an additional field is returned: ambigRecs, which lists the ambiguous matches for this input record.

** Dedup and DedupFields are meant to be used together. When these options are used additional field is returned: DedupStatic – a number, which will be the same for the duplicates.

Line Squeezing

This allows you to specify field lengths and a fixed town field as well as to optionally include the county which allows for more control over squeezing fields.

Example: addr1:60@addr2:60@addr3:60 squeezes the address fields except the postcode (property, street, town) into 3 fields, concatenating fields as required to do so.

The below table gives optional fields that may help in squeezing fields:

ParameterDescription
fixtown=(n)Fix the town to the (n) address field
upper(field)=1Sets the field to upper case. Eg uppertown=1 sets town to upper case
includeCounty=YIncludes the county if a dedicated county field has not already been specified
includeCounty=SThe county is included if there is space

Compatibility Information

A compatibility layer is provided that aliases old-style requests to API v1 and provides any omitted functionality so that existing API users can migrate to the new API without any issues. All functionality, as documented in the current evolution API, should function with this in-place.

For clarity, the cleaning options from the older style relate to the following API v1 options:

Previous Implementation CodeNew Refiner Parameter
0Standard cleaning (no additional options unless specified)
1&postcodeonly=1
2&fullmatch=1
3&attachmode=1
T&ambiguous=1
S&interactive=1
P&poboxlast=1
L&retainalias=1
W&nodefaultdps=1
O&noorgfill=1
U&postcodecorrect=1
Fno equivalent but is taken account of
Compatibility CodesNew Refiner CodeDescription
302301Full DPS Match Limited
-101-1No Match Found
-102-2Ambiguous Postcode
-103-3Suggest Record
-104-4Ambiguous Match
-105-5International Address
-106-6No Record Data

Nearest Installed

Note: This is an installed product only.

This data parameter is used to find the Nearest in your database to a specified postcode or location.

Database Parameters for Nearest

When using Nearest you will also need to specify the following parameter to specify the database to use (this is connected too on the server-side):

ParameterDescription
DBConnectThe name of the database to connect to as defined by aΒ nameΒ section inΒ nearest.xml

As a security precaution, only databases specified inΒ nearest.xmlΒ can be connected to and the settings which are used are specified in thatΒ .xml file. TheΒ nearest.xml file will already be located in your PCE install locationΒ and has a section calledΒ nameΒ whereΒ DBnameΒ is the name used in theΒ DBConnectΒ parameter for PCE calls.

Settings

All of the below settings can be added and amended in the Nearest XML located in the install location.

This set of sections specify each Nearest database table in use, most customers will only have one but an infinite number is supported. The settings for each database are as follows:

nameThe name used for the database via the dbconnect URL parameter.
typeThe type of database: CSV, DBASE and MYSQL are supported on Linux.
fileNameFor CSV and DBASE Only: Specifies the path to the database file.
serverFor MySQL Only: Specifies the server name or IP address of the MySQL server.
databaseFor MySQL Only: Specifies the database to connect to.
sqlFor MySQL Only: Query String to return the data, e.g. SELECT * FROM table.
uidFor MySQL Only: Provides username to connect to the MySQL instance with.
pwdFor MySQL Only: Provides password to connect to the MySQL instance with.
noHeadingsFor CSV Only: Set to 1 if the table has no field headings (field’s must be referred to by their column number in this case).
gridESpecifies the name of the Grid Easting field (or column number if numeric).
gridNSpecifies the name of the Grid Northing field (or column number if numeric).
oldGridsIf set to 1 specifies that grid fields contain 5 digit grids (as used by front-end and older databases).
listFieldsA comma separated list of database fields to output for the item when returning a Nearest record (or column numbers if numeric).
outputFieldsA comma separated list of database fields to return when standard fields are used (or column numbers if numeric).
updateFreqSpecifies the frequency in seconds to re-loadΒ  the database.Β  For example 300 would update the data every 5 minutes, 3600 would update it hourly.

[Nearest: phones4u]

Type=ODBC
Name=Phones4U
UID=username
testMD=password
SQL=SELECT * FROM NEAREST
Primary=Postcode
GridE=GridE
GridN=GridN
List=Miles,Postcode,Title

Phone Validation

Phone Result Codes

The below table describes the possible result codes and error messages when using the phone data product.

Result CodeDescription
1Live Number
-2Number not valid
-4Error contacting service
-7Data License Error

Live checks are performed on all UK Landline and Mobile numbers excluding 03 and 08 business numbers which are format verified. We live validate for a large number of international networks, where the live validation isn’t available for an international network we fall back to format verified.

Phone Example

JSON Format

https://pce.afd.co.uk/afddata.pce?data=phone&serial=333333&password=pwd&task=full&CountryISO=GBR&fields=standard&phone=01624%20811711&format=json

				
					{
  Result: "1",
  ErrorText: ""
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?data=phone&serial=333333&password=pwd&task=full&CountryISO=GBR&fields=standard&phone=01624%20811711&format=xml

				
					<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
</AFDPostcodeEverywhere>
				
			

Email Validation

A simple mistake in typing an email address makes it impossible for an email to reach the right recipient.

Email Result Codes

Result code 1

Description
Format Verified
Domain and Format Verified
Format Verified, Unable to make DNS Request
Format Correct, Unable to Open Connection
Format Correct, Mail Server Refused Connection
Format Correct, Mail Server Timeout
Format Correct, Mail Server Refused Server
Format Correct, Mail Server Refused Sender
Format Correct, Mail Server Refused IP
Format Correct, Mail Server Temporarily Unavailable
Format Correct, Mail Server Invalid
Email Address Live Verified
Email Address Verified

Result Code -2

Description
Format Invalid
Unknown Top Level Domain
Domain-Specific Format Invalid
Invalid Email, Mail Server Not Found
Mail Server Rejected Email Address
Invalid Email Address. Contains whitespace.

Additional Functionality for Email

LocalChecked
Boolean value that indicates if the local part of the address has been checked (1) or not (0).

AcceptsAll
Boolean value that indicates if the actual address is verified if applicable (0) or if it accepts all emails (1).

FormatVerified
This helps add confidence for corporate email addresses where the server accepts all fields or refused the validation request.
It attempts to verify if the format is in-line with those used.

ValueDescription
PresentThe email address is present on the website – therefore as good as a live validation. In this case, we will also update the other values to reflect this and give a full positive response.
FormatThe email address is in the format of those present on the website (e.g. if other emails are firstname.lastname@afd.co.uk this will return β€œtrue” for others in the same format).
FailThe email address differs from other formats found.
(blank)This field is blank if the check is unnecessary (e.g. full live verification occurred), or not possible (e.g. there is no website configured for the domain or none or too few email addresses found to verify).

Note: This is only done on email addresses that AcceptsAll=1.

Suggested
Regardless of if the email address validates this provides the suggested email address if it contains a misspelled domain name (for example gmai.com instead of gmail.com), or misformatted address, e.g. jon.@gmailcom becomes john@gmail.com

  • The data file will contain a list of known variants for large well-known domains such as gmail.com.
  • For other domains if the validation fails it will try possible single character variants to suggest an alternative and provides it if it passes validation itself.
  • If the domain is fine but the first part of the address fails and contains a possibly misspelled name it will try the corrected variant.
  • Additionally if it contains a duplicated character (e.g. two dots), or unexpected punctuation or characters it will try without those and substituting any obvious ones (e.g. characters above numbers).

Spelling
Boolean value that indicates if there is no spelling error detected (0) or if a spelling error is likely (1).

NonStandard
Boolean value that indicates if no non-standard characters are present (0) or if there are non-standard characters present in the email address (1).
Example email address: john!??{@afd.co.uk. This is a valid email address but would seem unusual.

Note: This is only for valid email addresses.

Reachable
Boolean value that indicates if the mail server is non-reachable (0) or if it is reachable (1).

Dummy
Boolean value that indicates if the address is not detected as a dummy address (0) or if it is likely to be a dummy/test email address (1).

Throwaway
These are known domains that allow accounts to be created that self-destruct after a certain time, intended for sign-ups, etc.
Boolean value that indicates if the address is not a known throwaway domain (0) or if it is (1).

Generic
Boolean value that indicates if the address is not a known generic email (0) or if it is (1).
Example email addresses: support@afd.co.uk, accounts@afd.co.uk, etc.

Validation Types

Full Example

task=full does full checks on the format of the email address, a DNS lookup for the MX record.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=full&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Email: "support@afd.co.uk",
      Status: "Email Address Verified",
      LocalChecked: 0,
      AcceptsAll: 0,
      FormatVerified: "",
      Suggested: "",
      Spelling: 0,
      NonStandard: 0,
      Reachable: 0,
      Dummy: 0,
      Throwaway: 0,
      Generic: 1
    }
  ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=full&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=xml

				
					<AFDPostcodeEverywhere>
<Result>1</Result>
<ErrorText/>
<Item value="1">
<Email>support@afd.co.uk</Email>
<Status>Email Address Verified</Status>
<LocalChecked>0</LocalChecked>
<AcceptsAll>0</AcceptsAll>
<FormatVerified/>
<Suggested/>
<Spelling>0</Spelling>
<NonStandard>0</NonStandard>
<Reachable>0</Reachable>
<Dummy>0</Dummy>
<Throwaway>0</Throwaway>
<Generic>1</Generic>
</Item>
</AFDPostcodeEverywhere>
				
			

Live Example

Validate email format, top-level domain, and server response for the full email address (if enabled on the server) – task=live does the same as task=full but also does a live validation by connecting to the registered email server and testing to see if the email is accepted for that address, where the destination server allows that.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=live&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Email: "support@afd.co.uk",
      Status: "Email Address Live Verified",
      LocalChecked: 1,
      AcceptsAll: 1,
      FormatVerified: "Present",
      Suggested: "",
      Spelling: 0,
      NonStandard: 0,
      Reachable: 1,
      Dummy: 0,
      Throwaway: 0,
      Generic: 1
    }
  ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=live&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=xml

				
					<AFDPostcodeEverywhere>
<Result>1</Result>
<ErrorText/>
<Item value="1">
<Email>support@afd.co.uk</Email>
<Status>Email Address Live Verified</Status>
<LocalChecked>1</LocalChecked>
<AcceptsAll>1</AcceptsAll>
<FormatVerified/>
<Suggested/>
<Spelling>0</Spelling>
<NonStandard>0</NonStandard>
<Reachable>1</Reachable>
<Dummy>0</Dummy>
<Throwaway>0</Throwaway>
<Generic>1</Generic>
</Item>
</AFDPostcodeEverywhere>
				
			

TLD Example

Validate email format is correct and the top-level domain exists.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=tld&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Email: "support@afd.co.uk",
      Status: "Format Verified",
      LocalChecked: 0,
      AcceptsAll: 0,
      FormatVerified: "",
      Suggested: "",
      Spelling: 0,
      NonStandard: 0,
      Reachable: 0,
      Dummy: 0,
      Throwaway: 0,
      Generic: 1
    }
  ]
}
				
			

XML Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=tld&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=xml

				
					<AFDPostcodeEverywhere>
<Result>1</Result>
<ErrorText/>
<Item value="1">
<Email>support@afd.co.uk</Email>
<Status>Format Verified</Status>
<LocalChecked>0</LocalChecked>
<AcceptsAll>0</AcceptsAll>
<FormatVerified/>
<Suggested/>
<Spelling>0</Spelling>
<NonStandard>0</NonStandard>
<Reachable>0</Reachable>
<Dummy>0</Dummy>
<Throwaway>0</Throwaway>
<Generic>1</Generic>
</Item>
</AFDPostcodeEverywhere>
				
			

Format Example

Validates if the email address format is correct only.

JSON Example

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=format&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Email: "support@afd.co.uk",
      Status: "Format Verified",
      LocalChecked: 0,
      AcceptsAll: 0,
      FormatVerified: "",
      Suggested: "",
      Spelling: 0,
      NonStandard: 0,
      Reachable: 0,
      Dummy: 0,
      Throwaway: 0,
      Generic: 1
    }
  ]
}
				
			

XML Example

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=format&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=xml

				
					<AFDPostcodeEverywhere>
<Result>1</Result>
<ErrorText/>
<Item value="1">
<Email>support@afd.co.uk</Email>
<Status>Format Verified</Status>
<LocalChecked>0</LocalChecked>
<AcceptsAll>0</AcceptsAll>
<FormatVerified/>
<Suggested/>
<Spelling>0</Spelling>
<NonStandard>0</NonStandard>
<Reachable>0</Reachable>
<Dummy>0</Dummy>
<Throwaway>0</Throwaway>
<Generic>0</Generic>
</Item>
</AFDPostcodeEverywhere>
				
			

Local Example

Validate email format, top-level domain and for well-known domains carry out additional checks of the local portion of the address.

JSON Format

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=local&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=json

				
					{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Email: "support@afd.co.uk",
      Status: "Domain and Format Verified",
      LocalChecked: 0,
      AcceptsAll: 0,
      FormatVerified: "",
      Suggested: "",
      Spelling: 0,
      NonStandard: 0,
      Reachable: 0,
      Dummy: 0,
      Throwaway: 0,
      Generic: 1
    }
  ]
}
				
			

XML Example

https://pce.afd.co.uk/afddata.pce?data=email&serial=333333&password=pwd&task=local&CountryISO=GBR&fields=standard&email=support@afd.co.uk&format=xml

				
					<AFDPostcodeEverywhere>
<Result>1</Result>
<ErrorText/>
<Item value="1">
<Email>support@afd.co.uk</Email>
<Status>Domain and Format Verified</Status>
<LocalChecked>0</LocalChecked>
<AcceptsAll>0</AcceptsAll>
<FormatVerified/>
<Suggested/>
<Spelling>0</Spelling>
<NonStandard>0</NonStandard>
<Reachable>0</Reachable>
<Dummy>0</Dummy>
<Throwaway>0</Throwaway>
<Generic>1</Generic>
</Item>
</AFDPostcodeEverywhere>
				
			

Best Practice Guide

There is no one-size-fits-all approach for email validation as depending on the use of the data or the interface presented may impact decisions over design. This guide is designed to help outline best practices when using email validation.

For the vast majority of users, a simple valid or not is all that is required and if it is invalid, the user needs to check/re-enter it.

AFD only returns a -2 invalid response when we can guarantee an invalid address, any uncertainty is returned as valid. This uncertainty can be caused by a number of reasons such as temporarily being unable to connect to the server.

Depending on your individual needs you may wish to be stricter with what you do and don’t allow. In this case, we suggest that you base your validation rules not only on the Result but also on the Status. Anything more can over-complicate a system or interface.

In most cases, best practice with email validation on a website is to call the validation routines when a user enters an address. If it fails validation, then the user will be prompted to correct it. If not already doing so, it may be useful to prompt the user to double-check or re-enter the email address if the validation times out or live validation is not possible, so the address can be double checked. You may also like to reject or prompt if an address is indicated to be a dummy address (normally a test address rather than a genuine account).

If you wish to have direct contacts rather than generic addresses (e.g., not things like sales@, support@ etc.), you might want to request an alternative if that flag is set. However, outright rejection needs to be carefully considered as, for example, a small company may have that as their only business email and a single person is receiving those emails.

While systems do not always allow you to do so, it is useful to store if an email address has been fully live validated or not. This can then allow records to be manually reviewed later if feasible. For example, if an email address was not live validated or timed out, you know there is a higher chance it might be incorrect, and you might want to check it manually or if the customer calls in, etc.

Due to the complexities of email addresses, it must always be remembered that some (particularly personal email addresses) can be quite unusual but still be valid. Only if an email address is returned as invalid is it definitely invalid, and if it’s a live validation that can change at any point in time (e.g., email address is created, re-enabled, etc.).

Suggestions may want to be used to help the end user/operator see what the address might be intended to be if it fails validation or if the email address has been mistyped. However, it is important to check the suggestion with the user to ensure it is not being mis-corrected. Remember, suggestions are simply that – suggestions of what may be more likely, not corrections. The full status may be useful but depending on the level of understanding of the operator, a simple pass/failure/unable to live validate may be easier to work with.

Throwaways are temporary email addresses. If it’s for an email newsletter, then you may want to request a permanent address. However, if it’s for an online order you may decide to still accept it so you can get the order, even though you know the email address will cease to exist later – though you may want to insist on something permanent. In some systems, it may act more as a fraud flag – i.e., you don’t want to reject it at the point of entry, but you want to flag it (for example, applying for a loan with a throwaway email might be considered suspicious – perhaps the person is hoping to become un-contactable later etc.).

Please note that we do offer a service for batch email validation. If this is a service you would be interested in, please contact your AFD Account Manager who can provide details and further information.

Other Features

Determining the Product in Use

When integrating with Address Management products the same code will work with any of our Address Management products (AFD Postcode, AFD Postcode Plotter, AFD Postcode Plus and AFD Names & Numbers).

It is not normally necessary to determine which product has been used as you can integrate with one, e.g. Names & Numbers and the user can use any of our address management products – they will just have less data returned depending on the product they have. However, if for any reason, such as disabling/enabling features of your product – you can use the Product field if you wish to determine which product the user has and that has been used by the Service.

The Product field will contain one of the following values depending on the product being used:

  • AFD Postcode
  • AFD Postcode Plotter
  • AFD Postcode Plus
  • AFD Names & Numbers

Note that when carrying out a BankFinder operation AFD BankFinder will always be the product name returned.

DX Member Data

DX Members can have access to DX data from within Postcode Plus, Names & Numbers and the API. This enables you to lookup and search for DX addresses just as you can do with Royal Mail postal addresses. Uniquely, the API also allows you to easily identify DX addresses associated with a PAF address to route your mail through a DX member’s box wherever possible resulting in savings over Royal Mail.

Postcode Evolution will automatically return a DXNumber and DXExchange field in the XML if you have the DX data enabled.

Fast-find functionality works with DX data as well as postal data. For example, as well as looking up a postcode you can also carry out a fast-find for a DX number and searching for an organisaiton name with fast-find will search both postal and DX data. This allows you to easily combine your lookup’s. When searching you can either search the standard postal fields or specify the DX Number, organisation, exchange or profession to search theDX data instead. (If you only want to specify one set of search fields in your application then placing DX followed by the DX number in the normal street field will work too – town can then be used to specify the exchange if desired).

When results are returned following any lookup or search if the address is also a DX Member the DXNumber, DXExchange and DXProfession fields will also be returned to indicate this. You can format a DX address as follows for printing:

LabelAddress
OrganisationGateley LLP
DXNumberDX 14317
DXExchangeMANCHESTER
DXProfessionSolicitor

International Data

Customers signed up to use our International data service can lookup and search for international addresses in exactly the same way as you do for UK based addresses. The only difference in normal operation is the need to specify the Country or CountryISO code (as parameters in the GET request) of the country that you wish to use in all lookup, search and record retrieval operations.

Making use of the data returned

If you have opted to use Standard, Raw PAF, or BS7666 fields the data will be returned in the same fields as those for the UK (including county in some cases) which you can use to store the data in your database in the same format as you do for UK addresses.

However, when it comes to generating an address label, you should note that the formatting rules for addresses vary from country to country (for example in many Western European countries the post/zip code comes before the town on the same line). Unless you have your own printing or formatting routines for the country in question, you may therefore actually prefer to use our International address format which provides both the consistuent address fields (broadly the same as Raw PAF fields but also adding the Principality, Region and Cedex which is relevant to some international addresses) as well as address label formatted fields (address1 through to address7). This enables you to both have a structure ideal for data storage and for label formatting.

If you need to store addresses in a more UK based format, but then need to format them for printing you can easily do so by carrying out a search operation specifying the address data with the International field type to obtain the address for printing at the time that you wish to generate an address label.

Notes regarding International addressing

It is important to note that the standards regarding what is an acceptable address vary widely from country to country as do the levels of data which are available. For example while one country may have full address data from Organisation down, another may only be at street or even locality level. So you must accommodate for different levels of data coming back and therefore differing amounts of manual entry which may be required by users of your software to provide a complete address.

mailLink mailLink

We are here to help

We serve thousands of organisations and a network of hundreds of partners across multiple industry sectors, enabling them to have full confidence in their contact data.