Get product variants associated with a selling plan
API v1 is the older API. It still works, but new integrations should use API v2. Migrating from v1 to v2
GET
/external/preorders/{id}/product_variantsCosts 1 rate-limit point · Rate limits
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)
Path parameters
idstringRequiredSelling plan ID
Query parameters
shopify_product_idintegerFilter by specific Shopify product ID to get all variants for that product
shopify_variant_idintegerFilter by specific Shopify variant ID to get only that variant (returns single object)
Headers
X-Auth-TokenstringRequiredAPI key for authentication
Returns
selling_plan_idstringExample:79b44c6c-ebc7-41d4-8a1b-573d7c693454selling_plan_namestringExample:Summer PreordercurrencystringExample:USDproduct_variantsarray of objectsShow 7 child attributesHide child attributes
shopify_product_idintegerExample:7891234567890shopify_variant_idintegerExample:43900910010503product_titlestringExample:Classic T-Shirtvariant_titlestringExample:Medium / Redpreorder_units_soldintegerExample:18preorder_max_countintegerExample:100shipping_textstringExample:Ships July 2026
metaobjectShow 2 child attributesHide child attributes
total_variantsintegerExample:12total_units_soldintegerExample:140
Errors
400
Bad request - cannot filter by both product and variant ID
401
Unauthorized
404
Selling plan not found or variant not found in this selling plan
GET/external/preorders/{id}/product_variants
curl "https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/product_variants" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/product_variants", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/product_variants",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v1/external/preorders/79b44c6c-ebc7-41d4-8a1b-573d7c693454/product_variants")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)Response
{
"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
}
}No body
No body
No body