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 al lowing 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

System Requirements: 12GB RAM/12GB HDD Space.

  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
UserIDEnables 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))
MaxQuantitySpecifies 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></ErrorText>
  <Item value="1">
    <Postcode>B6 4AA</Postcode>
    <PostcodeFrom></PostcodeFrom>
    <List>B6 4AA Royal Mail, Birmingham Mail Centre, St. Stephens Street, BIRMINGHAM</List>
    <Key>338899</Key>
    <CountryISO>GBR</CountryISO>
  </Item>
</AFDPostcodeEverywhere>

Changing the Data Update time

  • Stop the service
  • Navigate to C:\Program Files\AFD Software\Postcode Evolution\ and open pceConfig.xml
  • Locate the < update> section and change the time value for < CheckTimeProductName> where ProductName is your product
  • Save the file
  • Restart the service
If a manual update is required, please contact our Support team at support@afd.co.uk or call on 01624 811711 and we will assist you with the necessary details.

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.

ProductDataCountryISODescription
Postcode / PlotteraddressGBRUK thoroughfare (see Section 6) (street) level address data
Postcode PlusaddressGBRUK address level data with postcode level grids
Postcode Plus BusinessaddressGBRUK address level data with postcode level grids and business data
Eircode ValidationaddressIRLIrish address data
ZipAddressaddressUSAUSA address data
WorldAddressaddressSee ListRest of world not including GBR, USA and IRL
Names & NumbersaddressGBRUK address level data with postcode level grids, business data and electoral roll information
BankFinderbankGBR,IRL or ALLBACS (GBR) and IPSO (IRL) data and validation
EmailemailGBRProvides access to Email validations (see Section 14)
PhonephoneALLProvides access to Phone validations (see Section 13)
RefinerrefinerGBRProvides access to Refiner (see Section 10)
NearestnearestGBRProvides access to Nearest (see Section 12)
GridgridGBRProvides access to Grid (see Section 8)
ListlistGBRProvides 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 PresetValid for Data SelectorsDescription
ListAddress (see Section 6), Bank (see Section 9), Nearest (see Section 12)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.
RawAddress (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.
BS7666Address (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.
USAZipAddress onlyReturns fields in the format used in the USA when used with ZipAddress for looking up US addresses.
SimpleAddress (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.
InternationalAddress (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.
AccountBank (see Section 9)Contains applicable fields for Account Number validation.
CardBank (see Section 9)Contains applicable fields for Card Number validation.
GeoListAddress (see Section 6)Only returns fields specifically for the task fastfindgeo, along with any special data sets.
FflistAddress (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 12), 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, PostcodePlus Business, 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 PlusPostcode Plus Bus.Names & NumbersZipAddressWorldAddressEircode 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   
What3Words ** 120Text     
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     
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     
USRN (Unique Street 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    
Dependent
Locality
70Text   
Dependent
Thoroughfare
40Text   
Double
Dependent
Locality
40Text   
Organisation
Name
50Text   
Incode 5Text   
Outcode 5Text   
FlatFlag ** 1Text     
ParentUPRN ** 12Text      
BLPUStatus ** 1Text      
AbaseClassification ** 6Text      

AbaseClassification

The AbaseClassification is made of up to 6 characters.

Character one represents the Primary Code, character two represents the secondary code, characters three & four represent the tertiary code and characters five & six, when shown, represent the quaternary code.

For more information, please see the OS Classification Scheme.

NOTE: FlatFlag functionality is currently not available on desktop versions.

* 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

For more field options, please see below.

Fieldname Field Length Data Type Postcode Postcode Plus Names & Numbers ZipAddress WorldAddress Eircode Validation
Organisation Name 60 Text
Department 60 Text
SubBuilding 60 Text
Building 60 Text
Number 10 Numeric
Dependant Thoroughfare 60 Text
Thoroughfare 60 Text
Double Dependant Locality 35 Text
Dependant Locality 35 Text
Town 30 Text
Postcode 10 Text
Fieldname Field Length Data Type Postcode Postcode Plus Names & Numbers ZipAddress WorldAddress Eircode Validation
Identifier 8 Numeric
BuildDate 10 Text
Administrator 20 Text

Language

5 Text
Department 60 Text
Organization 60 Text
SubUnit 60 Text
BuildingName 60 Text
BuildingNumber 10 Numeric
SubStreet 60 Text
DeliveryStreet 60 Text
SubLocality 60 Text
DeliveryLocality 60 Text
DeliveryTown 30 Text
Code 10 Text
Fieldname Field Length Data Type Postcode Postcode Plus Names & Numbers ZipAddress WorldAddress Eircode Validation
ZipCode 20 Text
Key 8 Numeric
List 512 Text
CountryISO 3 Text
Recipient 120 Text
Secondary 120 Text
Primary 120 Text
Urbanization 60 Text
City 30 Text
State 30 Text
RecordType 30 Text
CarrierRouteID 4 Text
LACSStatus 2 Text
FinanceNumber 7 Numeric
Congressional District 3 Numeric
CountyNumber 4 Numeric
CountyName 26 Text
City Abbreviation 14 Text
Product 40 Text
Country 30 Text
Congressional District 40 Text
Fieldname Field Length Data Type Postcode Postcode Plus Names & Numbers ZipAddress WorldAddress Eircode Validation
Address1-7 120 Text
Principality 60 Text
Region 60 Text
Cedex 60 Text
Country 30 Text
CountryISO 3 Text
Fieldname Field Length Data Type Postcode Postcode Plus Names & Numbers ZipAddress WorldAddress Eircode Validation
AliasLocalities 4 Text
CountryISO 35 Text
Fieldname Field Length Data Type Postcode Plus
EPCBuiltForm** 40 Text
EPCCO2EmissionsCurrent** 40 Text
EPCCO2EmissionsCurrent PerFloorArea** 40 Text
EPCCO2EmissionsPotential** 40 Text
EPCConstructionAgeBand** 40 Text
EPCCurrentEnergyRating** 40 Text
EPCEnergyConsumptionCurrent** 40 Text
EPCEnergyConsumptionPotential** 40 Text
EPCEnergyTariff** 40 Text
EPCEnvironmentalImpactCurrent** 40 Text
EPCEnvironmentalImpactPotential** 40 Text
EPCExtensionCount** 40 Text
EPCFixedLightingOutletsCount** 40 Text
EPCFlatStoreyCount** 40 Text
EPCFlatTopStorey** 40 Text
EPCFloorDescription** 40 Text
EPCFloorEnergyEfficiency** 40 Text
EPCFloorEnvironmentalEfficiency** 40 Text
EPCFloorHeight** 40 Text
EPCFloorLevel** 40 Text
EPCGlazedArea** 40 Text
EPCGlazedType** 40 Text
EPCHeatLossCorridor** 40 Text
EPCHeatingCostCurrent** 40 Text
EPCHeatingCostPotential** 40 Text
EPCHotWaterCostCurrent** 40 Text
EPCHotWaterCostPotential** 40 Text
EPCHotWaterDescription** 40 Text
EPCHotWaterEnergyEfficiency** 40 Text
EPCHotWaterEnvironmentalEfficiency** 40 Text
EPCInspectionDate** 40 Text
EPCLightingCostCurrent** 40 Text
EPCLightingCostPotential** 40 Text
EPCLightingDescription** 40 Text
EPCLightingEnergyEfficiency** 40 Text
EPCLightingEnvironmentalEfficiency** 40 Text
EPCLowEnergyFixedLightCount** 40 Text
EPCLowEnergyLighting** 40 Text
EPCMainFuel** 40 Text
EPCMainHeatControlsDescription** 40 Text
EPCMainHeatControlsEnergyEfficiency** 40 Text
EPCMainHeatControlsEnvironmental Efficiency** 40 Text
EPCMainHeatDescription** 40 Text
EPCMainHeatEnergyEfficiency** 40 Text
EPCMainHeatEnvironmentalEfficiency** 40 Text
EPCMainHeatingControls** 40 Text
EPCMainsGasFlag** 40 Text
EPCMechanicalVentilation** 40 Text
EPCMultiGlazeProportion** 40 Text
EPCNumberHabitableRooms** 40 Text
EPCNumberHeatedRooms** 40 Text
EPCNumberOpenFireplaces** 40 Text
EPCPhotoSupply** 40 Text
EPCPotentialEnergyRating** 40 Text
EPCPropertyType** 40 Text
EPCRoofDescription** 40 Text
EPCRoofEnergyEfficiency** 40 Text
EPCRoofEnvironmentalEfficiency** 40 Text
EPCSecondaryHeatDescription** 40 Text
EPCSheatingEnergyEfficiency** 40 Text
EPCSheatingEnvironmentalEfficiency** 40 Text
EPCSolarWaterHeatingFlag** 40 Text
EPCTenure** 40 Text
EPCTotalFloorArea** 40 Text
EPCTransactionType** 40 Text
EPCUnheatedCorridorLength** 40 Text
EPCWallsDescription** 40 Text
EPCWallsEnergyEfficiency** 40 Text
EPCWallsEnvironmentalEfficiency** 40 Text
EPCWindTurbineCount** 40 Text
EPCWindowsDescription** 40 Text
EPCWindowsEnergyEfficiency** 40 Text
EPCWindowsEnvironmentalEfficiency** 40 Text
**None of these are searchable and all require an additional license.
Fieldname Description Code Result Result Description Postcode Plus Postcode Plus Business
LoneParent Lone Parent Derived 0 No
1 Yes
NumKids Number of Children under 18 at property Actual, imputed where unknown 0 0 Children
1 1 Child
2 2 Children
3 3+ Children
Lifestage Individual Lifestage Derived 1 Young Adults Still At Home (18-24, living at home)
2 Starting Out (18-24, left home)
3 Young and Single (25-34, single)
4 Young Couple (25-34, no children)
5 Older and Single (35-44, single, no children)
6 Older Couple (35-44, no children)
7 Pre-School Family (25-44, youngest child 0-4)
8 Young Family (25-44, youngest child 5-7)
9 Developing Family (25-44, youngest child tends to be 8-10)
10 Established Family (35-44, youngest child 11+)
11 Mature Family (45-54, children tend to be 11-16)
12 Adult Family (45-64, grown up children still at home)
13 Middle Age and Single (45-54, single, no children)
14 Middle Age Couple (45-54, couple, no children at home)
15 Mature Single (55-64, no partner)
16 Working Empty Nesters (55-64, couple, not retired, no kids at home)
17 Retired Empty Nesters (55-64, couple, retired, no kids)
18 Working Pensioner (65-74, still working)
19 Retired Single (65-74, retired, no partner)
20 Retired Couple (65-74, retired, partner)
21 Elderly Single (75+, no partner)
22 Elderly Couple (75+, couple)
HouseholdComposition Summary Household Composition Derived A Female Single
B Male/Gender Unknown Single
C Married Couple
D Cohabiting Couple
E Two Person Household
F Married Family – Grown-Up Children at Home
G Non-Married Family – Grown-Up Children at Home
H Married Couple and 1 Other Adult
I Married Couple and 2+ Other Adults
J Cohabiting Couple and 1+ Other Adults
K Mixed Household of 3+ Adults
HouseholdSize Household Size-number of adults in household Derived/Modelled 1 1 Adult in Household
2 2 Adults in Household
3 3 Adults in Household
4 4 Adults in Household
5 5+ Adults in Household
HouseholdChild_0_4 Has Child in household 0-4 years old Actual, imputed where unknown 0 No
1 Yes
HouseholdChild_5_7 Has Child in household 5-7 years old Actual, imputed where unknown 0 No
1 Yes
HouseholdChild_8_10 Has Child in household 8-10 years old Actual, imputed where unknown 0 No
1 Yes
HouseholdChild_11_16 Has Child in household 11-16 years old Actual, imputed where unknown 0 No
1 Yes
HouseholdChild_17_21 Has Child in household 17-21 years old Actual, imputed where unknown 0 No
1 Yes
HomeOwnership Home Ownership Status Actual, imputed where unknown 1 Home Owner
2 Rent – Council
3 Rent – Private
4 Living with Parents
HavePets Has Pets (any undefined pet, including cat and/or dog)) Actual, imputed where unknown 0 No
1 Yes
HaveCat Has Cat (specifically) Actual, imputed where unknown 0 No
1 Yes
HaveDog Has Dog (specifically) Actual, imputed where unknown 0 No
1 Yes
RenewalMonthHome Home Insurance Renewal Month (joint buildings and contents_ Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthContents Contents Insurance Renewal Month (just contents insurance renewal) Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthBuilding Buildings Insurance Renewal Month (just buildings insurance renewal month, no contents) Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthMotor Motor Insurance Renewal Month Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthCar Car Insurance Renewal Month Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthVan Van Insurance Renewal Month Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthPets Pet Insurance Renewal Month Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthTravel Travel Insurance Renewal Month Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
RenewalMonthBike Motorbike Insurance Renewal Month Actual 1 January
2 February
3 March
4 April
5 May
6 June
7 July
8 August
9 September
10 October
11 November
12 December
ResType Type of Residence Actual 1 Terraced
2 Detached
3 Semi Detached
4 Flat/Maisonette
5 Bungalow
6 Chalet
8 Mobile Home
9 Caravan
Bedrooms The number of bedrooms in a property 0 0 Bedrooms
1 1 Bedroom
2 2 Bedrooms
3 3 Bedrooms
4 4 Bedrooms
5 5 Bedrooms
6 6 Bedrooms
7 7+ Bedrooms
NULL
TotalRooms The number of rooms within a property excluding bathrooms and kitchen 1 1 Room
2 2 Rooms
3 3 Rooms
4 4 Rooms
5 5 Rooms
6 6 Rooms
7 7 Rooms
8 8 Rooms
9 9 Rooms
10 10 Rooms
11 11 Rooms
12 12 Rooms
13 13 Rooms
14 14 Rooms
15 15 Rooms
16 16+ Rooms
NULL
YearOfBuild The year the property has been recorded as being built Populated Year Of Build Populated
NULL
CurrentPropValue The current estimated value of the property, based on Land Registry data Populated Current Property Value Populated
NULL
CurrentListingStatus The current listing status of the property, e.g. Available or Under Offer 0 Available
1 Sold Subject to Contract
2 SSTCM (Scotland only)
3 Under Offer
4 Reserved (Renting only)
5 Let Agreed (Renting only)
NULL
LastTransactionDate The date of the last transaction recorded by the Land Registry (data goes back to 1995, exclusions apply) Populated Last Transaction Date Populated
NULL
HouseValueBand The estimated value of the property split into £100,000 bands for ease of selection 1 £0-£100,000
2 £100,000-£200,000
3 £200,000-£300,000
4 £300,000-£400,000
5 £400,000-£500,000
6 £500,000-£600,000
7 £600,000-£700,000
8 £700,000-£800,000
9 £800,000-£900,000
10 £900,000-£1,000,000
11 £1,000,000-£1,100,000
12 £1,100,000-£1,200,000
13 £1,200,000-£1,300,000
14 £1,300,000-£1,400,000
15 £1,400,000-£1,500,000
16 £1,500,000+
NULL
Listed Whether the property is listed by English Heritage, 0 Not listed
Cadw or Historic Scotland, and its category of listing 1 I or A
2 II* or B
3 II or C
NULL
Watercourse200M Flag indicating whether there is a watercourse within 200 metres 1 Yes
DistanceToWatercourse The distance (in metres) to a watercourse if it is within 200 metres 1 Distance To Watercourse within 200m Populated >0
NULL No watercourse within 200m
DistanceToRoad The distance to the centre line of the nearest road, not necessarily accessible Populated Distance To Road Populated >0
NULL
DistanceToTree The distance from the nearest tree over 10 metres Populated Distance To Tree Populated >0
tall to the property geocode NULL No relevant tree near
0 No watercourse within 200m
NULL
BurglaryRate The number of burglaries per property per year Populated Burglary Rate Populated >0
averaged over a LSOA 0
NULL
MainFuel The main type of fuel used by the property’s heating system 0 Gas
1 Electricity
2 Oil
3 Not known
4 Coal
5 LPG
6 Wood
7 None
8 B30K
9 Other
10 Biomass/Biogas
11 District heating
12 Waste heat
NULL
WallType What walls the property contains, possible values cavity wall, solid brick, sandstone, granite, timber frame, system built and SAP05 0 Cavity wall
1 Solid brick
2 Sandstone
3 Timber frame
4 Granite
5 System built
6 SAP05
7 Not known
NULL
HeatingType The main method of which the property is heated 1 Air Source
2 Boiler and Radiators
3 Boiler and Underfloor Heating
4 Community Scheme
5 Electric Underfloor Heating
6 Ground Source Heat Pump
9 Room Heaters – Electric
10 Room Heaters – Gas
11 Room Heaters – Solid Fuel
12 Room Heaters – Wood Fuel
13 Warm Air Heating
14 Water Source Heat Pump
15 Electric Storage Heater
NULL
RoofType The type of roof a property has (Flat, Pitched, Thatched) and its level of insulation 1 Flat – Insulated
2 Flat – Limited Insulation
3 Flat – No Insulation
4 Pitched – 100mm and under
5 Pitched – 101mm to 300mm
6 Pitched – 300mm+
7 Pitched – Insulated
8 Pitched – Limited Insulation
9 Pitched – No Insulation
10 Thatched
NULL
AvgRoofSlope The average slope of the property roof, can Populated Average Roof Slope Populated
be used to identify properties with flat roofs NULL
FlatRoofFraction The estimated fraction of a property which has a Populated Flat Roof Fraction Populated
flat roof NULL
NumberOfBathrooms 1 1
2 2
3 3
4 4
5 5+
Null Null (assumed 1)
HomeContentsCoverValue null null
100k 100k
10k 10k
15k 15k
20k 20k
25k 25k
300k+ 300k+
30k 30k
35k 35k
50k 50k
BuildingConstructionPeriod Building Construction Period 0 -1719 (old)
1 1720-1839 (Georgian)
2 1840-1919 (Victorian/Edwardian)
3 1920-1945 (Inter-war)
4 1946-1979 (Post war)
5 1980 to date (Modern)
Not known
Bungalow Bungalow 0 No
1 Yes
Product Name of AFD Product in use
Country the Country Name for the data returned
Building Construction Period 0 -1719 (old)
1 1720-1839 (Georgian)
2 1840-1919 (Victorian/Edwardian)
3 1920-1945 (Inter-war)
4 1946-1979 (Post war)
5 1980 to date (Modern)
Not known
EstimatedPropertyValue Actual, imputed where unknown Populated
NULL
PVLowerConfidenceLimit95 Populated
NULL
PVUpperConfidenceLimit95 Populated
NULL
EstimatedYearBuilt Populated
NULL
EstimatedYearBuilt_UpperLimit Populated
NULL
EstimatedYearBuilt_LowerLimit Populated
NULL

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).

{
  "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"
    }
  ]
}

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 Unique ID (for example, the Session ID) for each individual customer session. That ID should remain the same for a single search for an address regardless of how many keystrokes are used. It is specified using the &uniqueID= parameter in a GET request. This allows our billing system to make sure that each keypress is not being charged separately. We also recommend setting the Max Quantity parameter (&maxquantity=) to a number between 5 and 7 as this will increase the responsiveness of your TypeAhead control. Note that all prebuilt plugins with typeahead integrations set these parameters automatically.

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.

The addition of the &allpc=1 parameter means that the default max quantity for typeahead with be ignored when a postcode is entered.

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&allpc=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></ErrorText>
  <Item value="1">
    <Postcode>AB10 1BD</Postcode>
    <PostcodeFrom></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": "3388990",
      "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></ErrorText>
  <Item value="1">
    <Postcode>B6 4AA</Postcode>
    <PostcodeFrom></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": "3388990",
      "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></ErrorText>
  <Item value="1">
    <Postcode>B6 4AA</Postcode>
    <PostcodeFrom></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

{
  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"
    }
  ]
}

