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

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

Retrieves limited information for all orders, including B2B-specific information like Company IDs and order extra fields. The response includes orders placed by B2C customers and guest shoppers. Use [Get Order Products](#get-order-products) to retrieve an order's product details, or use the BigCommerce [Orders V2 API](/developer/api-reference/rest/admin/management/orders) to retrieve all order details except those specific to B2B Edition, like Company ID and extra fields.

Use the parameters to filter the returned orders by attributes like associated Company ID, date created, or storefront channel. You can also set the `showExtra` parameter to `true` in order to return extra field values associated with the order.

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

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

- `companyId` (integer, optional) — Unique numeric ID of the Company account.
- `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`.
- `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: `DESC`, `ASC`
- `sortBy` (enum, optional, default: updatedAt) — Sorts results by creation date or the last updated date. It defaults to the last updated date if no parameter is provided.
  - Allowed values: `createdAt`, `updatedAt`
- `bcOrderId` (integer, optional) — The BigCommerce order ID. This parameter **does not** accept the B2B Edition order ID returned in certain [Server to Server Orders](/developer/api-reference/rest/b2b/management/orders) endpoints.
- `minModified` (integer, optional) — Enter a [Unix timestamp](https://www.unixtimestamp.com/) to retrieve all orders updated after that time.
- `maxModified` (integer, optional) — Enter a [Unix timestamp](https://www.unixtimestamp.com/) to retrieve all orders updated before that time.
- `minCreated` (integer, optional) — Enter a [Unix timestamp](https://www.unixtimestamp.com/) to retrieve all orders created after that time.
- `maxCreated` (integer, optional) — Enter a [Unix timestamp](https://www.unixtimestamp.com/) to retrieve all orders created before that time.
- `showExtra` (boolean, optional, default: false) — Indicates whether or not extra fields should be included in the response.
- `channelIds[]` (list of double, optional, default: 1) — BigCommerce channel IDs

## Response

### 200

OK

- `code` (integer, optional)
- `meta` (OrdersGetResponsesContentApplicationJsonSchemaMeta, optional)
- `data` (list of orderData_ALL, optional)

## Types

### OrdersGetResponsesContentApplicationJsonSchemaMeta

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

### orderData_ALL

- `id` (integer, optional) — The unique identifier of the order in B2B Edition.
- `bcOrderId` (integer, optional) — The BigCommerce order ID.
- `totalIncTax` (float, optional) — The order's total value including tax.
- `poNumber` (string, optional) — The order's Purchase Order (PO), if used.
- `status` (string, optional) — The default name of the order status. See [Order Statuses](/developer/api-reference/rest/admin/management/orders/order-status) for a complete list of accepted status names. -
- `customStatus` (string, optional) — The customized name of the order status.
- `cartId` (integer, optional) — The unique identifier of the cart generated for the order.
- `items` (integer, optional) — The total quantity of products in the order.
- `usdIncTax` (float, optional) — The order's total value in USD, including tax.
- `companyId` (integer, optional) — The unique numeric ID of a Company account.
- `currencyCode` (string, optional) — The three-letter code corresponding to the order’s currency.
- `money` (list of MoneyItems, optional) — Contains detailed information regarding the order's currency.
- `statusCode` (integer, optional) — The numeric code associated with the order status. See [Order Statuses](/developer/api-reference/rest/admin/management/orders/order-status) for a complete list of accepted status names.
- `isArchived` (boolean, optional) — Indicates whether the order is archived.
- `channelId` (integer, optional) — The storefront channel ID where the order was placed.
- `channelName` (string, optional) — The name of the storefront channel where the order was placed.
- `extraInt1` (integer, optional) — A legacy integer extra field configuration that does not return data in newer stores.
- `extraInt2` (integer, optional) — A legacy integer extra field configuration that does not return data in newer stores.
- `extraInt3` (integer, optional) — A legacy integer extra field configuration that does not return data in newer stores.
- `extraInt4` (integer, optional) — A legacy integer extra field configuration that does not return data in newer stores.
- `extraInt5` (integer, optional) — A legacy integer extra field configuration that does not return data in newer stores.
- `extraStr1` (string, optional) — A legacy string extra field configuration that does not return data in newer stores.
- `extraStr2` (string, optional) — A legacy string extra field configuration that does not return data in newer stores.
- `extraStr3` (string, optional) — A legacy string extra field configuration that does not return data in newer stores.
- `extraStr4` (string, optional) — A legacy string extra field configuration that does not return data in newer stores.
- `extraStr5` (string, optional) — A legacy string extra field configuration that does not return data in newer stores.
- `extraText` (string, optional) — A legacy text extra field configuration that does not return data in newer stores.
- `extraInfo` (list of ExtraInfoItems, optional) — Contains billing and shipping address identifiers.
- `extraFields` (list of any, optional) — Contains extra field information associated with the order.
- `createdAt` (integer, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the order was created. This is a read-only field.
- `updatedAt` (integer, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the order was last updated. This is a read-only field.

### OrdersGetResponsesContentApplicationJsonSchemaMetaPagination

- `totalCount` (integer, optional)
- `limit` (integer, optional)
- `offset` (integer, optional)

### MoneyItems

- `currencyLocation` (enum, optional) — Determines whether the currency symbol is added to the left or the right of order pricing.
  - Allowed values: `left`, `right`
- `currencyToken` (string, optional) — The currency symbol.
- `decimalToken` (string, optional) — The character used to separate the whole number from the decimal in order pricing.
- `decimalPlaces` (integer, optional) — The number of decimal places used in order pricing.
- `thousandsToken` (string, optional) — The character used to separate the hundredths and thousandths places in order pricing."

### ExtraInfoItems

- `billingAddressId` (integer, optional) — The unique identifier for billing address in the Company account.
- `shippingAddressId` (integer, optional) — The unique identifier for shipping address in the Company account.

## Examples

### without-extra-fields

**Response**

```json
{
  "code": 200,
  "meta": {
    "message": "SUCCESS",
    "pagination": {
      "totalCount": 9,
      "limit": 1,
      "offset": 0
    }
  },
  "data": [
    {
      "id": 12345,
      "bcOrderId": 123,
      "totalIncTax": 2210.47,
      "poNumber": "04152025-0002",
      "status": "Awaiting Payment",
      "customStatus": "Invoice Sent",
      "cartId": 123456,
      "items": 50,
      "usdIncTax": 2210.47,
      "companyId": 12345,
      "currencyCode": "USD",
      "money": [
        {
          "currencyLocation": "left",
          "currencyToken": "$",
          "decimalToken": ".",
          "decimalPlaces": 2,
          "thousandsToken": ","
        }
      ],
      "statusCode": 7,
      "isArchived": false,
      "channelId": 1,
      "channelName": "B2B Store",
      "createdAt": 1574999690,
      "updatedAt": 1574999690
    }
  ]
}
```

**SDK Code**

```python without-extra-fields
import requests

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

querystring = {"bcOrderId":"123","channelIds[]":"[1.1]","companyId":"123456","limit":"15","maxCreated":"1622619778","maxModified":"1622619778","minCreated":"1622619778","minModified":"1622619778","offset":"5","orderBy":"ASC","showExtra":"false","sortBy":"updatedAt"}

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

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

print(response.json())
```

```javascript without-extra-fields
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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 without-extra-fields
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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 without-extra-fields
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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 without-extra-fields
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/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&sortBy=updatedAt")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

```php without-extra-fields
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&sortBy=updatedAt', [
  'headers' => [
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp without-extra-fields
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&sortBy=updatedAt");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift without-extra-fields
import Foundation

let headers = ["X-Auth-Token": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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()
```

### with-extra-fields

**Response**

```json
{
  "code": 200,
  "meta": {
    "message": "SUCCESS",
    "pagination": {
      "totalCount": 9,
      "limit": 1,
      "offset": 0
    }
  },
  "data": [
    {
      "id": 12345,
      "bcOrderId": 123,
      "totalIncTax": 2210.47,
      "poNumber": "04152025-0002",
      "status": "Awaiting Payment",
      "customStatus": "Invoice Sent",
      "cartId": 123456,
      "items": 50,
      "usdIncTax": 2210.47,
      "companyId": 12345,
      "currencyCode": "USD",
      "money": [
        {
          "currencyLocation": "left",
          "currencyToken": "$",
          "decimalToken": ".",
          "decimalPlaces": 2,
          "thousandsToken": ","
        }
      ],
      "statusCode": 7,
      "isArchived": false,
      "channelId": 1,
      "channelName": "B2B Store",
      "extraInfo": [
        {
          "billingAddressId": 12345,
          "shippingAddressId": 12345
        }
      ],
      "extraFields": [
        {
          "fieldName": "Fintech ID",
          "fieldValue": "1234567890"
        }
      ],
      "createdAt": 1574999690,
      "updatedAt": 1574999690
    }
  ]
}
```

**SDK Code**

```python with-extra-fields
import requests

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

querystring = {"bcOrderId":"123","channelIds[]":"[1.1]","companyId":"123456","limit":"15","maxCreated":"1622619778","maxModified":"1622619778","minCreated":"1622619778","minModified":"1622619778","offset":"5","orderBy":"ASC","showExtra":"false","sortBy":"updatedAt"}

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

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

print(response.json())
```

```javascript with-extra-fields
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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 with-extra-fields
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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 with-extra-fields
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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 with-extra-fields
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/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&sortBy=updatedAt")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

```php with-extra-fields
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&sortBy=updatedAt', [
  'headers' => [
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp with-extra-fields
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&sortBy=updatedAt");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift with-extra-fields
import Foundation

let headers = ["X-Auth-Token": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v3/io/orders?bcOrderId=123&channelIds%5B%5D=%5B1.1%5D&companyId=123456&limit=15&maxCreated=1622619778&maxModified=1622619778&minCreated=1622619778&minModified=1622619778&offset=5&orderBy=ASC&showExtra=false&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()
```