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

GET https://api.bigcommerce.com/stores/{store_hash}/v2/orders/count

Gets an array of orders in the store organized by order status.

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

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Orders | modify | `store_v2_orders` | | Orders | read-only | `store_v2_orders_read_only` | ### Authentication header | 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#api-accounts). | ### Further reading 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).

## Request

### Path parameters

- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

### Query parameters

- `min_id` (integer, optional) — The minimum order ID.
- `max_id` (integer, optional) — The maximum order ID.
- `min_total` (float, optional) — The minimum order total in floating point format. eg. 12.50
- `max_total` (double, optional) — The maximum order total in floating point format. eg. 12.50
- `customer_id` (integer, optional) — Customer ID.
- `email` (string, optional) — The email of the customer.
- `status_id` (integer, optional) — The status ID of the order. You can get the status id from the `/orders` endpoints.
- `cart_id` (string, optional) — The cart ID of the order.
- `payment_method` (string, optional) — The display name of the payment method used on the order. For example, `Manual`, `Credit Card`, `cash`, `Test Payment Gateway`, etc.'
- `min_date_created` (string, optional) — Minimum date the order was created in RFC-2822 or ISO-8601. RFC-2822: `Thu, 20 Apr 2017 11:32:00 -0400` ISO-8601: `2017-04-20T11:32:00.000-04:00`
- `max_date_created` (string, optional) — Maximum date the order was created in RFC-2822 or ISO-8601. RFC-2822: `Thu, 20 Apr 2017 11:32:00 -0400` ISO-8601: `2017-04-20T11:32:00.000-04:00`
- `min_date_modified` (string, optional) — Minimum date the order was modified in RFC-2822 or ISO-8601. RFC-2822: `Thu, 20 Apr 2017 11:32:00 -0400` ISO-8601: `2017-04-20T11:32:00.000-04:00`
- `max_date_modified` (string, optional) — Maximum date the order was modified in RFC-2822 or ISO-8601. RFC-2822: `Thu, 20 Apr 2017 11:32:00 -0400` ISO-8601: `2017-04-20T11:32:00.000-04:00`
- `channel_id` (integer, optional) — The channel ID of the sales channel the shopper used to place the order.
- `external_order_id` (string, optional) — The order ID in another system, such as the Amazon Order ID if this is an Amazon order. After setting it, you can update this field using a POST or PUT request.

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

## Response

### 200

Order Counter response collection.

- `statuses` (list of ordersCountStatus, optional)
- `count` (double, optional) — Total number of orders in the store.

## Types

### ordersCountStatus

- `count` (integer, optional) — Number of orders that exist with this status.
- `custom_label` (string, optional) — Custom order status label given in the control panel.
- `id` (integer, optional) — The ID of the type of order status.
- `name` (string, optional) — Name of the type of order status.
- `sort_order` (integer, optional) — The sort order of the order status from the control panel.
- `system_description` (string, optional) — System description of the order status.
- `system_label` (string, optional) — System name of the type of order status.

## Examples

**Response**