Nearest – Reverse GeoCode

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=geolist&CountryISO=GBR&task=nearest&maxquantity=5&longitude=-1.8714&latitude=52.4596&format=json

{
  Result: "1",
  ErrorText: "",
  Item: [
    {
      @value: "1",
      Postcode: "B11 1AA",
      PostcodeFrom: "",
      List: "S A Furniture, 292-294 Stratford Road, Sparkhill, BIRMINGHAM, B11 1AA",
      Key: "379667",
      CountryISO: "GBR",
      GridE: "408836",
      GridN: "284626",
      Latitude: "52.4596",
      Longitude: "-1.8714"
    }
  ]
}

XML Format

https://pce.afd.co.uk/afddata.pce?data=address&serial=333333&password=pwd&uniqueID=abcd123&fields=geolist&CountryISO=GBR&task=nearest&maxquantity=5&longitude=-1.8714&latitude=52.4596&format=xml

<AFDPostcodeEverywhere>
  <Result>1</Result>
  <ErrorText/>
  <Item value="1">
    <Postcode>B11 1AA</Postcode>
    <PostcodeFrom/>
    <List>S A Furniture, 292-294 Stratford Road, Sparkhill, BIRMINGHAM, B11 1AA</List>
    <Key>379667</Key>
    <CountryISO>GBR</CountryISO>
    <GridE>408836</GridE>
    <GridN>284626</GridN>
    <Latitude>52.4596</Latitude>
    <Longitude>-1.8714</Longitude>
  </Item>
