Documentation

Address Data

This document provides a description of the addressing data available through the Ideal Postcodes API.


Essential Addressing Elements

With each address lookup, the API will automatically aggregrate all the available addressing information for any given premise into a reliable 3 lined address format which meet Royal Mails clear addressing specifications. These 3 address lines plus the Post Town and Postcode represents all the information needed to reliably identify a premise according to Royal Mail.

Name Type Description
Address Line One
line_1
string
  • First Address Line. Often contains premise and thoroughfare information.
  • In the case of a commercial premise, the first line is always the full name of the registered organisation.
  • Never empty.
Address Line Two
line_2
string
  • Second Address Line. Often contains thoroughfare and locality information.
  • May be empty.
Address Line Three
line_3
string
  • Third address line.
  • May be empty.
Post Town
post_town
string
  • A Post Town is mandatory for delivery of mail to a Delivery Point. This is not necessarily the nearest town geographically, but a routing instruction to the Royal Mail delivery office sorting mail for that Delivery Point. A Post Town will always be present in every address, and for some Localities the Post Town will be the only locality element present.
Postcode
postcode
string
  • Correctly formatted postcode. Capitalised and spaced.

Premise Elements

These elements identify a specific premise. A combination of building number, building name and sub-building fields may be present. We also provide a pre-computed premise field if you are unaware of how premise elements are combined.

Name Type Description
Building Number
building_number
string
  • Number to identify premise on a thoroughfare or dependant thoroughfare.
  • E.g. 2, 4, 8, 16
Building Name
building_name
string
  • Name of residential or commercial premise
  • E.g. The Manor, 1-2, A, 12A, K, Victoria House
Sub Building Name
sub_building_name
string
  • When a premise is split into individual units such as flats, apartments or business units.
  • Cannot be present without either building_name or building_number
  • E.g. Flat 1, A, 10B
Premise
premise
string
  • A pre-computed string which sensibly combines building_number, building_name and sub_building_name.
  • building_number, building_name and sub_building_name represent raw data from Royal Mail's and can be difficult to parse if you're unaware of how the Postcode Address File premise fields work together. For this reason, we also provide a pre-computed premise field which intelligently gathers these points into a single, simple premise string.
  • This field is ideal if you want to pull premise information and thoroughfare information separately instead of using our address lines data.
  • E.g. For a premise with just a number: 2
  • E.g. For a premise with both a building and sub-building name: Caretakers Flat, 110-114
  • E.g. For a premise with number, building name and sub-building name: 2B The Tower, 27
PO Box
po_box
string
  • When the PO Box Number field is populated it will contain PO BOX nnnnnn where n represents the PO Box number.
  • Note that the PO Box details can occasionally consist of a combination of numbers and letters e.g. HK860.
  • PO Box Numbers are only allocated to Large Users.
Organisation Name
organisation_name
string
  • Name of the organisation registered at this address.
Department Name
department_name
string
  • Used to supplment Organisation Name to identify a deparment within the organisation.

Thoroughfare Elements

Name Type Description
Thoroughfare
thoroughfare
string
  • Also known as the street or road name.
  • In general each Thoroughfare Name will have a separate Postcode. Longer Thoroughfares with high number ranges often have multiple Postcodes covering the entire length of the road, with breaks at suitable points e.g. junctions or natural breaks in the road.
  • However, there are some historic instances where a Postcode may contain more than one Thoroughfare.
Dependant Thoroughfare
dependant_thoroughfare
string
  • Used to supplement thoroughfare.
  • When a thoroughfare name is used twice in the same Post Town, the dependant thoroughfare is added to uniquely indentify a delivery point.

Locality Elements

Name Type Description
Dependant Locality
dependant_locality
string
  • When the same thoroughfare name reoccurs in a Post town, it may not be possible to make it dependant on a dependant thoroughfare. In this case the thoroughfare is dependent on a locality. For example if we want to find 1 Back Lane in Huddersfield we see that there are three.
Double Dependant Locality
double_dependant_locality
string
  • Used to supplement Dependent Locality.
  • A Double Dependant Locality supplied along with a Dependant Locality if the Dependant Locality exists twice in the same locality.
Post Town
post_town
string
  • A Post Town is mandatory for delivery of mail to a Delivery Point. This is not necessarily the nearest town geographically, but a routing instruction to the Royal Mail delivery office sorting mail for that Delivery Point. A Post Town will always be present in every address, and for some Localities the Post Town will be the only locality element present.

Administrative Address Elements

Each address also comes with certain data points regarding its administrative authorities including county, district and ward.

Administrative data for postcodes is retrieved using Royal Mail, ONS and Ordnance Survey data. ONS and Ordnance Survey data which is released every quarter. A very small percentage of new postcodes (<0.1%) will not have this information until the next release. In this scenario, the API will return an empty string.

Please note that county data is no longer required to identify an address and we strongly recommend not discard county data altogether. This data is primarily provided primarily for users of legacy systems which require some county data. Since the use of county information has been deprecated for many years, this data can be inaccurate or missing.

