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

# Update Companies (batch)

PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk
Content-Type: application/json

Updates up to `10` Company accounts at once. See [Update a Company](#update-a-company) for recommendations on formatting individual Companies in the array.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/management/company/companies/put-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

### Body (application/json)

This endpoint expects an object.

- `companyId` (integer, required) — 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.
- `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.
- `customerGroupId` (integer, optional) — The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See [Independent Companies Behavior](/developer/api-reference/rest/b2b/management/company/companies#independent-vs-dependent-companies-behavior) for more information.
- `addressLine1` (string, optional) — The first line of the primary address for the Company account.
- `addressLine2` (string, optional) — The second line of the primary address for the Company account.
- `city` (string, optional) — The city of the primary address for the Company account.
- `state` (string, optional) — The state of the primary address for the Company account, if applicable. This must be the full name and not an abbreviation.
- `country` (string, optional) — The country of the primary address for the Company account. This must be either the full name or the ISO2 country code.
- `zipCode` (string, optional) — The postal code of the primary address for the Company account.
- `priceListAssign` (list of PriceListAssignRequestItems, 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 CompaniesBulkPutRequestBodyContentApplicationJsonSchemaExtraFieldsItems, optional) — To use customized extra fields with field names you need to first add company extra fields in Settings > Extra fields inside B2B edition. e.g., If you want to create a new company with an extra integer field named licenseNO, you can use this structure \[\{'fieldName': 'LicenseNO', 'fieldValue': 10342340323}] in the request body.

## Response

### 200

OK

- `code` (double, optional)
- `meta` (CompaniesBulkPutResponsesContentApplicationJsonSchemaMeta, optional)
- `data` (CompaniesBulkPutResponsesContentApplicationJsonSchemaData, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `code` (double, optional)
- `data` (CompaniesBulkPutResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesBulkPutResponsesContentApplicationJsonSchemaMeta, optional)

### 404 Not Found Error

Not Found

- `code` (double, optional)
- `data` (CompaniesBulkPutResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesBulkPutResponsesContentApplicationJsonSchemaMeta, optional)

### 413 Content Too Large Error

Request Entity Too Large. In normal conditions, the bulk create or update method supports 10 entities in one request.

- `code` (integer, optional) — HTTP status code of the response.
- `data` (CompaniesBulkPutResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesBulkPutResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### PriceListAssignRequestItems

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

### CompaniesBulkPutRequestBodyContentApplicationJsonSchemaExtraFieldsItems

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

### CompaniesBulkPutResponsesContentApplicationJsonSchemaMeta

- `message` (string, optional) — Response message.

### CompaniesBulkPutResponsesContentApplicationJsonSchemaData

## Examples

**Request**

```json
{
  "companyId": 123456
}
```

**Response**

```json
{
  "code": 200,
  "meta": {
    "message": "SUCCESS"
  },
  "data": {
    "companyId": 12
  }
}
```

**SDK Code**

```python Update a company
import requests

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

payload = { "companyId": 123456 }
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Update a company
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk';
const options = {
  method: 'PUT',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"companyId":123456}'
};

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

```go Update a company
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"companyId\": 123456\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Update a company
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk")

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

request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"companyId\": 123456\n}"

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

```java Update a company
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"companyId\": 123456\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk', [
  'body' => '{
  "companyId": 123456
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Update a company
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk");
var request = new RestRequest(Method.PUT);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"companyId\": 123456\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update a company
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["companyId": 123456] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v3/io/companies/bulk")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```