</AFDPostcodeEverywhere>

What3Words

This functionality is available with an additional license, in Postcode Plus and Postcode Plus Business and is offered only as a Hosted solution.

AFD’s Typeahead functionality has been expanded to offer the use of What3Words. When you enter an address, the typeahead call will respond as normal regardless of what w3wMode you select. When you type in a What3words into typeahead, addresses nearest that location will be returned. What3words are recognized by typeahead due to their characteristics of three words separated with dots i.e ///word.word.word or word.word.word.

The API returns a W3W item at the start of the XML or JSON that provides the W3W looked up, this is useful for knowing where the result has come from. The API will accept input with or without the leading forward slashes.
AFDs What3Word functionality has two modes; These modes are enabled using the parameter &w3wMode=

Mode NumberMode ValueDescriptionExample Parameter
0AutoUsed for compatibility testing. Returns the exact or first suggestion auto-lookup and is the default mode if omitted.&w3wMode=0 or &w3wMode=Auto
1 (Recommended)ChoicesSimilar to AFDs address typeahead this mode offers auto-suggest, returning a list of suggested What3Words. From this list, the key can then be used to “retrieve” in a second call the nearest addresses for the chosen suggestion.&w3wMode=1 or &w3wMode=Choices

Example – w3wmode=0

This example below will return the nearest addresses to ///almost.footsteps.flopping

