Skip to content

Get product variants associated with a selling plan

LegacyAPI v1 is the older API. It still works and is supported, but new integrations should use API v2. Migrating from v1 to v2

GET
/external/preorders/{id}/product_variants
curl --request GET \
--url https://app.stoqapp.com/api/v1/external/preorders/example/product_variants \
--header 'X-Auth-Token: <X-Auth-Token>'

Retrieve product variants associated with a selling plan, including their preorder details and sales metrics.

Filtering behavior:

  • No parameters: Returns all product variants in the selling plan
  • shopify_product_id: Returns all variants for that specific product
  • shopify_variant_id: Returns only that specific variant (single object response)
id
required
string

Selling plan ID

X-Auth-Token
required
string

API key for authentication

shopify_product_id
integer

Filter by specific Shopify product ID to get all variants for that product

shopify_variant_id
integer

Filter by specific Shopify variant ID to get only that variant (returns single object)

Product variants with their preorder details and sales metrics

Media typeapplication/json
One of:
object
selling_plan_id

ID of the selling plan

string
selling_plan_name

Name of the selling plan

string
currency

Shop currency code

string
product_variants

List of product variants associated with this selling plan

Array<object>
object
shopify_product_id

Shopify product ID

integer
shopify_variant_id

Shopify variant ID

integer
product_title

Product title

string
variant_title

Variant title (null for single-variant products)

string
preorder_units_sold

Total units sold through preorders for this variant

integer
preorder_max_count

Maximum number of preorders allowed for this variant

integer
nullable
shipping_text

Custom shipping text configured for this variant in the selling plan

string
nullable
meta
object
total_variants

Total number of variants in results

integer
total_units_sold

Total units sold across all variants

integer

Example

{
"selling_plan_id": "79b44c6c-ebc7-41d4-8a1b-573d7c693454",
"selling_plan_name": "Summer Preorder",
"currency": "USD",
"product_variants": [
{
"shopify_product_id": 7891234567890,
"shopify_variant_id": 43900910010503,
"product_title": "Classic T-Shirt",
"variant_title": "Medium / Red",
"preorder_units_sold": 18,
"preorder_max_count": 100,
"shipping_text": "Ships July 2026"
}
],
"meta": {
"total_variants": 12,
"total_units_sold": 140
}
}

Bad request - cannot filter by both product and variant ID

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

Unauthorized

Selling plan not found or variant not found in this selling plan

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support