# /pre-orders

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

#### List all pre-orders.

Note for customers using our platform integration with combined cart: this data does not include in-stock purchases that went through Purple Dot's checkout.

Request:

* `limit` (number) - Optional. The number of pre-orders to retrieve. Set to 10 by default but can be set up to 200
* `created_at_min` (ISO8610 timestamp) - Optional. List pre-orders created since the given time
* `updated_at_min` (ISO8610 timestamp) - Optional. List pre-orders updated since the given time
* `updated_at_max` (ISO8610 timestamp) - Optional. List pre-orders updated no sooner than the given time
* `references` (string) - Optional. Comma separated list of (URL-encoded) Purple Dot order references
* `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. List pre-orders where every line item is any of these comma separated states. Currently supported are `cancelled` and `exported`
* `some_line_item` (string) - Optional. List 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`
* `starting_after` (UUID) - Optional. Paginate pre-orders after the given pre-order ID

Headers:

* `Link` - An IETF [RFC 8288](https://datatracker.ietf.org/doc/html/rfc8288#section-2) compliant header with links to previous and next page of results for the pre-order query.

Body:

* `orders` - An array containing pre-orders
  * `id` - ID used to identify the pre-order inside Purple Dot
  * `reference` - The Purple Dot order reference, the same as shared with the shoppers
  * `currency` - The presentment currency of the order
  * `created_at` - ISO8610 timestamp of when the pre-order was placed
  * `cancelled_at` -  ISO8610 timestamp of when the whole order was canceled (null if not canceled)
  * `cancel_reason` - The reason for the cancelation
  * `customer`
    * `email` - The customer's email address
    * `external_id` - The Shopify ID of this customer, if we know it
  * `line_items` - Array of line items
    * `id` - The Purple Dot ID of the line item
    * `name` - The name of the product variant in this line item
    * `sku` - The SKU code of the product variant in this line item
    * `product_id` - The Shopify ID of the line item's product
    * `variant_id` - The Shopify ID of the line item's product variant
    * `waitlist_id` - The Purple Dot ID of the Waitlist this line item sold from. Could be null if the line item was in-stock at the time of sale but it was held back to ship with other line items that were on pre-order
    * `quantity` - The quantity of the line item
    * `price` - The total cost of this line item, before taxes/discounts etc
    * `unit_price` - `price` divided by `quantity`
    * `taxable` - Whether the product variant in this line item is taxable
    * `tax_lines` - The taxes applied to the line item
      * `price`  - The total amount of tax for the line item
      * `rate`  - The tax rate as a decimal
      * `title`  - The name of the tax
      * `inclusive`  - Whether this tax is already included in the line item price
    * `total_discount` - The total amount of discounts applied to the line item
    * `total` - The total cost of this line item, after tax/discounts etc
    * `unit_total` - `total` divided by `quantity`
    * `earliest_ship_date` - ISO8610 timestamp of the earliest date this line item is expected to ship
    * `latest_ship_date` - ISO8610 timestamp of the latest date this line item is expected to ship
    * `cancelled` - If this line item has been canceled
    * `cancelled_at` -  ISO8610 timestamp of when the whole order was canceled (null if not canceled)
  * `shipping_address`
    * `first_name`
    * `last_name`
    * `address1`
    * `address2`
    * `city`
    * `postal_code`
    * `province_code` - The ISO3166 code of the second level administrative subdivision
    * `country` - The English name of the country
    * `country_code` - The ISO3166 code of the country
    * `phone`
  * `shipping_lines` - An array of shipping rates
    * `id` - The Purple Dot ID of the shipping line
    * `price` - The unit cost of this shipping line, before taxes/discounts etc
    * `total`- The total cost of this shipping line, after tax/discounts etc are considered
    * `title` - The user-facing name of the shipping rate
    * `code` - The shipping rate carrier code
    * `tax_lines` - The taxes applied to the shipping rate
      * `price`  - The total amount of tax for the shipping line
      * `rate`  - The tax rate as a decimal
      * `title`  - The name of the tax
      * `inclusive`  - Whether this tax is already included in the shipping line price
    * `line_items` - The line items this shipping rate applies to
      * `line_item_id` - The Purple Dot ID of the line item
  * `subtotal_price` - The total of the line items before taxes and shipping
  * `total_discounts` - The total discounts applied to the pre-order
  * `total_tax` - The total tax on the pre-order
  * `tax_included` - Whether the tax is included in listed prices or not
  * `tax_lines` - All the taxes applied to the pre-order
    * `price`
    * `rate`
    * `title`
  * `total_price` - The pre-order total
  * `total_refunded` - The total of all refunds issued from this pre-order
  * `exported_orders` - Any orders that were exported to Shopify from this pre-order
    * `id` - The Shopify ID of the order that was exported
    * `order_number` - The Shopify order number
    * `created_at` - ISO8610 timestamp of when this external order was created
    * `line_items` - The pre-order line items that were exported
      * `id` - The Shopify ID of the line item
      * `line_item_id` - The Purple Dot ID of the line item
* `starting_after` - The ID of the last pre-order in the list which can then be used in the next request
* `has_more` - Indicates whether there are more pre-orders available to page through

Examples:

{% code overflow="wrap" %}

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

{% endcode %}

<pre class="language-json" data-overflow="wrap"><code class="lang-json"><strong>{
</strong>  "meta": {
    "result": "success"
  },
  "data": {
    "orders": [
      {
        "id": "58da51c9-9b48-48c6-beb5-46bd34834960",
        "reference": "#PD2850312",
        "cancel_reason": null,
        "cancelled_at": null,
        "created_at": "2024-11-14T16:18:25.635Z",
        "currency": "USD",
        "email": "test@getpurpledot.com",
        "customer": {
          "email": "test@getpurpledot.com",
          "external_id": "7287702192181"
        },
        "line_items": [
          {
            "id": "55bedf52-ccf0-431a-a75b-2e999e93a5da",
            "total": 26.01,
            "price": 39.99,
            "product_id": "6914583167029",
            "quantity": 1,
            "sku": "PS4-GRVN",
            "variant_id": "41125120573493",
            "name": "Test Product 1",
            "earliest_ship_date": "2025-03-01T05:00:00.000Z",
            "latest_ship_date": "2025-03-31T04:00:00.000Z",
            "taxable": true,
            "tax_lines": [
              {
                "price": 2.12,
                "rate": 0.08875,
                "title": "SALES_TAX",
                "inclusive": false
              }
            ],
            "total_discount": 16.1,
            "cancelled_at": null,
            "cancelled": false,
          },
          {
            "id": "e474a996-d861-41e0-8137-7fc2074dd6a5",
            "total": 22.75,
            "price": 34.99,
            "product_id": "7740980330549",
            "quantity": 1,
            "sku": "P5LR123",
            "variant_id": "44057813581877",
            "name": "Test Product 2",
            "earliest_ship_date": null,
            "latest_ship_date": null,
            "taxable": true,
            "tax_lines": [
              {
                "price": 1.85,
                "rate": 0.08875,
                "title": "SALES_TAX",
                "inclusive": false
              }
            ],
            "total_discount": 14.09,
            "cancelled_at": "2024-11-14T16:20:39.796Z",
            "cancelled": true
          }
        ],
        "shipping_address": {
          "address1": "10 Test Road",
          "address2": "",
          "city": "New York",
          "country": "United States",
          "country_code": "US",
          "first_name": "Test",
          "last_name": "Testington",
          "phone": "+19172756975",
          "province_code": "NY",
          "postal_code": "10463"
        },
        "shipping_lines": [
          {
            "id": "6dfe69ca-ba0e-5af5-864c-693982161631",
            "code": "usps_1058",
            "total": 3.9000000000000004,
            "price": 5.98,
            "title": "Calculated Shipping Rate",
            "tax_lines": [
              {
                "price": 0.32,
                "rate": 0.08875,
                "title": "SALES_TAX",
                "inclusive": false
              }
            ],
            "line_items": [
              {
                "line_item_id": "e474a996-d861-41e0-8137-7fc2074dd6a5"
              }
            ]
          },
          {
            "id": "ca1dc988-7078-5f95-b1a8-3c0722d41ba4",
            "code": "usps_1058",
            "total": 3.88,
            "price": 5.98,
            "title": "Calculated Shipping Rate",
            "tax_lines": [
              {
                "price": 0.31,
                "rate": 0.08875,
                "title": "SALES_TAX",
                "inclusive": false
              }
            ],
            "discount_allocations": [
              {
                "amount": 2.41,
                "discount_application_index": 0
              }
            ],
            "line_items": [
              {
                "line_item_id": "55bedf52-ccf0-431a-a75b-2e999e93a5da"
              }
            ]
          }
        ],
        "subtotal_price": 39.99,
        "tax_lines": [
          {
            "price": 2.12,
            "rate": 0.08875,
            "title": "SALES_TAX"
          }
        ],
        "tax_included": false,
        "total_discounts": 20.91,
        "total_price": 21.2,
        "total_tax": 2.12,
        "total_refunded": 56.54,
        "exported_orders": [
          {
            "id": "5616927408181",
            "created_at": "2024-11-14T16:22:59.432Z",
            "order_number": "#3114029",
            "line_items": [
              {
                "id": "13278614585397",
                "line_item_id": "55bedf52-ccf0-431a-a75b-2e999e93a5da"
              }
            ]
          }
        ]
      }
    ],
    "starting_after": "58da51c9-9b48-48c6-beb5-46bd34834960",
    "has_more": false,
    "previous_cursor": "935bad68-2726-4ad1-b299-a330650a2bbb"
  }
}
</code></pre>


---

# 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.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.