JSON Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&format=json&data=address&task=fastfindv4&fields=list&uniqueid=000&lookup=almost.footsteps.flopping

{
    "Result": "1",
    "ErrorText": "",
    "W3W": "///almost.footsteps.flopping",
    "Item": [
        {
            "@value": "1",
            "Postcode": "CA11 8SG",
            "PostcodeFrom": "",
            "List": "CA11 8SG    Penrith Golf Club, Salkeld Road, Maidenhill, PENRITH",
            "Key": "3893654",
            "CountryISO": "GBR"
        },
        {
            "@value": "2",
            "Postcode": "CA11 8SF",
            "PostcodeFrom": "",
            "List": "CA11 8SF    The Spinney, Green Lane, Greengill, PENRITH",
            "Key": "3893653",
            "CountryISO": "GBR"
        }
    ]
}

Example – w3wmode=1

This example has returned a list of suggested What3Words. This mode will not return any addresses and will return a list of suggestions even if an exact What3Words is entered. Once the What3Word has been selected a retrieve call can be made to return the nearest addresses, once you have drilled down to the addresses the key corresponding to the address can be used in a further retrieve to bring back additional address information relating to that address.

FastFindv4

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&format=json&data=address&fields=list&task=fastfindv4&uniqueid=000&lookup=radio.pizza.bank&w3wmode=1

