> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/purple-dot-apis/private-api/pre-orders-count-units-sku-sku.md). Agents can also search and read this documentation through its [MCP server](https://docs.getpurpledot.com/~gitbook/mcp).

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

## Count pre-order units for a SKU

> Returns counts of open, canceled and exported pre-order units for a single SKU.

```json
{"openapi":"3.1.0","info":{"title":"Purple Dot Private API","version":"v1"},"tags":[{"name":"/pre-orders/count-units/sku/:sku"}],"servers":[{"url":"https://www.purpledotprice.com/admin/api/v1","description":"Production"}],"security":[{"accessToken":[]}],"components":{"securitySchemes":{"accessToken":{"type":"apiKey","in":"header","name":"X-Purple-Dot-Access-Token","description":"Your store's private access token. It can also be sent as `Authorization: Bearer <token>`."}},"schemas":{"AuthErrorResponse":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]},"ErrorResponse":{"type":"object","properties":{"meta":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable message."},"errorData":{"type":"object","additionalProperties":{},"description":"Structured detail about the error."}},"required":["error","errorData"]},"data":{"type":"object","properties":{}}},"required":["meta","data"]}}},"paths":{"/pre-orders/count-units/sku/{sku}":{"get":{"tags":["/pre-orders/count-units/sku/:sku"],"summary":"Count pre-order units for a SKU","description":"Returns counts of open, canceled and exported pre-order units for a single SKU.","parameters":[{"schema":{"type":"string","description":"The SKU code to count."},"required":true,"description":"The SKU code to count.","name":"sku","in":"path"},{"schema":{"type":"string","description":"The counts reflect the state at this moment. Defaults to the current time. Cannot be in the future."},"required":false,"description":"The counts reflect the state at this moment. Defaults to the current time. Cannot be in the future.","name":"at_time","in":"query"}],"responses":{"200":{"description":"Unit counts.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"result":{"type":"string","enum":["success"]}},"required":["result"]},"data":{"type":"object","properties":{"sku":{"type":"string"},"at_time":{"type":"string","format":"date-time","description":"The time the counts were calculated for."},"open_units":{"type":"integer","description":"Units purchased through Purple Dot and still held there because they are not ready for fulfilment. An open unit ends up either canceled or exported, never both."},"canceled_units":{"type":"integer","description":"Units later canceled by the shopper or the merchant."},"exported_units":{"type":"integer","description":"Units later exported to the external e-commerce platform."}},"required":["sku","at_time","open_units","canceled_units","exported_units"]}},"required":["meta","data"]}}}},"400":{"description":"Missing access token. `at_time` is in the future, or the store’s platform is unsupported.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AuthErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"401":{"description":"Access token not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthErrorResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
