/pre-orders

List all pre-orders.

Request:

  • limit (number) - The number of pre-orders to retrieve. By default, it's set to 10 but can be set up to 200

  • created_at_min (ISO8610 timestamp) - List pre-orders created since the given time

  • updated_at_min (ISO8610 timestamp) - List pre-orders updated since the given time

  • all_line_items (string) - List pre-orders where every line item is any of these comma separated states. Currently supported are cancelled and exported

  • starting_after (UUID) - Paginate pre-orders after the given pre-order ID

Headers:

  • Link - An IETF RFC 8288 compliant header with links to previous and next page of results for the preorder query.

Body:

  • orders - An array containing pre-orders

    • id - ID used to identify the pre-order inside Purple Dot

    • order_number - The Purple Dot order reference number

    • currency - The presentment currency of the order

    • created_at - The time at which the order was created

    • cancelled_at - The time at which the whole order was cancelled (null if not cancelled)

    • cancel_reason - The reason for the cancellation

    • 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

      • total - The total cost of this line item

      • price - The price of the product variant in this line item

      • taxable - Whether the line item's variant is taxable

      • tax_lines - The taxes applied to the line item

      • total_discount - The total amount of discounts applied to the line item

      • quantity - The quantity of the 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

      • sku - The SKU of the line item's variant

      • name - The name of the line item's variant

      • earliest_ship_date - The earliest date this line item is expected to ship

      • latest_ship_date - The latest date this line item is expected to ship

      • cancelled - If this line item has been cancelled

      • cancelled_at - The time at which the line item was cancelled (null if not cancelled)

    • 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

      • price - The total price of the shipping rate

      • title - The user-facing name of the shipping rate

      • code - The shipping rate carrier code

      • tax_lines - The taxes applied to the shipping rate

      • 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 order

    • total_tax - The total tax on the order

    • tax_included - Whether the tax is included in listed prices or not

    • tax_lines - All the taxes applied to the order

    • total_price - The 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 - The time at which the order was exported

      • 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 preorder in the list which can then be used in the next request

  • has_more - Indicates whether there are more orders available to page through

Examples:

curl --request GET \
     --url 'https://www.purpledotprice.com/admin/api/v1/pre-orders?created_at_min=2023-08-17T00:00:00.000Z&all_line_items=cancelled&limit=1' \
     --header 'X-Purple-Dot-Access-Token: <access_token>'
{
  "meta": {
    "result": "success"
  },
  "data": {
    "orders": [
      {
        "id": "420a0a6e-a63d-4d75-9eca-e7e803678088",
        "created_at": "2023-08-18T09:37:44.171Z",
        "currency": "GBP",
        "cancel_reason": "Customer cancelled via self-service portal",
        "cancelled_at": "2023-08-18T09:57:49.576Z",
        "email": "test@testing.com",
        "discount_applications": [],
        "discount_codes": [],
        "line_items": [
          {
            "id": "625f73e4-8e86-424d-85bb-35b7bc25ea33",
            "price": 10,
            "product_id": "6952847966293",
            "quantity": 1,
            "sku": "",
            "variant_id": "40665499467861",
            "name": "Test hat",
            "taxable": true,
            "tax_lines": [
              {
                "price": 0,
                "rate": 0,
                "title": "NONE"
              }
            ],
            "total_discount": 0,
            "discount_allocations": [],
            "cancelled_at": "2023-08-18T09:57:49.576Z"
          }
        ],
        "order_number": "325376",
        "shipping_address": {
          "address1": "123 Test St",
          "address2": "",
          "city": "London",
          "country": "United Kingdom",
          "country_code": "GB",
          "first_name": "Test",
          "last_name": "Testington",
          "phone": "+4407500000000",
          "province_code": null,
          "postal_code": "E1 5TT"
        },
        "shipping_lines": [
          {
            "code": "Domestic",
            "price": 1,
            "title": "Domestic",
            "tax_lines": [
              {
                "price": 0,
                "rate": 0,
                "title": "NONE"
              }
            ]
          }
        ],
        "subtotal_price": 0,
        "tax_lines": [],
        "tax_included": false,
        "total_discounts": 0,
        "total_price": 1,
        "total_tax": 0,
        "exported_orders": []
      }
    ],
    "has_more": false
  }
}

Last updated