{
    "Result": "1",
    "ErrorText": "",
    "Suggestion": "What3Words",
    "Item": [
        {
            "@value": "1",
            "List": "///radio.pizza.bank",
            "Near": "Upminster, London",
            "Key": "radio.pizza.bank"
        },
        {
            "@value": "2",
            "List": "///radio.pizza.sank",
            "Near": "Queensferry, Edinburgh",
            "Key": "radio.pizza.sank"
        },
        {
            "@value": "3",
            "List": "///radio.pizza.backs",
            "Near": "Ingatestone, Essex",
            "Key": "radio.pizza.backs"
        }
    ]
}

Retrieve

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&format=json&Format=json&data=address&fields=list&task=retrieve&uniqueid=000&key=radio.pizza.bank&w3wmode=1
{
    "Result": "1",
    "ErrorText": "",
    "W3W": "///radio.pizza.bank",
    "Item": [
        {
            "@value": "1",
            "Postcode": "RM14 2LX",
            "PostcodeFrom": "",
            "List": "RM14 2LX    21 Bridge Avenue, UPMINSTER",
            "Key": "20449483///radio.pizza.bank",
            "CountryISO": "GBR"
        },
        {
            "@value": "2",
            "Postcode": "RM14 2LX",
            "PostcodeFrom": "",
            "List": "RM14 2LX    19 Bridge Avenue, UPMINSTER",
            "Key": "20449481///radio.pizza.bank",
            "CountryISO": "GBR"
        }
    ]
}...

Focus

There is an additional focus option that gives weight to What3Words nearer specified Latitude and Longitude values. This option is recommended where the end user is at the location you wish to capture, you can pass the location of the device in the latitude and longitude parameters. This call also returns the distance from the input latitude and longitude in miles and kilometres.

Example

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&format=json&data=address&fields=list&task=fastfindv4&uniqueid=test&lookup=squad.follow.jol&w3wmode=1&longitude=-3.188267&latitude=55.953251

