> 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 Super Admin's Assigned Companies

GET https://api-b2b.bigcommerce.com/api/v2/sales-reps/{superAdminId}/companies

Returns the list of Companies that the Super Admin is assigned to.

Equivalent Storefront GraphQL API Query: `superAdminCompanies`. 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/sales-rep/super-admin/get-sales-reps-sales-rep-id-companies

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

- `superAdminId` (integer, required) — The unique numeric ID assigned to the Super Admin by B2B Edition. This ID does **not** match the BigCommerce customer account ID. To find the ID of a given Super Admin account, use the [Server-to-Server Super Admin API](/developer/api-reference/rest/b2b/management/super-admin).

### Query parameters

- `offset` (integer, optional, default: 0) — Number of results to skip before displaying the current page.
- `limit` (integer, optional, default: 10) — Maximum number of results to display per page. Values over `250` will return only `250` results.
- `orderBy` (enum, optional) — Determines the Company field by which results will be sorted. If this is omitted, results are sorted by `companyId`.
  - Allowed values: `companyName`, `companyAdminName`, `companyEmail`
- `sortBy` (enum, optional, default: DESC) — Determines the sort order (ascending or descending) of the results.
  - Allowed values: `DESC`, `ASC`
- `q` (string, optional) — Search string for filtering results. If this parameter is provided, results will include entries with a partial match in `companyName` or `companyAdminEmail`.
- `companyId` (string, optional) — Search string for filtering results by `companyId`. Only returns data with an exact match in `companyId`. This ID does **not** match the ID shown in B2B Edition. To get a specific Company's ID, use the [Server-to-Server Company API](/developer/api-reference/rest/b2b/management/company/companies).

## Response

### 200

OK

- `code` (integer, optional, default: 200) — The HTTP Status code of the response.
- `message` (string, optional, default: SUCCESS) — Response message.
- `data` (SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaData, optional)
- `pagination` (SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaPagination, optional)

## Errors

### 403 Forbidden Error

Unauthorized This response is returned if the Bearer Token included with the request does not match the `superAdminId`.

- `any`

## Types

### SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaData

- `list` (list of SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaDataListItems, optional)

### SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaPagination

- `totalCount` (integer, optional) — The total number of items in the results.
- `perCount` (integer, optional) — The total number of items matching the search query.
- `offset` (integer, optional, default: 0) — The starting offset for the current page of the response.
- `limit` (integer, optional) — The maximum number of items allowed per page of the response.

### SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaDataListItems

- `companyName` (string, optional) — The name of the business associated with the Company account.
- `companyId` (string, optional) — Unique numeric ID of the Company account. This is a **read-only** field.
- `extraFields` (list of SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaDataListItemsExtraFieldsItems, optional)
- `bcGroupName` (string, optional) — The BigCommerce customer group associated with the Company. If [Independent Company behavior](https://support.bigcommerce.com/s/article/Companies-and-Customer-Groups) is enabled, this field is not used.
- `companyAdminName` (string, optional) — The name of the primary admin user for the Company.
- `companyEmail` (string, optional) — The email address of the primary admin user for the Company.

### SalesRepsSuperAdminIdCompaniesGetResponsesContentApplicationJsonSchemaDataListItemsExtraFieldsItems

- `fieldName` (string, optional) — The name of the extra field.
- `fieldValue` (string, optional) — The value of the extra field.

## Examples

**Response**

```json
{
  "code": 200,
  "message": "SUCCESS",
  "data": {
    "list": [
      {
        "companyName": "Great Buys, Inc.",
        "companyId": "123456",
        "extraFields": [
          {
            "fieldName": "Company Tax Code",
            "fieldValue": "Tax Code G"
          }
        ],
        "bcGroupName": "Great Buys Customers",
        "companyAdminName": "Marie Curie",
        "companyEmail": "admin@example.com"
      }
    ]
  },
  "pagination": {
    "totalCount": 279,
    "perCount": 33,
    "offset": 0,
    "limit": 10
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-b2b.bigcommerce.com/api/v2/sales-reps/1/companies"

querystring = {"companyId":"654321","q":"Great Buys"}

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

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

print(response.json())
```

```javascript
const url = 'https://api-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys';
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-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys"

	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-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys")

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-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys");
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-b2b.bigcommerce.com/api/v2/sales-reps/1/companies?companyId=654321&q=Great+Buys")! 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()
```