> 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.

# List Companies

GET https://api-b2b.bigcommerce.com/api/v3/io/companies

Returns a list of all Company accounts, sorted by `companyId` from highest to lowest by default. Pass optional parameters to modify the results.

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

## 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

### Query parameters

- `limit` (integer, optional, default: 10) — Determines the number of records to return per page. If left blank, this defaults to `10`.
- `offset` (integer, optional, default: 0) — The number of results to skip before returning the first result. If left blank, this defaults to `0`.
- `minModified` (double, optional) — The earliest [Unix timestamp](https://www.unixtimestamp.com/) that can be returned for a modified Company account.
- `maxModified` (double, optional) — The latest [Unix timestamp](https://www.unixtimestamp.com/) that can be returned for a modified Company account.
- `minCreated` (double, optional) — The earliest [Unix timestamp](https://www.unixtimestamp.com/) that can be returned for a modified Company account.
- `maxCreated` (double, optional) — The latest [Unix timestamp](https://www.unixtimestamp.com/) that can be returned for a modified Company account.
- `sortBy` (enum, optional, default: updatedAt) — Sorts results by Company name or last updated date, defaulting to the last updated date if no parameter is provided.
  - Allowed values: `companyName`, `updatedAt`
- `orderBy` (enum, optional, default: DESC) — Establish a descending or ascending order of results. The order defaults to descending if the parameter is not included.
  - Allowed values: `ASC`, `DESC`
- `isIncludeExtraFields` (enum, optional, default: 0) — Indicates whether or not the response will include Company extra fields. If the parameter is not included, the response will exclude extra fields by default. A value of `0` will exclude extra fields, while a value of `1` will include them.
  - Allowed values: `0`, `1`
- `companyStatus` (enum, optional) — The Company’s activity status. See [Company Status Codes](/developer/api-reference/rest/b2b/management/company/companies) to learn about their corresponding statuses.
  - Allowed values: `0`, `1`, `2`, `3`
- `q` (string, optional) — Enter a Company name to return partial and exact matches.
- `companyEmail` (string, optional) — Enter a Company's email address to return exact, case-insensitive matches.
- `extraFields` (list of string, optional) — Use this array to filter results by an extra field name-value pair. Exact usage is formatted as `?extraFields=name:value`. Including this filter returns any Company account where the extra field `name` contains `value`. To search on more than one extra field, the parameter may be repeated to capture more specific instances such as `?extraFields=name1:value1&extraFields=name2,value2`, which will return all Companies where the extra fields `name1` and `name2` contain `value1` and `value2`, respectively.
- `bcOrderId` (integer, optional) — The ID of a BigCommerce order placed by a particular Company account.
- `orderId` (string, optional) — The ID of a BigCommerce order placed by a particular Company account.
- `bcGroupId` (string, optional) — The ID of the BigCommerce customer group assigned to the Company account.
- `customerId` (integer, optional) — The ID of a BigCommerce customer account with a corresponding Company user account.
- `extraFieldFilterType` (enum, optional, default: search) — Establishes how results are filtered when using the `extraFields` parameter. The `search` filter type allows for partial matches, while the `exact-match` filter type only returns results that exactly match the specified criteria. The filter type defaults to `search` when no parameter is provided.
  - Allowed values: `search`, `exact-match`

## Response

### 200

OK

- `code` (double, optional)
- `data` (list of CompaniesGetResponsesContentApplicationJsonSchemaDataItems, optional)
- `meta` (CompaniesGetResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### CompaniesGetResponsesContentApplicationJsonSchemaDataItems

- `companyName` (string, optional) — The name of the business associated with the Company account.
- `companyEmail` (string, optional) — The primary email address for the Company account.
- `companyPhone` (string, optional) — The primary phone number for the Company account.
- `companyId` (integer, optional) — Unique numeric ID of the Company account. This is a **read-only** field; do not set or modify its value in a `POST` or `PUT` request.
- `catalogId` (string, optional) — The ID of the price list assigned to the Company account. This field is read-only for stores using [Independent Companies Behavior](/developer/api-reference/rest/b2b/management/company/companies#independent-vs-dependent-companies-behavior). If your store uses legacy Dependent Companies behavior **and** it does not have Multi-Storefront enabled, this field is **required** for creating new Company accounts. If your store has Multi-Storefront enabled, use the `priceListAssign` array instead.
- `catalogName` (string, optional) — Catalog name
- `bcGroupName` (string, optional) — The internal name of the BigCommerce customer group assigned to the Company account. This field is read-only.
- `companyStatus` (enum, optional) — See [Company Status Codes](/developer/api-reference/rest/b2b/management/company/companies) to learn about their corresponding statuses.
  - Allowed values: `0`, `1`, `2`, `3`
- `parentCompany` (parentCompany, optional) — The name and ID of a Company account assigned as the parent of the Company in question. Leave these fields blank if the Company is at the top layer of its hierarchy.
- `priceListAssign` (list of PriceListAssignResponseItems, optional) — Use this array to assign a price list to a Company account if your store uses legacy Dependent Companies behavior *and* it has Multi-Storefront enabled. Use `catalogId` to assign price lists if you have not enabled Multi-Storefront. This field is read-only for stores using Independent Companies behavior. See [Independent Companies Behavior](/developer/api-reference/rest/b2b/management/company/companies#independent-vs-dependent-companies-behavior) for more information.
- `extraFields` (list of ExtraFieldsResponseItems, optional) — Controlled by isIncludeExtraFields params
- `uuid` (string, optional) — An external ID assigned to the Company account in a third-party system, such as an ERP. Leave this field blank if you do not have an external system.
- `updatedAt` (string, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the Company account was last updated. This is a read-only field.
- `createdAt` (string, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the Company account was created. This is a read-only field.
- `bcGroupId` (integer, optional) — The ID of the BigCommerce customer group assigned to the Company account. This field is read-only; use customerGroupID for POST/PUT requests.

### CompaniesGetResponsesContentApplicationJsonSchemaMeta

- `message` (string, optional)
- `pagination` (CompaniesGetResponsesContentApplicationJsonSchemaMetaPagination, optional)

### parentCompany

The name and ID of a Company account assigned as the parent of the Company in question. Leave these fields blank if the Company is at the top layer of its hierarchy.

- `id` (integer, optional) — The ID of the Company’s parent account in its hierarchy.
- `name` (string, optional) — The name of the Company’s parent account in its hierarchy.

### PriceListAssignResponseItems

- `channelId` (integer, optional) — The ID of the storefront channel where the price list is applied to the Company. Use 1 for your store’s default storefront channel.
- `priceListId` (integer, optional) — The ID of the price list assigned to the Company account.
- `priceListName` (string, optional) — The internal name of the price list assigned to the Company account.
- `channelName` (string, optional) — The name of the storefront channel where the price list is applied to the Company.

### ExtraFieldsResponseItems

- `fieldName` (string, optional) — The name of the Company extra field.
- `fieldValue` (string, optional) — The value of the Company extra field.
- `labelName` (string, optional) — The label name of the Company extra field. This value matches the value of `fieldName`.
- `isRequired` (enum, optional) — Indicates whether or not the extra field must be filled out in order to create a Company account. `0`=not required, `1`=required
  - Allowed values: `0`, `1`
- `dataType` (enum, optional) — The type of data that can be added as the extra field’s value. This shares the same value as the `fieldType` | Value | Type | | --- | ---| | `0` | text | | `1` | multi-line text | | `2` | numbers | | `3` | dropdown |
  - Allowed values: `0`, `1`, `2`, `3`
- `fieldType` (enum, optional) — The type of data that can be added as the extra field’s value. | Value | Type | | --- | ---| | `0` | text | | `1` | multi-line text | | `2` | numbers | | `3` | dropdown |
  - Allowed values: `0`, `1`, `2`, `3`

### CompaniesGetResponsesContentApplicationJsonSchemaMetaPagination

- `totalCount` (integer, optional) — The total number of items matching the query.
- `limit` (integer, optional) — Maximum number of results displayed per page.
- `offset` (integer, optional) — Number of results skipped before the current page.

## Examples

**Response**

```json
{
  "code": 1.1,
  "data": [
    {
      "companyName": "Great Buys Inc.",
      "companyEmail": "admin@greatbuys.com",
      "companyPhone": "8001234567",
      "companyId": 123456,
      "catalogId": "123456",
      "catalogName": "string",
      "bcGroupName": "Tier 3 B2B Clients",
      "companyStatus": "1",
      "parentCompany": {
        "id": 123456,
        "name": "Great Buys Inc"
      },
      "priceListAssign": [
        {
          "channelId": 10001234,
          "priceListId": 123456,
          "priceListName": "Tier 3 B2B Pricing",
          "channelName": "My BigCommerce Store"
        }
      ],
      "extraFields": [
        {
          "fieldName": "Customer Tax Code",
          "fieldValue": "Code G",
          "labelName": "Customer Tax Code",
          "isRequired": "0",
          "dataType": "0",
          "fieldType": 1
        }
      ],
      "uuid": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "updatedAt": "1618794615",
      "createdAt": "1618794615",
      "bcGroupId": 123
    }
  ],
  "meta": {
    "message": "string",
    "pagination": {
      "totalCount": 1,
      "limit": 1,
      "offset": 1
    }
  }
}
```

**SDK Code**

```python
import requests

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

querystring = {"bcGroupId":"123","bcOrderId":"102","companyEmail":"admin@greatbuys.com","companyStatus":"1","customerId":"123456","extraFieldFilterType":"exact-match","extraFields":"Customer Tax Code:G,FinTech Enabled:Yes","isIncludeExtraFields":"0","limit":"10","maxCreated":"1618794615","maxModified":"1618794615","minCreated":"1618794615","minModified":"1618794615","offset":"3","orderBy":"DESC","orderId":"102","q":"Great Buys","sortBy":"updatedAt"}

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

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

print(response.json())
```

```javascript
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt';
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/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt"

	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/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt")

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/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt")
  .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/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt', [
  'headers' => [
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt");
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/companies?bcGroupId=123&bcOrderId=102&companyEmail=admin%40greatbuys.com&companyStatus=1&customerId=123456&extraFieldFilterType=exact-match&extraFields=Customer+Tax+Code%3AG%2CFinTech+Enabled%3AYes&isIncludeExtraFields=0&limit=10&maxCreated=1618794615&maxModified=1618794615&minCreated=1618794615&minModified=1618794615&offset=3&orderBy=DESC&orderId=102&q=Great+Buys&sortBy=updatedAt")! 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()
```