{
  "Result": "1",
  "ErrorText": "",
  "Suggestion": "What3Words",
  "Item": [
    {
      "@value": "1",
      "List": "///squad.following.pull",
      "Near": "Whitburn, West Lothian",
      "Key": "squad.following.pull",
      "Miles": "20.93",
      "Km": "33.68"
    },
    {
      "@value": "2",
      "List": "///squad.follow.pools",
      "Near": "Eaglesham, East Renfrewshire",
      "Key": "squad.follow.pools",
      "Miles": "46.18",
      "Km": "74.33"
    },
    {
      "@value": "3",
      "List": "///squad.follow.kilt",
      "Near": "Stranraer, Dumfries & Galloway",
      "Key": "squad.follow.kilt",
      "Miles": "96.70",
      "Km": "155.63"
    }
  ]
}

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

&useAlias – the service returns alias properties only when specified using this parameter.

OptionDescription
0Returns no Alias Properties
1Returns Alias Properties

&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.
2Returns an approximate address level grid reference where available. *Additional License Required.
3Returns both approximate address and postcode level grid references where available. *Additional License Required.

&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)

&uprnOnly – this option is for Postcode Plus & Postcode Plus Business. *Additional License Required.

OptionDescription
0All addresses returned.
1Returns only addresses with a UPRN.

&SubCountryName= – this option is for Postcode Plus only.

OptionDescription
EnglandLimits results to England only.
ScotlandLimits results to Scotland only.
WalesLimits results to Wales only.
Northern IrelandLimits results to Northern Ireland only.
Isle of ManLimits results to Isle of Man only.
JerseyLimits results to Jersey only.
GuernseyLimits results to Guernsey only.

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, locality, 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
includeOrg=YIncludes the Organisation in the line squeeze

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

WorldAddress works similarly to our other address products. The difference in normal operation is the need to specify the Country or CountryISO code (as parameters in the GET request) of the country you wish to use in all lookup, search, and record retrieval operations. Furthermore, for a WorldAddress lookup, the initial request must contain the fields=list parameter.

Making use of the data returned

In the retrieve request, 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",
			"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=ListCountry&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 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",
			"iso": "AFG",
		},
		{
			"@value": "2",
			"iso": "ALA",
		},
		{
			"@value": "3",
			"iso": "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">
		<iso>AFG</<iso>
	<Item>
	<Item value="2">
		<iso>ALA</<iso>
	<Item>
	<Item value="3">
		<iso>ALB</<iso>
	<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": "STRATFORD 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>
XML 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.

Nearest Grid Locations

ParametersDescription
&srcpostcodeSource Postcode – your starting point.
&srclatitudeSource Latitude – your starting point.
&srclongitudeSource Longitude – your starting point.
&postcode(n)A list of Postcodes to be provided e.g., &postcode1=&postcode2=&postcode3…
&latitude(n)A list of Latitudes to be provided e.g., &latitude1=&latitude2=&latitude3…
&longitude(n)A list of Longitudes to be provided e.g., &longitude1=&longitude2=&longitude3…
&sortYou can sort by Distance or Time.

The nearest function in the grid product can take a source postcode and then any number up to 20 additional postcodes. It will then return based on your sort, either in distance order or drivetime order, the Distance in Km and Miles, the drivetime, latitude, longitude and postcode.

JSON Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&data=grid&task=nearest&fields=standard&srcpostcode=yo11aa&postcode1=b111aa&postcode2=ka203le&sort=distance&format=json

{
  "Result": "1",
  "ErrorText": "",
  "Item": [
    {
      "@value": "1",
      "Km": "216.87",
      "Miles": "134.79",
      "Time": "155",
      "Latitude": "52.4596",
      "Longitude": "-1.8714",
      "Postcode": "B11 1AA",
      "Key": "1"
    },
    {
      "@value": "2",
      "Km": "364.33",
      "Miles": "226.43",
      "Time": "269",
      "Latitude": "55.6337",
      "Longitude": "-4.7479",
      "Postcode": "KA20 3LE",
      "Key": "2"
    }
  ]
}

XML Format

https://pce.afd.co.uk/afddata.pce?serial=333333&password=pwd&data=grid&task=nearest&fields=standard&srcpostcode=yo11aa&postcode1=b111aa&postcode2=ka203le&sort=distance

<AFDPostcodeEverywhere>
    <Result>1</Result>
    <ErrorText/>
    <Item value="1">
        <Km>216.87</Km>
        <Miles>134.79</Miles>
        <Time>155</Time>
        <Latitude>52.4596</Latitude>
        <Longitude>-1.8714</Longitude>
        <Postcode>B11 1AA</Postcode>
        <Key>1</Key>
    </Item>
    <Item value="2">
        <Km>364.33</Km>
        <Miles>226.43</Miles>
        <Time>269</Time>
        <Latitude>55.6337</Latitude>
        <Longitude>-4.7479</Longitude>
        <Postcode>KA20 3LE</Postcode>
        <Key>2</Key>
    </Item>
</AFDPostcodeEverywhere>

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.
Descriptions Example
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.

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 PAF Matched address 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

Refiner Result Codes

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

Result CodeDescription
100Complete Match – Full Address matches identically.
200Corrected Match – Address verified from the Postcode and matches a record with some correction.
201Changed Postcode Match – Address verified from a postcode that was change due to a Royal Mail recoding and now matches.
202Assume Postcode Correct – Property Match assuming the postcode is correct.
203Assume Changed Postcode Correct – 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 with some correction, looking wider than just the specified Postcode.
301Full DPS Match – Address verified. Multiple PAF delivery point records exist for this address and the organisation could not be matched. As a result the specific DPS/UDPRN could not be returned.
400*

Street Match – Address verified to Street Level, i.e. the property was not matched, but a unique match to the street was identified on a single postcode.

*When no street is present, the address is verified to Locality Level, i.e. rural areas like villages, etc.

-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.
-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/v1/refiner/GBR/clean?serial=333333&password=pwd&fields=organisation@property@street@locality@town@county@postcode@list&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/v1/refiner/GBR/clean?serial=333333&password=pwd&fields=organisation@property@street@locality@town@county@postcode@list&address1=AFD%20Software%20Ltd&address2=&address3=Lezayre,%20Ramsey&address4=&address5=Isle%20of%20Man&address6=&address7=IM7%202DZ&format=XML

<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). Allows an automated low confidence match to be returned for manual/interactive review.
Ambiguous=1This allows ambiguous matches the user can choose from.
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.
RetainExtra=1

