# /variants/preorder-state

#### [`GET /variants/preorder-state`](#get-availability) <a href="#preorder-state-variants" id="preorder-state-variants"></a>

Get the pre-order state of a variant. Useful for determining whether a particular variant is on pre-order, for example when displaying a call to action on the PDP.

Request query parameters:

* `api_key` - Required. Your Purple Dot store's public API key
* `variant_id`- Required. The Shopify variant id of the product variant
* `country` - Optional. The country shopper is in

Response:

* `data`
  * `state` - One of:
    * `NO_OPEN_WAITLISTS` - there is no live or scheduled Waitlist inside Purple Dot for this variant
    * `AVAILABLE_IN_STOCK` - there is a live or scheduled Waitlist inside Purple Dot but the variant is not selling as a pre-order because one of your Shopify locations has stock for it and the [Operations settings inside Purple Dot](https://www.purpledotprice.com/merchant-portal) to "Watch inventory levels in Shopify" dictate that this should be cleared down first before this variant starts to sell as a pre-order.
    * `ON_PREORDER` - the variant will sell as a pre-order, either because you have
      * no stock in your own Shopify locations and some stock on a live Waitlist
      * you have some stock in your own Shopify locations but set your Operations settings inside Purple Dot to not "Watch inventory levels in Shopify"
    * `SOLD_OUT` - there is no stock remaining for this variant, neither in your own Shopify locations, nor on any Waitlist
  * `waitlist` - The product's waitlist or `null` if there isn't an open waitlist.
    * `display_dispatch_date` - The string that should be shown as the estimated dispatch date for the product.
  * `product` - The product that the variant belongs to.
    * `handle` - The product's Shopify handle.

Examples:

```bash
curl --request GET \
  --url 'https://www.purpledotprice.com/api/v1/variants/preorder-state?api_key=<...>&variant_id=55391387124086'
```

{% code overflow="wrap" %}

```json
{
  "meta": {
    "result": "success"
  },
  "data": {
    "state": "ON_PREORDER",
    "waitlist": {
      "id": "00fe49ba-8e43-4b10-9588-dccaa30f19ac",
      "is_scheduled": false,
      "launch_date": null,
      "selling_plan_id": null,
      "display_dispatch_date": "Estimated ship date 1–8 Jul",
      "payment_plan_descriptions": null,
      "use_extended_delivery_language": false,
      "units_left": 1
    },
    "product": {
      "id": "15121333223798",
      "handle": "the-complete-snowboard"
    }
  }
}
```

{% 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/public-api/variants-preorder-state.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.
