> 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/v2/orders

Retrieves information for all orders placed by the Company user.

Filter the order list using parameters. Common use cases include:

- Retrieving orders placed within a specific date range (using `beginDateAt` and `endDateAt`)
- Retrieving orders with a specific Purchase Order (PO) number
- Retrieving orders in a specific status

Use [Get Order Details](#get-order-details) to retrieve more detailed information about a specific order, such as product attributes, shipping method, and granular pricing.

Equivalent Storefront GraphQL API Query: `allOrders`. 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/orders/get-orders

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

### Query parameters

- `beginDateAt` (datetime, optional) — Enter a date in `%m/%d/%Y` format to retrieve all orders placed after that time. If the parameter is not included in the request, the resposne includes orders placed 30 days before the current date.
- `endDateAt` (datetime, optional) — Enter a date in `%m/%d/%Y` format to retrieve all orders placed before that time. If the parameter is not included in the request, the current date is used.
- `orderBy` (enum, optional, default: createdAt) — Sorts results by total value including tax or creation date. It defaults to the creation date if no parameter is provided.
  - Allowed values: `createdAt`, `totalIncTax`
- `sortBy` (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`
- `offset` (integer, optional, default: 0) — The number of results to skip before returning the first result. If left blank, this defaults to 0.
- `limit` (integer, optional, default: 10) — Determines the number of records to return per page. If left blank, this defaults to 10.
- `isShowMy` (enum, optional, default: 0) — Indicates whether or not to include orders placed by other buyers in the Company account. `0` indicates that only orders placed by the authenticated user are returned, while `1` indicates that orders placed by other buyers in the Company account are also included. **Note:** This is only supported if you have generated a storefront authToken for a Company user in the predefined **Admin** or **Senior Buyer** role. Junior Buyers, as well as custom buyer roles, are not compatible with this parameter.
  - Allowed values: `0`, `1`
- `includeExtra` (enum, optional, default: 0) — Indicates whether or not extra field information is included in the response. It defaults to including extra fields if the parmeter is omitted. `0` indicates that extra fields are included, while `1` indicates that extra fields are not included.
  - Allowed values: `0`, `1`
- `q` (string, optional) — Enter order information to return partial and exact matches. Accepted information fields include order ID, order status name, Purchase Order (PO) number, and total order value including tax.
- `companyName` (string, optional) — Enter a full or partial Company name to retrieve relevant orders.
- `orderNumber` (integer, optional) — The BigCommerce order ID. This parameter does not accept the B2B Edition order ID returned in certain [Server to Server Orders endpoints](/developer/api-reference/rest/b2b/management/orders).
- `poNumber` (string, optional) — The order's Purchase Order (PO), if used.
- `status[]` (string, optional) — Enter the original order status name to return orders in that status. This parameter does not accept custom order status names or status codes as valid values. See [Order Statuses](/developer/api-reference/rest/admin/management/orders/order-status) for a complete list of accepted status names. This parameter is not an array, but you can filter for multiple order statuses by including additional status[] parameters in the query. For example, `?status[]=Awaiting Payment&status[]=Completed`.

## Response

### 200

OK

- `data` (OrdersGetResponsesContentApplicationJsonSchemaData, required)
- `code` (integer, optional, default: 200) — HTTP Response Code
- `message` (string, optional, default: SUCCESS)

## Types

### OrdersGetResponsesContentApplicationJsonSchemaData

- `list` (list of orderData_ALL, required) — Contains information fields associated with each order in the response.
- `paginator` (paginator, required) — Contains pagination information for the response.

### orderData_ALL

- `orderId` (string, optional) — The B2B Edition internal order ID. Note that this is different from the BigCommerce order ID returned in the `bcOrderId` field.
- `companyName` (string, optional) — The name of the Company associated with the order's buyer.
- `createdAt` (string, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the order was created. This is a read-only field.
- `updatedAt` (string, optional) — The [Unix timestamp](https://www.unixtimestamp.com/) for when the order was last updated. This is a read-only field.
- `isInvoiceOrder` (enum, optional) — Indicates whether the order is an invoice order. This is a read-only field. `0` indicates that the order is not an invoice order, while `1` indicates that it is an invoice order.
  - Allowed values: `0`, `1`
- `orderStatus` (string, optional) — The status of the order. This is a read-only field. See [Order Statuses](/developer/api-reference/rest/admin/management/orders/order-status) for a complete list of accepted status names.
- `customOrderStatus` (string, optional) — The customized name of the order status.
- `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 codes.
- `totalIncTax` (double, optional) — The order's total value including tax.
- `currencyCode` (string, optional) — The three-letter code corresponding to the order’s currency.
- `money` (money, optional) — Contains detailed information regarding the order's currency.
- `firstName` (string, optional) — The buyer's first name.
- `lastName` (string, optional) — The buyer's last name.
- `poNumber` (string, optional) — The order's Purchase Order (PO), if used.
- `referenceNumber` (string, optional) — The value of the Additional Payment Text Input Field enabled in B2B Edition's [Checkout settings](https://support.bigcommerce.com/s/article/B2B-Edition-Settings).
- `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` (extraFields, optional)

### paginator

Contains pagination information for the response.

- `totalCount` (integer, optional) — The total number of items in the response.
- `offset` (integer, optional) — The number of items skipped in the response before the first result.
- `limit` (integer, optional) — The maximum number of items that can be returned.

### money

Contains detailed information regarding the order's currency.

- `currency_location` (enum, optional) — The location of the currency symbol (left or right).
  - Allowed values: `left`, `right`
- `currency_token` (string, optional) — The currency symbol.
- `decimal_token` (string, optional) — The character used to separate decimal values in order pricing.
- `decimal_places` (integer, optional) — The number of decimal places displayed in order pricing.
- `thousands_token` (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.

### extraFields

- `extraFields` (list of ExtraFieldsExtraFieldsItems, optional) — Contains extra field information associated with the order.

### ExtraFieldsExtraFieldsItems

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

## Examples

### without-extra-fields

**Response**

```json
{
  "data": {
    "list": [
      {
        "orderId": 123,
        "companyName": "Great Buys Incorporated",
        "createdAt": "1743105969",
        "updatedAt": "1743105981",
        "isInvoiceOrder": 0,
        "orderStatus": "Awaiting Payment",
        "customOrderStatus": "Invoice Sent",
        "statusCode": 7,
        "totalIncTax": 3167.41,
        "currencyCode": "USD",
        "money": {
          "currency_location": "left",
          "currency_token": "$",
          "decimal_token": ".",
          "decimal_places": 2,
          "thousands_token": ","
        },
        "firstName": "Marie",
        "lastName": "Curie",
        "poNumber": "20250327-0001",
        "referenceNumber": "REF-12345",
        "channelName": "B2B Store"
      }
    ],
    "paginator": {
      "totalCount": 1,
      "offset": 0,
      "limit": 10
    }
  },
  "code": 200,
  "message": "SUCCESS"
}
```

**SDK Code**

```python without-extra-fields
import requests

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

querystring = {"beginDateAt":"01/01/2025","companyName":"Great Buys Incorporated","endDateAt":"01/01/2025","includeExtra":"1","isShowMy":"0","limit":"20","offset":"10","orderBy":"totalIncTax","orderNumber":"12345","poNumber":"03302025-0001","q":"Awaiting Payment","sortBy":"DESC","status[]":"Awaiting Payment"}

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

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

print(response.json())
```

```javascript without-extra-fields
const url = 'https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment';
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 without-extra-fields
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment"

	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 without-extra-fields
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment")

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 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/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment")
  .header("Authorization", "Bearer <token>")
  .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/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

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

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift without-extra-fields
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment")! 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
{
  "data": {
    "list": [
      {
        "orderId": 123,
        "companyName": "Great Buys Incorporated",
        "createdAt": "1743105969",
        "updatedAt": "1743105981",
        "isInvoiceOrder": 0,
        "orderStatus": "Awaiting Payment",
        "customOrderStatus": "Invoice Sent",
        "statusCode": 7,
        "totalIncTax": 3167.41,
        "currencyCode": "USD",
        "money": {
          "currency_location": "left",
          "currency_token": "$",
          "decimal_token": ".",
          "decimal_places": 2,
          "thousands_token": ","
        },
        "firstName": "Marie",
        "lastName": "Curie",
        "poNumber": "20250327-0001",
        "referenceNumber": "REF-12345",
        "channelName": "B2B Store",
        "extraInfo": [
          {
            "billingAddressId": 693471,
            "shippingAddressId": 693471
          }
        ],
        "extraFields": {
          "0": {
            "fieldName": "Fintech ID",
            "fieldValue": "eg934lert984356bf9"
          }
        }
      }
    ],
    "paginator": {
      "totalCount": 1,
      "offset": 0,
      "limit": 10
    }
  },
  "code": 200,
  "message": "SUCCESS"
}
```

**SDK Code**

```python with-extra-fields
import requests

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

querystring = {"beginDateAt":"01/01/2025","companyName":"Great Buys Incorporated","endDateAt":"01/01/2025","includeExtra":"1","isShowMy":"0","limit":"20","offset":"10","orderBy":"totalIncTax","orderNumber":"12345","poNumber":"03302025-0001","q":"Awaiting Payment","sortBy":"DESC","status[]":"Awaiting Payment"}

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

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

print(response.json())
```

```javascript with-extra-fields
const url = 'https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment';
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 with-extra-fields
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment"

	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 with-extra-fields
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment")

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 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/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment")
  .header("Authorization", "Bearer <token>")
  .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/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

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

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift with-extra-fields
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v2/orders?beginDateAt=01%2F01%2F2025&companyName=Great+Buys+Incorporated&endDateAt=01%2F01%2F2025&includeExtra=1&isShowMy=0&limit=20&offset=10&orderBy=totalIncTax&orderNumber=12345&poNumber=03302025-0001&q=Awaiting+Payment&sortBy=DESC&status%5B%5D=Awaiting+Payment")! 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()
```