Retrieve by UDPRN
Returns an address as identified by its Unique Delivery Point Reference Number (UDPRN).
You may find it useful to store UDPRN information as it can be used to retrieve the most recent information for an address. It can also be used to test for a deleted address.
UDPRNs are an eight digit unique numeric code (e.g. 25962203) for any premise on the Postcode Address File. It's essentially a unique identifier for every address in the UK that Royal Mail has in its database.
Testing
To test your implementation of our API we have a range of test UDPRNs that yield both successful and unsuccessful responses to your request.
They are the following:
- 0 Returns a successful UDPRN lookup response 2000
- -1 Returns "UDPRN not found", error 4044
- -2 Returns "no lookups remaining", error 4020
- -3 Returns "daily (or individual) lookup limit breached", error 4021
Test request undergo the usual authentication and restriction rules. This is to help surface any issues that occur during implementation and does not cost you a lookup.
Path parameters
UDPRN to be retrieved
Query parameters
API Key
Your unique identifier that allows access to our APIs.
Begins ak_. Available from your dashboard
Restrict Result Fields
Comma separated whitelist of address elements to return.
E.g. filter=line_1,line_2,line_3 returns only line_1, line_2 and line_3 address elements in your response
Response
Success
Example response
{
"result": {
"postcode": "SW1A 2AA",
"postcode_inward": "2AA",
"postcode_outward": "SW1A",
"post_town": "London",
"dependant_locality": "",
"double_dependant_locality": "",
"thoroughfare": "Downing Street",
"dependant_thoroughfare": "",
"building_number": "10",
"building_name": "",
"sub_building_name": "",
"po_box": "",
"department_name": "",
"organisation_name": "Prime Minister & First Lord Of The Treasury",
"udprn": 23747771,
"postcode_type": "L",
"su_organisation_indicator": "",
"delivery_point_suffix": "1A",
"line_1": "Prime Minister & First Lord Of The Treasury",
"line_2": "10 Downing Street",
"line_3": "",
"premise": "10",
"longitude": -0.12767,
"latitude": 51.503541,
"eastings": 530047,
"northings": 179951,
"country": "England",
"traditional_county": "Greater London",
"administrative_county": "",
"postal_county": "London",
"county": "London",
"district": "Westminster",
"ward": "St. James's",
"uprn": "100023336956",
"id": "paf_23747771",
"country_iso": "GBR",
"country_iso_2": "GB",
"county_code": "",
"language": "en",
"umprn": "",
"dataset": "paf"
},
"code": 2000,
"message": "Success"
}