Address lookup

Virgin Money Giving has closed

Page and account creation APIs are now unavailable so please consider your use of our APIs and how this affects you. All other APIs will be available until 18 February. If you have any questions please take a look at our Q&A.

Read our Q&A

Address lookup

This API is for returning all the addresses for a given postcode, allowing a fundraiser to enter a postcode and select an address from the result.

The postcode must be supplied in one of the following formats:

A9 9AA
A99 9AA
AA9 9AA
A9A 9AA
Aa9a 9AA

URL

Operation type: GET

Note - To represent a space in the postcode you need to use %20 e.g. NR2 2TP should be passed as NR2%202TP.

Response

OutcomeFurther information
Success
  • Status 200: OK

Address details in the following format:

  • Address line 1
  • Address line 2
  • Town
  • County
  • Postcode
Error

Sample error:

If an invlalid postcode format is passed then the following is returned:

  • Error code: 002.01.17
  • Error message: The postcode must be in one of the Royal mail prescribed formats.

Click here for a full list of API error codes.

Response description

Data itemData typeDescription
addressLine1 Varchar(100) First line of address.
addressLine2 Varchar(100) Second line of address.
town Varchar(100) Town name.
county Varchar(100) County name.
postcode Varchar(10) Postcode.

XML response example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addresses>
<addresses>
<addressLine1>Virgin Money, Discovery House</addressLine1>
<addressLine2>Whiting Road</addressLine2>
<town>Norwich</town>
<county>Norfolk</county>
<postcode>NR4 6EJ</postcode>
</addresses>

JSON response example

{
"message": null,
"addresses":
[
{
"addressLine1": "Virgin Money, Discovery House",
"addressLine2": "Whiting Road",
"town": "Norwich",
"county": "Norfolk",
"postcode": "NR4 6EJ"
}]
}