> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/docs/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/docs/purple-dot-apis/private-api/pre-orders-count.md).

# /pre-orders/count

## Count pre-orders

> Counts all pre-orders that match the given criteria.

```json
{"openapi":"3.1.0","info":{"title":"Purple Dot Private API","version":"v1"},"tags":[{"name":"/pre-orders/count"}],"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":{"get":{"tags":["/pre-orders/count"],"summary":"Count pre-orders","description":"Counts all pre-orders that match the given criteria.","parameters":[{"schema":{"type":"string","description":"Pre-orders created at or after this time."},"required":false,"description":"Pre-orders created at or after this time.","name":"created_at_min","in":"query"},{"schema":{"type":"string","description":"Pre-orders updated at or after this time."},"required":false,"description":"Pre-orders updated at or after this time.","name":"updated_at_min","in":"query"},{"schema":{"type":"string","description":"Pre-orders updated at or before this time."},"required":false,"description":"Pre-orders updated at or before this time.","name":"updated_at_max","in":"query"},{"schema":{"type":"string","description":"Matches pre-orders where every line item has one of the listed states (comma-separated). Supported: `cancelled`, `exported`."},"required":false,"description":"Matches pre-orders where every line item has one of the listed states (comma-separated). Supported: `cancelled`, `exported`.","name":"all_line_items","in":"query"},{"schema":{"type":"string","description":"Matches pre-orders where at least one line item has one of the listed states (comma-separated). Supported: `cancelled`, `exported`. Cannot be combined with `all_line_items`."},"required":false,"description":"Matches pre-orders where at least one line item has one of the listed states (comma-separated). Supported: `cancelled`, `exported`. Cannot be combined with `all_line_items`.","name":"some_line_item","in":"query"},{"schema":{"type":"string","description":"Comma-separated product variant SKUs."},"required":false,"description":"Comma-separated product variant SKUs.","name":"skus","in":"query"},{"schema":{"type":"string","description":"Pre-orders placed by this email address."},"required":false,"description":"Pre-orders placed by this email address.","name":"email","in":"query"}],"responses":{"200":{"description":"The number of matching pre-orders.","content":{"application/json":{"schema":{"type":"object","properties":{"meta":{"type":"object","properties":{"result":{"type":"string","enum":["success"]}},"required":["result"]},"data":{"type":"object","properties":{"count":{"type":"integer"}},"required":["count"]}},"required":["meta","data"]}}}},"400":{"description":"Missing access token. Both `all_line_items` and `some_line_item` were passed.","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"}}}}}}}}}
```
