Skip to content

Retrieve products in demand

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/back_in_stock/reports/products_in_demand

Costs 1 rate-limit point · Rate limits

The Products in demand table: variants (or products) ranked by back-in-stock demand, with signups created in the window, how many of them are still waiting, and the last request.

The same rows as the dashboard table. total counts signups created in the window; pending counts those of them not yet notified. count_by=customers counts a shopper signed up on several channels once; omitted, it follows the dashboard default, and the response's count_by says which. group_by=product ranks products instead of variants. search matches product title or SKU; vendors, tags and shopify_market_ids are comma-separated lists, as the table's filters. Deleted variants are hidden when the shop's dashboard hides them. image_url is the variant's image, else the product's. Variant rows only: include_inventory=true adds inventory_available, the stock available in the locations the shop's market or location filter allows (summed, null when Shopify has no level), and include_prices=true adds price and compare_at_price in the shop's currency, as the table's Inventory and Price columns. Each asks Shopify once per page. include_totals=true adds totals { pending, total }, the pending and total columns summed over every row the filters keep, not just this page.

Also searched asdemand reportwhat should I restockmost wanted productstop requested variantsproducts in demandrestock priorities

Query parameters

  • group_bystring
    One of variantproduct
  • sort_bystring
    One of pendingtotallast_requested_at
  • directionstring
    One of ascdesc
  • count_bystring
    One of customerssignups
  • fromstring
  • tostring
  • rangestring
  • shopify_market_idsarray
  • searchstring
  • vendorsstring
  • tagsstring
  • pagestring
  • per_pagestring
  • include_inventorystring
  • include_pricesstring
  • include_totalsstring

Returns

  • windowobject
    Show 2 child attributesHide child attributes
    • fromstring
      Example: 2026-05-26T00:00:00Z
    • tostring
      Example: 2026-06-25T23:59:59Z
  • group_bystring
    Example: variant
  • sort_bystring
    Example: pending
  • directionstring
    Example: desc
  • count_bystring
    Example: customers
  • rowsarray of objects
    Show 8 child attributesHide child attributes
    • shopify_variant_idstring
      Example: gid://shopify/ProductVariant/47284734423096
    • shopify_product_idstring
      Example: gid://shopify/Product/8784906035384
    • variant_titlestring
      Example: Blue / Medium
    • product_titlestring
      Example: Classic Sneaker
    • skustring
      Example: CS-BLU-M
    • pendinginteger
      Example: 47
    • totalinteger
      Example: 89
    • last_requested_atstring
      Example: 2026-06-25T11:30:00Z
  • metaobject
    Show 4 child attributesHide child attributes
    • total_countinteger
      Example: 287
    • pageinteger
      Example: 1
    • per_pageinteger
      Example: 50
    • total_pagesinteger
      Example: 6

Errors

401

Missing or invalid X-Auth-Token.

422

The request failed validation.

429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.

Every error has the same shape: see Errors.

GET/back_in_stock/reports/products_in_demand
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/reports/products_in_demand" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "window": {
    "from": "2026-05-26T00:00:00Z",
    "to": "2026-06-25T23:59:59Z"
  },
  "group_by": "variant",
  "sort_by": "pending",
  "direction": "desc",
  "count_by": "customers",
  "rows": [
    {
      "shopify_variant_id": "gid://shopify/ProductVariant/47284734423096",
      "shopify_product_id": "gid://shopify/Product/8784906035384",
      "variant_title": "Blue / Medium",
      "product_title": "Classic Sneaker",
      "sku": "CS-BLU-M",
      "pending": 47,
      "total": 89,
      "last_requested_at": "2026-06-25T11:30:00Z"
    },
    {
      "shopify_variant_id": "gid://shopify/ProductVariant/47284734455864",
      "shopify_product_id": "gid://shopify/Product/8784906035384",
      "variant_title": "Red / Large",
      "product_title": "Classic Sneaker",
      "sku": "CS-RED-L",
      "pending": 23,
      "total": 56,
      "last_requested_at": "2026-06-25T09:15:00Z"
    }
  ],
  "meta": {
    "total_count": 287,
    "page": 1,
    "per_page": 50,
    "total_pages": 6
  }
}