# /pre-orders/count

#### [`GET /pre-orders/count`](#count-all-pre-orders) <a href="#get-pre-orders" id="get-pre-orders"></a>

#### Count all pre-orders.

Request:

* `created_at_min` (ISO8610 timestamp) - Optional. Count pre-orders created since the given time
* `updated_at_min` (ISO8610 timestamp) - Optional. Count pre-orders updated since the given time
* `updated_at_max` (ISO8610 timestamp) - Optional. Count pre-orders updated no sooner than the given time
* `skus` (string) - Optional. Comma separated list of product variant SKUs
* `email` (string) - Optional. List pre-orders placed by the given email
* `all_line_items` (string) - Optional. Count pre-orders where every line item is any of these comma separated states. Currently supported are `cancelled` and `exported`
* `some_line_item` (string) - Optional. Count pre-orders where at least 1 line item is any of these comma separated states. Currently supported are `cancelled` and `exported`. Cannot be used in conjunction with `all_line_items`

Body:

* `count` - The number of pre-orders that meet the requested criteria

Examples:

{% code overflow="wrap" %}

```
curl --request GET \
     --url 'https://www.purpledotprice.com/admin/api/v1/pre-orders/count?created_at_min=2023-08-17T00:00:00.000Z&all_line_items=cancelled&skus=TEST1&limit=1' \
     --header 'X-Purple-Dot-Access-Token: <access_token>'
```

{% endcode %}

{% code overflow="wrap" %}

```json
{
  "meta": {
    "result": "success"
  },
  "data": {
    "count": 1
  }
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getpurpledot.com/docs/purple-dot-apis/private-api/pre-orders-count.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
