# /pre-orders/count-units/sku/:sku

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

#### Count open, canceled and exported units for the given SKU.

Request:

* `at_time` (ISO8610 timestamp) - Optional. Count open/canceled/exported units as of this timestamp. Defaults to now.

Body:

* `sku` - The SKU code of interest
* `at_time` - ISO8610 timestamp of the count calculation
* `open_units` - The number of units purchased through and still being held in Purple Dot because they are not yet ready for fulfilment. Excludes any units that are canceled or exported. An open unit can become either canceled or exported, not both.
* `canceled_units` - The number of units purchased through and held in Purple Dot that were later canceled (either by the shopper or the merchant).
* `exported_units` - The number of units purchased through Purple Dot that were held in Purple Dot that were later exported to the external eCommerce platform.

Examples:

{% code overflow="wrap" %}

```
curl --request GET \
     --url 'https://www.purpledotprice.com/admin/api/v1/pre-orders/count-units/sku/LRS221?at_time=2023-08-18T09:57:49.576Z' \
     --header 'X-Purple-Dot-Access-Token: <access_token>'
```

{% endcode %}

{% code overflow="wrap" %}

```json
{
  "meta": {
    "result": "success"
  },
  "data": {
    "sku": "LRS221",
    "at_time": "2023-08-18T09:57:49.576Z",
    "open_units": 14,
    "canceled_units": 15,
    "exported_units": 12,
  }
}
```

{% 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-units-sku-sku.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.
