> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equalsmoney.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage addresses

> Get a list of addresses, retrieve details for a specific address, and update or delete an address.

## List addresses

<Note>
  **GET** `/v2/addresses`
</Note>

### Request

Use this request to retrieve a list of addresses associated with a given account. The only required parameter is the `accountId`. You can use optional parameters to filter or search the results, and retrieve additional details.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/addresses?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/addresses?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account that you want to retrieve a list of addresses for.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

<ParamField body="limit" type="integer">
  The maximum number of results to return. For example, `limit=25`. By default, this is set to `100`.

  Allowable values: `[ 1 .. 1000 ]`
</ParamField>

<ParamField body="offset" type="integer">
  The number of items to skip before returning results. For example, `offset=200`. By default, this is set to `0`.

  Allowable values: A valid integer
</ParamField>

<ParamField body="search" type="string">
  Filters results that include this string. For example, `search=Jane+Doe`.

  Allowable values: A valid string
</ParamField>

<ParamField body="type" type="array of strings">
  Filter results to include only this type of address. For example, `type=registered`.

  Allowable values: A valid string
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing a list of addresses. These are ordered alphabetically by `nickName`.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "limit": 100,
    "offset": 200,
    "count": 2,
    "rows": [
      {
        "id": "55ddc56e-f605-49c6-9862-0e8b55fa368f",
        "type": "office",
        "nickName": "Head Office",
        "addressLine1": "Great Building",
        "addressLine2": "4 Maple Street",
        "addressLine3": "Southwark",
        "addressContact": "Jane Doe",
        "city": "London",
        "postcode": "SE13UB",
        "country": "England"
      },
      {
        "id": "516bd368-65b9-43d5-97bf-669c2018606a",
        "type": "personal",
        "nickName": "William Walker Home",
        "addressLine1": "41 Middle Street",
        "addressLine2": "",
        "addressLine3": "",
        "addressContact": "William Walker",
        "city": "Enfield",
        "postcode": "EN13JY",
        "country": "England"
      }
    ]
  }
  ```

  ```json Response structure theme={null}
  {
    "limit": integer,
    "offset": integer,
    "count": integer,
    "rows": [
      {
        "id": "string",
        "type": "string",
        "nickName": "string",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "addressContact": "string",
        "city": "string",
        "postcode": "string",
        "country": "string"
      }
    ]
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/addresses/list-addresses).

## Retrieve an address

<Note>
  **GET** `/v2/addresses/{addressId}?accountId={accountId}`
</Note>

### Request

Use this request to retrieve details for a specific address, based on its `addressId`.

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/addresses/55ddc56e-f605-49c6-9862-0e8b55fa368f?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X GET \
    'https://api.equalsmoney.com/v2/addresses/{addressId}?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="addressId" type="string" required>
  The ID of the address that you want to retrieve details for.

  Allowable values: An existing `addressId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the address ID.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing the details of the address.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "55ddc56e-f605-49c6-9862-0e8b55fa368f",
    "type": "office",
    "nickName": "Head Office",
    "addressLine1": "Great Building",
    "addressLine2": "4 Maple Street",
    "addressLine3": "Southwark",
    "addressContact": "Jane Doe",
    "city": "London",
    "postcode": "SE13UB",
    "country": "England"
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "type": "string",
    "nickName": "string",
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "addressContact": "string",
    "city": "string",
    "postcode": "string",
    "country": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/addresses/retrieve-an-address).

## Update an address

<Note>
  **PATCH** `/v2/addresses/{addressId}?accountId={accountId}`
</Note>

### Request

Use this request to update a given address.

<Info>
  You can't update an address that has `registered` as its `type`.
</Info>

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/addresses/55ddc56e-f605-49c6-9862-0e8b55fa368f?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "type": "office",
      "nickName": "London Office",
      "addressLine1": "Great Building",
      "addressLine2": "3 Maple Street",
      "addressLine3": "Southwark",
      "addressContact": "John Doe",
      "city": "London",
      "postcode": "SE13UB",
      "country": "England"
    }'
  ```

  ```bash Request structure theme={null}
  curl -i -X PATCH \
    'https://api.equalsmoney.com/v2/addresses/{addressId}?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
    -H 'Content-Type: application/json' \
    -d '{
      "type": "string",
      "nickName": "string",
      "addressLine1": "string",
      "addressLine2": "string",
      "addressLine3": "string",
      "addressContact": "string",
      "city": "string",
      "postcode": "string",
      "country": "string"
    }'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="addressId" type="string" required>
  The ID of the address that you want to update.

  Allowable values: An existing `addressId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the address ID.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

#### Request body schema

<ParamField body="type" type="string">
  The address type. This can be anything except `registered`.

  Allowable values: A valid string
</ParamField>

<ParamField body="nickName" type="string or null">
  The nickname of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressLine1" type="string">
  The first line of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressLine2" type="string or null">
  The second line of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressLine3" type="string or null">
  The third line of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="addressContact" type="string or null">
  The name of the contact associated with the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="city" type="string">
  The city of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="postcode" type="string">
  The postal or ZIP code of the address.

  Allowable values: ≤ 256 characters
</ParamField>

<ParamField body="country" type="string">
  The country of the address.

  Allowable values: ≤ 256 characters
</ParamField>

### Response

If your request is successful, you'll receive a `200` response containing the updated details for this address.

<CodeGroup>
  ```json Sample response theme={null}
  {
    "id": "55ddc56e-f605-49c6-9862-0e8b55fa368f",
    "type": "office",
    "nickName": "London Office",
    "addressLine1": "Great Building",
    "addressLine2": "3 Maple Street",
    "addressLine3": "Southwark",
    "addressContact": "John Doe",
    "city": "London",
    "postcode": "SE13UB",
    "country": "England"
  }
  ```

  ```json Response structure theme={null}
  {
    "id": "string",
    "type": "string",
    "nickName": "string",
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "addressContact": "string",
    "city": "string",
    "postcode": "string",
    "country": "string"
  }
  ```
</CodeGroup>

For more detailed information about this request and its response, [see the API reference](/api-reference/addresses/update-an-address).

## Delete an address

<Note>
  **DELETE** `/v2/addresses/{addressId}?accountId={accountId}`
</Note>

### Request

Use this request to delete an existing address.

<Info>
  You can't delete an address that has `registered` as its `type`.
</Info>

<CodeGroup>
  ```bash Sample request theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/addresses/55ddc56e-f605-49c6-9862-0e8b55fa368f?accountId=F12345' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```

  ```bash Request structure theme={null}
  curl -i -X DELETE \
    'https://api.equalsmoney.com/v2/addresses/{addressId}?accountId={accountId}' \
    -H 'Authorization: ApiKey YOUR_API_KEY_HERE'
  ```
</CodeGroup>

#### Path parameters

<ParamField body="addressId" type="string" required>
  The ID of the address that you want to delete.

  Allowable values: An existing `addressId`
</ParamField>

#### Query parameters

<ParamField body="accountId" type="string" required>
  The ID of the account associated with the address ID.

  Allowable values: An existing `accountId` (≤ 36 characters)
</ParamField>

### Response

If your request is successful, you'll receive a `204` response.

For more detailed information about this request and its response, [see the API reference](/api-reference/addresses/delete-an-address).
