> 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 Company Orders

GET https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/orders

Get company all orders, with pagination data

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

## Authentication

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

## Request

### Path parameters

- `companyId` (string, required)

### Query parameters

- `offset` (double, optional) — Pagination offset default: 0
- `limit` (double, optional) — Pagination limit default: 10
- `orderBy` (string, optional) — in ['bcOrderId', 'totalIncTax', 'createdAt']
- `beginDateAt` (string, optional) — End date filter, in format '12/31/2019'
- `endDateAt` (string, optional) — End date filter, in format '12/31/2019'
- `includeExtra` (string, optional) — Switch show extra fields, allow: 0, 1
- `channelId` (double, optional) — BigCommerce channel id

### Headers

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

## Response

### 200

Response Success

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

## Errors

### 404 Not Found Error

Not Found Error

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

## Types

### CompaniesCompanyIdOrdersGetResponsesContentApplicationJsonSchemaData

Response data

- `errMsg` (string, optional) — Error message info

## Examples

**Response**

```json
{
  "code": 200,
  "data": {
    "list": [
      {
        "channelId": "1",
        "channelName": "test",
        "companyName": "fkkfcctest",
        "createdAt": "1572323610",
        "firstName": "james",
        "isInvoiceOrder": "0",
        "lastName": "liu",
        "orderId": "126",
        "orderStatus": "Awaiting Payment",
        "totalIncTax": "100.0000",
        "updatedAt": "1572323610"
      },
      {
        "channelId": "1",
        "channelName": "test",
        "companyName": "fkkfcctest",
        "createdAt": "1572323432",
        "firstName": "james",
        "isInvoiceOrder": "0",
        "lastName": "liu",
        "orderId": "124",
        "orderStatus": "Awaiting Payment",
        "totalIncTax": "50.0000",
        "updatedAt": "1572323432"
      },
      {
        "channelId": "1",
        "channelName": "test",
        "companyName": "fkkfcctest",
        "createdAt": "1572321777",
        "firstName": "james",
        "isInvoiceOrder": "0",
        "lastName": "liu",
        "orderId": "125",
        "orderStatus": "Awaiting Payment",
        "totalIncTax": "50.0000",
        "updatedAt": "1572321777"
      }
    ],
    "paginator": {
      "limit": 10,
      "offset": 0,
      "totalCount": 3
    }
  },
  "message": "SUCCESS"
}
```

**SDK Code**

```shell Shell

curl --location --request GET 'https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/orders'                         --header 'authToken: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdG9yZV9oYXNoIjoiZjJvc3hqam54aiIsImRiIjoiZGVmYXVsdCIsImVtYWlsIjoiYnJ1Y2UuaHVhbmdAc2lsa3NvZnR3YXJlLmNvbSJ9._DQFg-3FgtztdQVCGU5Gxfv8j8V3U9Ssaw7ARxUU6pY'

```

```python Python

import requests

url = "https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/orders"

payload = {}
headers = {
  'authToken': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdG9yZV9oYXNoIjoiZjJvc3hqam54aiIsImRiIjoiZGVmYXVsdCIsImVtYWlsIjoiYnJ1Y2UuaHVhbmdAc2lsa3NvZnR3YXJlLmNvbSJ9._DQFg-3FgtztdQVCGU5Gxfv8j8V3U9Ssaw7ARxUU6pY'
}

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

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

```

```javascript JavaScript

var myHeaders = new Headers();
myHeaders.append("authToken", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdG9yZV9oYXNoIjoiZjJvc3hqam54aiIsImRiIjoiZGVmYXVsdCIsImVtYWlsIjoiYnJ1Y2UuaHVhbmdAc2lsa3NvZnR3YXJlLmNvbSJ9._DQFg-3FgtztdQVCGU5Gxfv8j8V3U9Ssaw7ARxUU6pY");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

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

```

```go Order_companies_orders_list_example
package main

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

func main() {

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

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("authToken", "<apiKey>")

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

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

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

}
```

```ruby Order_companies_orders_list_example
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Get.new(url)
request["authToken"] = '<apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api-b2b.bigcommerce.com/api/v2/io/companies/companyId/orders")
  .header("authToken", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v2/io/companies/companyId/orders', [
  'headers' => [
    'authToken' => '<apiKey>',
  ],
]);

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

```csharp Order_companies_orders_list_example
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/io/companies/companyId/orders");
var request = new RestRequest(Method.GET);
request.AddHeader("authToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Order_companies_orders_list_example
import Foundation

let headers = ["authToken": "<apiKey>"]

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