```json
{
  "statuses": [
    {
      "count": 15,
      "custom_label": "Incomplete - Testing",
      "id": 0,
      "name": "Incomplete",
      "sort_order": 0,
      "system_description": "An incomplete order happens when a shopper reached the payment page, but did not complete the transaction.",
      "system_label": "Incomplete"
    },
    {
      "count": 4,
      "custom_label": "Pending",
      "id": 1,
      "name": "Pending",
      "sort_order": 1,
      "system_description": "Customer started the checkout process, but did not complete it.",
      "system_label": "Pending"
    },
    {
      "count": 48,
      "custom_label": "Awaiting Payment",
      "id": 7,
      "name": "Awaiting Payment",
      "sort_order": 2,
      "system_description": "Customer has completed checkout process, but payment has yet to be confirmed.",
      "system_label": "Awaiting Payment"
    },
    {
      "count": 31,
      "custom_label": "Awaiting Fulfillment",
      "id": 11,
      "name": "Awaiting Fulfillment",
      "sort_order": 3,
      "system_description": "Customer has completed the checkout process and payment has been confirmed.",
      "system_label": "Awaiting Fulfillment"
    },
    {
      "count": 1,
      "custom_label": "Awaiting Shipment",
      "id": 9,
      "name": "Awaiting Shipment",
      "sort_order": 4,
      "system_description": "Order has been pulled and packaged, and is awaiting collection from a shipping provider.",
      "system_label": "Awaiting Shipment"
    },
    {
      "count": 0,
      "custom_label": "Awaiting Pickup",
      "id": 8,
      "name": "Awaiting Pickup",
      "sort_order": 5,
      "system_description": "Order has been pulled, and is awaiting customer pickup from a seller-specified location.",
      "system_label": "Awaiting Pickup"
    },
    {
      "count": 1,
      "custom_label": "Partially Shipped",
      "id": 3,
      "name": "Partially Shipped",
      "sort_order": 6,
      "system_description": "Only some items in the order have been shipped, due to some products being pre-order only or other reasons.",
      "system_label": "Partially Shipped"
    },
    {
      "count": 11,
      "custom_label": "Completed - Testing",
      "id": 10,
      "name": "Completed",
      "sort_order": 7,
      "system_description": "Client has paid for their digital product and their file(s) are available for download.",
      "system_label": "Completed"
    },
    {
      "count": 14,
      "custom_label": "Shipped",
      "id": 2,
      "name": "Shipped",
      "sort_order": 8,
      "system_description": "Order has been shipped, but receipt has not been confirmed; seller has used the Ship Items action.",
      "system_label": "Shipped"
    },
    {
      "count": 5,
      "custom_label": "Cancelled",
      "id": 5,
      "name": "Cancelled",
      "sort_order": 9,
      "system_description": "Seller has cancelled an order, due to a stock inconsistency or other reasons.",
      "system_label": "Cancelled"
    },
    {
      "count": 0,
      "custom_label": "Declined",
      "id": 6,
      "name": "Declined",
      "sort_order": 10,
      "system_description": "Seller has marked the order as declined for lack of manual payment, or other reasons.",
      "system_label": "Declined"
    },
    {
      "count": 2,
      "custom_label": "Refunded",
      "id": 4,
      "name": "Refunded",
      "sort_order": 11,
      "system_description": "Seller has used the Refund action.",
      "system_label": "Refunded"
    },
    {
      "count": 0,
      "custom_label": "Disputed",
      "id": 13,
      "name": "Disputed",
      "sort_order": 12,
      "system_description": "Customer has initiated a dispute resolution process for the PayPal transaction that paid for the order.",
      "system_label": "Disputed"
    },
    {
      "count": 0,
      "custom_label": "Manual Verification Required",
      "id": 12,
      "name": "Manual Verification Required",
      "sort_order": 13,
      "system_description": "Order is on hold while some aspect needs to be manually confirmed.",
      "system_label": "Manual Verification Required"
    },
    {
      "count": 1,
      "custom_label": "Partially Refunded",
      "id": 14,
      "name": "Partially Refunded",
      "sort_order": 14,
      "system_description": "Seller has partially refunded the order.",
      "system_label": "Partially Refunded"
    }
  ],
  "count": 133
}
```

**SDK Code**

```python response
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v2/orders/count"

headers = {
    "Accept": "application/json",
    "X-Auth-Token": "<apiKey>"
}

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

print(response.json())
```

```javascript response
const url = 'https://api.bigcommerce.com/stores/store_hash/v2/orders/count';
const options = {
  method: 'GET',
  headers: {Accept: 'application/json', '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 response
package main

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

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v2/orders/count"

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

	req.Header.Add("Accept", "application/json")
	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 response
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v2/orders/count")

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

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Token"] = '<apiKey>'

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

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

HttpResponse<String> response = Unirest.get("https://api.bigcommerce.com/stores/store_hash/v2/orders/count")
  .header("Accept", "application/json")
  .header("X-Auth-Token", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.bigcommerce.com/stores/store_hash/v2/orders/count', [
  'headers' => [
    'Accept' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp response
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v2/orders/count");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Token": "<apiKey>"
]

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