> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# List business addresses

GET https://api-sandbox.payabli.com/api/v2/businesses/{businessReference}/addresses

Lists the addresses on a business. Each address is identified by its `businessAddressReference`.

Reference: https://docs.payabli.com/developers/api-reference/businesses/list-business-addresses

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `businessReference` (string, required) — The business reference (`businessUuid`).

## Response

### 200

The business's addresses.

- `success` (boolean, required) — Whether the request succeeded.
- `message` (string, required, nullable) — A human-readable result message.
- `traceId` (string, required, nullable) — The trace identifier for the request, useful for support.
- `data` (list of BusinessAddressResponse, required, nullable) — The business's addresses.

## Errors

### 401 Unauthorized Error

Unauthorized request.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

### 404 Not Found Error

The requested resource wasn't found.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

### 500 Internal Server Error

Internal server error.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

## Types

### BusinessAddressResponse

A business address, returned by the address endpoints.

- `_links` (BusinessAddressLinks, required) — Hypermedia links for the business address resource.
- `businessAddressReference` (string, required) — The reference of the business-to-address link, used to read and manage the address. Valid only under its own business.
- `type` (enum, required) — The address role.
  - Allowed values: `legal`, `billing`, `shipping`, `remittance`, `physical`, `mailing`
- `location` (enum, required) — The physical use of the address.
  - Allowed values: `office`, `warehouse`, `retail`, `home`, `other`
- `addressLine1` (string, required) — The first line of the street address.
- `addressLine2` (string, required, nullable) — The second line of the street address.
- `cityLocality` (string, required) — The city or locality.
- `stateProvince` (string, required) — The state or province.
- `postalCode` (string, required) — The postal or ZIP code.
- `country` (string, required) — The two-character ISO country code.
- `floor` (string, required, nullable) — The floor, if applicable.
- `suiteApartNumber` (string, required, nullable) — The suite or apartment number, if applicable.

### PayabliErrorBodyResponseData

Object with detailed error context.

- `explanation` (string, optional) — Human-readable explanation of what happened.
- `todoAction` (string, optional) — Suggested resolution.

### BusinessAddressLinks

Hypermedia links for a business address resource.

- `self` (string, optional) — Relative path to the business address resource.
- `business` (string, optional) — Relative path to the business that owns the address.

## Examples

**Response**

```json
{
  "success": true,
  "message": "Addresses retrieved successfully",
  "traceId": "0HNOF89NNTM7O:00000026",
  "data": [
    {
      "_links": {
        "self": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses/019fed1a-849f-729f-be21-d6395f155ccd",
        "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
      },
      "businessAddressReference": "019fed1a-849f-729f-be21-d6395f155ccd",
      "type": "legal",
      "location": "office",
      "addressLine1": "200 Sesame Blvd",
      "addressLine2": "Suite 150",
      "cityLocality": "New York",
      "stateProvince": "NY",
      "postalCode": "10001",
      "country": "US",
      "floor": null,
      "suiteApartNumber": null
    },
    {
      "_links": {
        "self": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses/019fed1a-84a6-7043-a6c0-e8aa2d4bec36",
        "business": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
      },
      "businessAddressReference": "019fed1a-84a6-7043-a6c0-e8aa2d4bec36",
      "type": "shipping",
      "location": "warehouse",
      "addressLine1": "201 Warehouse Ln",
      "addressLine2": null,
      "cityLocality": "Austin",
      "stateProvince": "TX",
      "postalCode": "73302",
      "country": "US",
      "floor": null,
      "suiteApartNumber": null
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55/addresses")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```