This feature allows you to specify fields to return the non-PAF information that we have retained after your address has been cleansed. We allow different parts of the non-PAF organisation and building data to be retained. The fields that would need to be specified are:

retainedOrg1

retainedOrg2

retainedOrg3

retainedBuilding

retainedData

extraCloseness=1

Indicates how close the output address is to the PAF Matched Address. This is available for Organisation, Property, Street and Locality fields. Additional parameters will need to be used.

Parameters:

organisationCloseness@propertyCloseness@streetCloseness@localityCloseness

Deduplication

The deduplication process is completed in 2 stages.

First stage deduplication process

Input Parameters

To use deduplication when deduplicating the database the following options are used:

&dedupe=1Turns on deduplication data generation
&dedupe=...List of fields to deduplicate on – (options are):
 Postcode
 UDPRN
 Property
 Street
 Name
 Organisation
 Surname
 Phone
 Email

Any fields may be used in combination and configuration as to if both address and phone/email have to match is determined later. However, if wanting to do deduplication purely passed on email/phone, that should be done as a database query rather than run through Refiner. It is normally expected to use at least the postcode in deduplication (given this runs on the matched data), however with larger datasets additional fields such as property and surname would be advisable to reduce the “amount of noise”. UDPRN is advisable with Name and Organisation when seeking to automate duplicate identification as while it may miss some addresses that can’t be fully PAF matched it reduces the chance of two different addresses being matched, especially in conjunction with the name.

Fields returned from the first stage

When returning the cleaned address Refiner will include two additional fields for each record:

dedupStatic – This contains data which should be identical for all records that are duplicates with each other. Depending on deduplication fields used this could include: –

  • The postcode (numeric representation, dataset specific)
  • UDPRN
  • Street (numeric representation, dataset specific)

dedupAdditional – This contains data that may need approximate matching, differing formats taken into account etc. to determine a duplicate for a record with the same dedupStatic value as another:-

  • Name fields
  • Surname
  • Organisation
  • Property
  • Phone
  • Email

These records should be stored in the database or file temporarily to aid identification of duplicates. Note as most of this data is not consistent across data updates and matches are not stored it is not intended that this data is permanently stored as it won’t be useful for a new run.

Example query:

http://localhost:81/v1/refiner/GBR/clean?fields=street@locality@postcode&serial=xxxxxx&password=pwd&address1=Jurby Road&address2=lezayre&address3=IM7 2DZ&dedupefields=postcode@property&dedupe=1

{
  "ResultCode": 400,
  "Closeness": 44,
  "street": "Jurby Road",
  "locality": "Lezayre, Ramsey",
  "postcode": "IM7 2DZ",
  "DedupStatic": "04544314",
  "DedupAdditional": ""
}

Second stage deduplication process

After running all records through Refiner and obtaining cleaned addresses and recording the dedupStatic and dedupAdditional values a second pass should be used to identify duplicates.

This is done by grouping all records with the same dedupStatic values together and passing them to the “dedup” task of Refiner. Note if identifying duplicates purely based on a “static” field such as postcode this won’t be necessary and will be obvious by all dedupAdditional values being blank – in that scenario all records with the same dedupStatic value are duplicates. (However for consistency of operation it doesn’t matter if you pass them back in all with dedupAdditional blank – they will correctly be identified as duplicates).

Input Parameters – The dedup task has the following parameters:

dedupStatic – This is the common dedupStatic field for each of these records.

dedup1..n – This is a set of parameters that contains the additional data (was returned in the dedupAdditional) for each record with the common dedupStatic value.

additionalData (optional) – Set to AND to mean that the address field specified and the additional data items (e.g. phone number and/or email address) need to match. By default static items, such as Postcode would still need to match but if a field like Property and Phone were used either could match to be flagged as a duplicate. When this is set to AND both have to match.

dataItems (optional) – Specifies how many items have to match. If omitted (or zero) then all items specified (address, email and phone have to match). If set to 1 then only one item has to match, 2 two items have to match etc.

phoneApprox (optional) – When omitted (or zero) phone number has to be an exact match. When > 0 specifies the edit distance (how much it can differ) to still match. This should be set to a low number when wanting to allow a minor deviation in the phone number.

