# List Addresses v2.0Beta

The List Address endpoint retrieves a list of addresses for a customer profile. The request will return a list of all the addresses.

# Request

GET /v2.0/customers/{profileKey}/addresses

# Authorization

An OAuth 2.0 Bearer token with the Profile.Read scope is required. For more information, see Authentication.

# Path Parameters

A list of the supported path parameters is described below.

Name Required Type Description
profileKey true guid The profile key for the customer. This value can be retrieved from the profileKey claim in the token returned from our SSO solution.

# Response

200
OK
Returns an array of Address resources wrapped in an ApiListResponse envelope.

# Response Body

The endpoint returns our ApiListResponse envelope. The data property of the response will contain an array of Address resources.

# Sample

{
    "message": "The operation succeeded!",
    "notifications": [],
    "numberOfRecords": 2,
    "data": [
        {
            "key": "0e9efb73-1870-4aa8-9c4b-fdb4ad55a041",
            "profileKey": "75b7726e-8416-4b13-a54a-b7fae6518b8f",
            "profileBrandGroupKey": "TEST-SPUR-PROFILE",
            "addressType": "Delivery",
            "addressName": "Work",
            "formattedAddress": "Unit 87, Pizza Towers, Salad Valley Way, Durbanville, Cape Town, Western Cape, 3254, ZA",
            "addressLine1": "Unit 87, Pizza Towers",
            "addressLine2": "Salad Valley Way",
            "suburb": "Durbanville",
            "city": "Cape Town",
            "province": "Western Cape",
            "postalCode": "3254",
            "countryCode": "ZA",
            "latitude": 45.456666600000,
            "longitude": -54.167576300000
        },
        {
            "key": "4af3322e-a236-4a77-ae8b-90ba6715ebde",
            "profileKey": "75b7726e-8416-4b13-a54a-b7fae6518b8f",
            "profileBrandGroupKey": "TEST-SPUR-PROFILE",
            "addressType": "Delivery",
            "addressName": "Home",
            "formattedAddress": "13 Burger Avenue, Century City, Cape Town, Western Cape, 7441, ZA",
            "addressLine1": "13 Burger Avenue",
            "addressLine2": null,
            "suburb": "Century City",
            "city": "Cape Town",
            "province": "Western Cape",
            "postalCode": "7441",
            "countryCode": "ZA",
            "latitude": 123.456789000000,
            "longitude": -87.137878000000
        }
    ]
}

# Errors

The standard error responses apply.

401
Unauthorized
When authentication fails.
403
Forbidden
When authorisation fails.
404
Not Found
When the customer profile cannot be found.