> 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/v2/companies/{companyId}/addresses/{addressId}

Returns a specific address based on the `companyId` and `addressId` in the path.

Equivalent Storefront GraphQL API Query: `address`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).

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

## Authentication

- `Authorization` header (bearer token, required) — ### Authentication header | Header | Argument | Description | | :-------------- | :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Authorization` | `Bearer {{B2B_JWT_TOKEN}}` | You can obtain this token using the steps described in the [REST Storefront API](/developer/docs/b2b-edition/getting-started/authentication#rest-storefront-api) section\[...] |

## Request

### Path parameters

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

## Response

### 200

OK

- `message` (string, optional)
- `code` (double, optional, default: 200)
- `data` (CompaniesCompanyIdAddressesAddressIdGetResponsesContentApplicationJsonSchemaData, optional) — Extra Field Values

## Types

### CompaniesCompanyIdAddressesAddressIdGetResponsesContentApplicationJsonSchemaData

Extra Field Values

- `firstName` (string, optional) — The first name of the address.
- `isShipping` (string, optional) — Indicates whether the address can be used as a shipping address.
- `isBilling` (string, optional) — Indicates whether the address can be used as a billing address.
- `phoneNumber` (string, optional) — The phone number associated with the address.
- `addressLine1` (string, optional) — The first line of the address
- `addressLine2` (string, optional) — The second line of the address
- `city` (string, optional) — City of the address.
- `zipCode` (string, optional) — Zip or Postal Code of the address.
- `state` (stateObject, optional) — State of the address as an object with both the name and the two-character code.
- `country` (countryObject, optional) — Country of the address as an object with both the name and the two-character code.
- `addressId` (string, optional) — The unique ID of the address.
- `lastName` (string, optional) — The last name of the address.
- `isDefaultShipping` (string, optional) — Indicates whether the address is the default shipping address for the Company account.
- `isDefaultBilling` (string, optional) — Indicates whether the address is the default billing address for the Company account.
- `label` (string, optional) — The label used on the storefront to identify the address.
- `extraFields` (list of CompaniesCompanyIdAddressesAddressIdGetResponsesContentApplicationJsonSchemaDataExtraFieldsItems, optional)

### stateObject

State of the address as an object with both the name and the two-character code.

- `stateName` (string, optional)
- `stateCode` (string, optional)

### countryObject

Country of the address as an object with both the name and the two-character code.

- `countryName` (string, optional)
- `countryCode` (string, optional)

### CompaniesCompanyIdAddressesAddressIdGetResponsesContentApplicationJsonSchemaDataExtraFieldsItems

- `fieldName` (string, required) — Field name that config in you store
- `fieldValue` (string, required) — Value of the extra field.

## Examples

**Response**

```json
{
  "message": "Success",
  "code": 200,
  "data": {
    "firstName": "Marie",
    "isShipping": "1",
    "isBilling": "0",
    "phoneNumber": "8001234567",
    "addressLine1": "512 Bluebonnet Lane",
    "addressLine2": "Building 2",
    "city": "Austin",
    "zipCode": "78726",
    "state": {
      "stateName": "Texas",
      "stateCode": "TX"
    },
    "country": {
      "countryName": "United States",
      "countryCode": "US"
    },
    "addressId": "27",
    "lastName": "Curie",
    "isDefaultShipping": "0",
    "isDefaultBilling": "0",
    "label": "Austin Warehouse",
    "extraFields": [
      {
        "fieldName": "Company Tax Code",
        "fieldValue": "Code G"
      }
    ]
  }
}
```

**SDK Code**

```python Get an Address
import requests

url = "https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123"

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

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

print(response.json())
```

```javascript Get an Address
const url = 'https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123';
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 Get an Address
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123"

	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 Get an Address
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123")

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 Get an Address
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Get an Address
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/companies/123/addresses/123");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Get an Address
import Foundation

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

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