> 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 BC Order's 'Company attribute'

POST https://api-b2b.bigcommerce.com/api/v2/io/orders/company
Content-Type: application/json

Add Company identifier for BigCommerce Customer Individual Orders, which can be used to convert BigCommerce Customer Individual Orders to Company-level Orders.

Reference: https://docs.bigcommerce.com/developer/docs/archive/b2b-edition/v2-api/order/orders-company-create

## Authentication

- `authToken` header (required) — API Key authentication via header

## Request

### Headers

- `authToken` (string, required) — Auth token in header.

### Body (application/json)

This endpoint expects an object.

- `customerID` (string, required) — BigCommerce user id.

## Response

### 200

Response Success

- `code` (double, optional) — Response status code
- `data` (OrdersCompanyPostResponsesContentApplicationJsonSchemaData, optional) — Response data
- `message` (string, optional) — Response message

## Errors

### 400 Bad Request Error

Response Bad Request

- `code` (double, optional) — Response status error code
- `data` (OrdersCompanyPostResponsesContentApplicationJsonSchemaData, optional) — Response error data
- `message` (string, optional) — Response error message

## Types

### OrdersCompanyPostResponsesContentApplicationJsonSchemaData

Response error data

- `[field]` (string, optional) — Message about problem with field 'field'

## Examples

**Request**

```json
{
  "customerID": "string"
}
```

**Response**

```json
{
  "code": 200,
  "data": {},
  "message": "Success"
}
```

**SDK Code**

```shell Shell

curl --location --request POST 'localhost:8000/api/v2/io/orders/convert-from-bc'                         --header 'authToken: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImtpZG8uemhhb0BidW5kbGViMmIubmV0Iiwic3RvcmVfaGFzaCI6IjFpNnpweHBlM2ciLCJkYiI6ImRlZmF1bHQiLCJpc19iYWNrZW5kX3VzZXIiOiIyIn0.BpLPDLnmSEHgXw5Rf06G2kp0bKbMaJhxSxAuUW9vRo4'                         --header 'Content-Type: application/json'                         --data-raw '{
    "customerID": "7566"
}'

```

```python Python

                        import requests

                        url = "https://api-b2b.bigcommerce.com/api/v2/io/orders/convert-from-bc"

                        payload = "{
    "customerID": "7566"
}"
                        headers = {
                          'authToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImtpZG8uemhhb0BidW5kbGViMmIubmV0Iiwic3RvcmVfaGFzaCI6IjFpNnpweHBlM2ciLCJkYiI6ImRlZmF1bHQiLCJpc19iYWNrZW5kX3VzZXIiOiIyIn0.BpLPDLnmSEHgXw5Rf06G2kp0bKbMaJhxSxAuUW9vRo4',
                          'Content-Type': 'application/json'
                        }

                        response = requests.request("POST", url, headers=headers, data = payload)

                        print(response.text.encode('utf8'))

```

```javascript JavaScript

var myHeaders = new Headers();
myHeaders.append("authToken", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6ImtpZG8uemhhb0BidW5kbGViMmIubmV0Iiwic3RvcmVfaGFzaCI6IjFpNnpweHBlM2ciLCJkYiI6ImRlZmF1bHQiLCJpc19iYWNrZW5kX3VzZXIiOiIyIn0.BpLPDLnmSEHgXw5Rf06G2kp0bKbMaJhxSxAuUW9vRo4");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({"customerID":"7566"});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api-b2b.bigcommerce.com/api/v2/io/orders/convert-from-bc", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

```

```go Order_orders_company_create_example
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v2/io/orders/company"

	payload := strings.NewReader("{\n  \"customerID\": \"string\"\n}")

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

	req.Header.Add("authToken", "<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 Order_orders_company_create_example
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v2/io/orders/company")

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

request = Net::HTTP::Post.new(url)
request["authToken"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"customerID\": \"string\"\n}"

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

```java Order_orders_company_create_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-b2b.bigcommerce.com/api/v2/io/orders/company")
  .header("authToken", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"customerID\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-b2b.bigcommerce.com/api/v2/io/orders/company', [
  'body' => '{
  "customerID": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'authToken' => '<apiKey>',
  ],
]);

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

```csharp Order_orders_company_create_example
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/io/orders/company");
var request = new RestRequest(Method.POST);
request.AddHeader("authToken", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"customerID\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Order_orders_company_create_example
import Foundation

let headers = [
  "authToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["customerID": "string"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v2/io/orders/company")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```