emailApprox (optional) – When omitted (or zero) email address has to be an exact match. When > 0 specifies the edit distance (how much it can differ) to still match. This should be set to a low number when wanting to allow a minor deviation in the email address.

In the below example query, the &dedupstatic= variable uses the DedupStatic value returned from a previous query, and the multiple &dedup#= parameters use the DedupAdditional values. This shows there are 3 dedup values, 2 identical and 1 different from the others. As a result, the response shows that 2 and 3 are duplicates.

http://localhost:81/v1/refiner/GBR/dedup?serial=xxxxxx&password=pwd&dedupstatic=02217227&dedup1=P173&dedup2=P172&dedup3=P172&dataItems=2

{
  "Duplicates": [
    [
      1
    ],
    [
      2,
      3
    ]
  ]
}

Alternatively the dedupStatic and dedup1…n data can be supplied in a POST body with multiple records containing a set of groups:

dedupstatic~dedup1~...~dedupn

Fields returned from the second stage

Refiner will return a group of records (in JSON format) that group together each input record into those that are identified as duplicates. Any group with only one record is not a duplicate. These can then be presented to the user for review.

Please note full backups should be taken prior to any database work and that Refiner does not delete any records itself, it provides the information for the user to do so.

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, locality, town) into 3 fields, concatenating fields as required to do so.

The below table gives optional fields that may help in squeezing fields. Within each line the fields should be separated using tildes as shown below and all additional parameters should be specified within the URL. 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). Batch requests sent to our Hosted solution should be no more than 50 records at once for processing. 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/v1/refiner/GBR/clean?serial=333333&password=pwd&fields=Organisation@Property@Street@Locality@Town@PostalCounty@Postcode@

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

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 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

Legacy Compatibility

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

Example XML Format

http://localhost:81/afddata.pce?serial=333333&password=pwd&Data=Address&task=Clean&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

Batch of POST Requests

http://localhost:81/v1/refiner/GBR/clean?serial=333333&password=pwd&fields=Organisation@Property@Street@Locality@Town@PostalCounty@Postcode@

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 PAF Matched address on a percentage scale
Business ResultIndicates whether the address has been matched to a business (Business Matched = 1, No Business Matched = -1)
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 Match – Full Address matches identically.
200Corrected Match – Address verified from the Postcode and matches a record with some correction.
201Changed Postcode Match – Address verified from a postcode that was changed due to a Royal Mail recoding and now matches.
202Assume Postcode Correct – Property Match assuming the postcode is correct.
203Assume Changed Postcode Correct – 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 with some correction, looking wider than just the specified Postcode.
301Full DPS Match – Address verified. Multiple PAF delivery point records exist for this address and the organisation could not be matched. As a result the specific DPS/UDPRN could not be returned.
400Street Match – Address verified to Street Level, i.e. the property was not matched, 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.
-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@turnover@phone@list&address1=AFD Software Ltd&address2=&address3=Lezayre, Ramsey&address4=&address5=Isle of Man&address6=&address7=IM7 2DZ

{ 
  "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": "",
  "turnover": "",
  "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@turnover@phone@list&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",
  "GridE": "243661",
  "GridN": "495386",
  "business": "Computer Software (Development)",
  "size": "E",
  "nationalSize": "C",
  "locationType": "S",
  "SICCode": "62012",
  "branchCode": "",
  "groupId": "",
  "turnover": "",
  "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@turnover@phone@list&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>
    <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>
    <turnover></turnover>
    <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). Batch requests sent to our Hosted solution should be no more than 50 records at once for processing.

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@turnover@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@turnover@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

Note: Batch requests sent to our Hosted solution should be no more than 50 records at once for processing.

Refiner Additional Options

ParameterDescription
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.
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). Allows an automated low confidence match to be returned for manual/interactive review.
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.
RetainExtra=1

This feature allows you to specify fields to return the non-PAF information that we have retained after your address has been cleansed. We allow different parts of the non-PAF organisation and building data to be retained. The fields that would need to be specified are:

retainedOrg1

retainedOrg2

retainedOrg3

retainedBuilding

retainedData

extraCloseness=1

Indicates how close the output address is to the PAF Matched Address. This is available for Organisation, Property, Street and Locality fields. Additional parameters will need to be used.

Parameters:

organisationCloseness@propertyCloseness@streetCloseness@localityCloseness

* 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, locality, 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.

Configuration Example

<?xml version="1.0"?>
<NearestConfig>
  <updateFreq>5</updateFreq>
  <database>
    <name>Nandos</name>
    <type>CSV</type>
    <fileName>.\data\util\nandos.csv</fileName>
    <noHeadings>0</noHeadings>
    <gridE>GridE</gridE>
    <gridN>GridN</gridN>
    <oldGrids>1</oldGrids>
    <listFields>Title</listFields>
    <outputFields>RecordNo,Postcode,Organisation,Property,Street,Locality,Town,County,Phone,Fax</outputFields>
  </database>
</NearestConfig>

Nearest Example

http://localhost:81/afddata.pce?serial=333333&password=pwd&Data=nearest&task=lookup&fields=standard&maxquantity=1&dbconnect=nandos&lookup=TW18+3JD&Miles=1

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>

Email Validation 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.