> This page is for Developer.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bigcommerce.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bigcommerce.com/_mcp/server.

# Get Address

GET https://api-b2b.bigcommerce.com/api/v3/io/addresses/{addressId}

Retrieves detailed information on a single Company address.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/management/addresses/get-companies-company-id-addresses-address-id

## Authentication

- `X-Auth-Token` header (required) — | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts). | For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
- `X-Store-Hash` header (required) — | Header | Argument | Description | |:-------|:---------|:------------| | `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |

## Request

### Path parameters

- `addressId` (string, required) — The unique numeric identifier of the Company address.

## Response

### 200

OK

- `code` (integer, required, default: 200)
- `data` (addressFields_GET, required)
- `meta` (AddressesAddressIdGetResponsesContentApplicationJsonSchemaMeta, required)

## Errors

### 404 Not Found Error

Not Found This error occurs if the `addressId` is invalid.

- `code` (double, required, default: 404)
- `data` (ResponseNotFoundData, required)
- `meta` (ResponseNotFoundMeta, required)

## Types

### addressFields_GET

- `addressId` (integer, optional) — The unique numeric identifier of the Company address.
- `firstName` (string, optional) — The first name on the address.
- `lastName` (string, optional) — The last name on the address.
- `phoneNumber` (string, optional) — The phone number on the address.
- `zipCode` (string, optional) — The postal code on the address.
- `addressLine1` (string, optional) — The first line of the address.
- `addressLine2` (string, optional) — The second line of the address.
- `city` (string, optional) — The city on the address.
- `stateName` (string, optional) — The full name of the state or province on the address.
- `countryName` (string, optional) — The full name of the country on the address.
- `stateCode` (string, optional) — The two-letter ISO code for the state or province on the address.
- `countryCode` (string, optional) — The two-letter ISO code for the country on the address.
- `companyId` (integer, optional) — The unique numeric ID of the Company account.
- `isBilling` (boolean, optional) — Indicates whether the address is a billing address.
- `isShipping` (boolean, optional) — Indicates whether the address is a shipping address.
- `isDefaultBilling` (boolean, optional) — Indicates whether the address is the default billing address.
- `isDefaultShipping` (boolean, optional) — Indicates whether the address is the default shipping address.
- `label` (string, optional) — The label used on the storefront to identify the address.
- `externalId` (string, optional) — An external ID assigned to the address in a third-party system, such as an ERP.
- `createdAt` (integer, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) indicating when the address was created.
- `updatedAt` (integer, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) indicating when the address was last updated.
- `extraFields` (list of extraFields_BASIC, optional) — Contains extra field information for the address.

### AddressesAddressIdGetResponsesContentApplicationJsonSchemaMeta

- `message` (string, required, default: SUCCESS)

### ResponseNotFoundData

- `errMsg` (string, required, default: Address matching query does not exist.)

### ResponseNotFoundMeta

- `message` (string, required, default: Not Found Error)

### extraFields_BASIC

- `fieldName` (string, optional) — The name of the address extra field.
- `fieldValue` (string, optional) — The value assigned to the address extra field.
- `fieldType` (enum, optional) — The type of data that can be added as the extra field's value. This field uses numeric values to represent the data type, as follows: - 0 - Text - 1 - Multi-line text - 2 - Number - 3 - dropdown
  - Allowed values: `0`, `1`, `2`, `3`

## Examples

**Response**

```json
{
  "code": 200,
  "data": {
    "addressId": 123,
    "firstName": "Marie",
    "lastName": "Curie",
    "phoneNumber": "512-200-1234",
    "zipCode": "78704",
    "addressLine1": "512 Bluebonnet Lane",
    "addressLine2": "Building 1",
    "city": "Austin",
    "stateName": "Texas",
    "countryName": "United States",
    "stateCode": "TX",
    "countryCode": "US",
    "companyId": 123456,
    "isBilling": true,
    "isShipping": true,
    "isDefaultBilling": true,
    "isDefaultShipping": true,
    "label": "Austin Warehouse",
    "externalId": "123456",
    "createdAt": 1700000000,
    "updatedAt": 1700009999,
    "extraFields": [
      {
        "fieldName": "Tax Provider Tax Code",
        "fieldValue": "G",
        "fieldType": 0
      }
    ]
  },
  "meta": {
    "message": "SUCCESS"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-b2b.bigcommerce.com/api/v3/io/addresses/123"

headers = {"X-Auth-Token": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/addresses/123';
const options = {method: 'GET', headers: {'X-Auth-Token': '<apiKey>'}};

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-b2b.bigcommerce.com/api/v3/io/addresses/123"

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

	req.Header.Add("X-Auth-Token", "<apiKey>")

	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-b2b.bigcommerce.com/api/v3/io/addresses/123")

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

request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<apiKey>'

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-b2b.bigcommerce.com/api/v3/io/addresses/123")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v3/io/addresses/123', [
  'headers' => [
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/addresses/123");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-Auth-Token": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v3/io/addresses/123")! 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()
```