Skip to content

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_variants

Costs 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

  • idstringRequired

    Selling plan ID

Query parameters

  • shopify_product_idinteger

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

  • shopify_variant_idinteger

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

Headers

  • X-Auth-TokenstringRequired

    API key for authentication

Returns

  • selling_plan_idstring
    Example: 79b44c6c-ebc7-41d4-8a1b-573d7c693454
  • selling_plan_namestring
    Example: Summer Preorder
  • currencystring
    Example: USD
  • product_variantsarray of objects
    Show 7 child attributesHide child attributes
    • shopify_product_idinteger
      Example: 7891234567890
    • shopify_variant_idinteger
      Example: 43900910010503
    • product_titlestring
      Example: Classic T-Shirt
    • variant_titlestring
      Example: Medium / Red
    • preorder_units_soldinteger
      Example: 18
    • preorder_max_countinteger
      Example: 100
    • shipping_textstring
      Example: Ships July 2026
  • metaobject
    Show 2 child attributesHide child attributes
    • total_variantsinteger
      Example: 12
    • total_units_soldinteger
      Example: 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"
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
  }
}