Name Type Description
County
county
string
  • Since postal, administrative or traditional counties may not apply to some addresses, the county field is designed to return whatever county data is available.
  • Normally, the postal county is returned. If this is not present, the county field will fall back to the administrative county. If the administrative county is also not present, the county field will fall back to the traditional county
  • This is primarily used for those who have a county requirement for legacy addressing systems. However please take care, it could be empty for a small number of addresses.
  • Data source: Royal Mail
  • May be empty in cases where no administrative, postal or traditional county present.
Postal County
postal_county
string
  • Postal counties were used for the distribution of mail before the Postcode system was introduced in the 1970s. The Former Postal County was the Administrative County at the time. This data rarely changes.
  • Data source: Royal Mail
  • May be empty.
Administrative County
administrative_county
string
  • The current administrative county to which the postcode has been assigned.
  • A Unitary Authority name, where one is present. If there is no Unitary Authority, the County name is used. This information is not static, because County boundaries may change due to administrative changes.
  • Data source: Royal Mail
  • May be empty.
Traditional County
traditional_county
string
  • Traditional counties are provided by the Association of British Counties. It’s historical data, and can date from the 1800s.
  • Data source: Royal Mail
  • May be empty.
Administrative District
district
string
  • The current district/unitary authority to which the postcode has been assigned.
  • Data source: ONS
Administrative Ward
ward
string
  • The current administrative/electoral area to which the postcode has been assigned.
  • May be empty for a small number of addresses.
  • Data source: ONS

Geolocation

Location data is gathered through the ONS and Ordnance Survey open data, which is released every quarter. A very small percentage of new postcodes (<0.1%) will not have a location information until the next release. In this scenario, of the API (V1) returns an empty String. Otherwise geolocation data is returned as Number.

Name Type Description
Longitude
longitude
number orstring
  • The longitude of the postcode (WGS84/ETRS89). Accurate at the postcode level
  • Can be a positive or negative decimal. E.g. -0.1283983
  • Returns an empty string if no location data is available. Otherwise a number is returned
Latitude
latitude
number orstring
  • The latitude of the postcode (WGS84/ETRS89). Accurate at the postcode level
  • Can be a positive or negative decimal. E.g. 51.5083983
  • Returns an empty string if no location data is available. Otherwise a number is returned
Northings
northings
number orstring
  • Northings reference using the [Ordnance Survey National Grid reference system](http://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid)
  • Metres from origin. E.g. 180458
  • Returns an empty string if no location data is available. Otherwise a number is returned
Eastings
eastings
number orstring
  • Eastings reference using the [Ordnance Survey National Grid reference system](http://en.wikipedia.org/wiki/Ordnance_Survey_National_Grid)
  • Metres from origin. E.g. 550458
  • Returns an empty string if no location data is available. Otherwise a number is returned

Miscellaneous

Name Type Description
Unique Delivery Point Reference Number
udprn
string
  • UDPRN stands for ‘Unique Delivery Point Reference Number’. Each UDPRN is an 8-character code that can be used instead of the current address keys on PAF.
  • Simple, unique reference number for each Delivery Point.
  • Unlikely to be reused when an address expires.
  • 8-character numeric code.
  • A new UDPRN is automatically assigned to each new Delivery Point added to PAF.
Postcode Outward Code
postcode_outward
string
  • The first part of a postcode is known as the outward code. e.g. The outward code of ID1 1QD is ID1.
  • Enables mail to be sorted to the correct local area for delivery. This part of the code contains the area and the district to which the mail is to be delivered, e.g. ‘PO1’, ‘SW1A’ or ‘B23’.
Postcode Inward Code
postcode_inward
string
  • The second part of a postcode is known as the inward Code. e.g. The inward code of ID1 1QD is 1QD.
  • This part is one number followed by two letters. The number identifies the sector in the postal district. The letters then define one or more properties in that sector.
Postcode Type
postcode_type
string
  • This indicates the type of user. It can only take the values "S" or "L" indicating small or large respectively.
  • Large User Postcodes. These are assigned to one single address either due to the large volume of mail received at that address, or because a PO Box or Selectapost service has been set up.
  • Small User Postcodes. These identify a group of Delivery Points. On average there are 15 Delivery Points per Postcode. However this can vary between 1 and, in some cases, 100. There will never be more than 100 Delivery Points on a Postcode.
Small User Organisation Indicator
su_organisation_indicator
string
  • Small User Organisation Indicator can have the values 'Y' or space.
  • A value of 'Y' indicates that a Small User Organisation is present at this address.
Delivery Point Suffix
delivery_point_suffix
string
  • A unique Royal Mail 2-character code (the first numeric & the second alphabetical), which, when added to the Postcode, enables each live Delivery Point to be uniquely identified.
  • Once the Delivery Point is deleted from PAF the DPS may be reused (although they aren’t reused until all remaining Delivery Points in the range have been allocated).
  • The DPS for a Large User is always '1A' as each Large User has its own Postcode.
  • E.g. 2B