Get products in demand
BetaAPI v2 is in public beta: endpoints, fields and behaviour can change before general availability. See the changelog
const url = 'https://app.stoqapp.com/api/v2/external/back_in_stock/reports/products_in_demand?group_by=variant&from=string&to=string&range=string&variant_id=45000000001&product_id=78000000001&channel=string&market_id=gid%3A%2F%2Fshopify%2FMarket%2F12345&sort_by=string&direction=string&page=string&per_page=string';const options = {method: 'GET', headers: {'X-Auth-Token': '<X-Auth-Token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.stoqapp.com/api/v2/external/back_in_stock/reports/products_in_demand?group_by=variant&from=string&to=string&range=string&variant_id=45000000001&product_id=78000000001&channel=string&market_id=gid%3A%2F%2Fshopify%2FMarket%2F12345&sort_by=string&direction=string&page=string&per_page=string' \ --header 'X-Auth-Token: <X-Auth-Token>'Ranked variants (or products) by back-in-stock demand: signups waiting now, signups created in the window, last requested.
Note: pending counts the waitlist now and ignores the window; total counts signups created in the window. group_by=product ranks products instead of variants.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Example
variantExample
stringExample
stringExample
stringExample
45000000001Example
78000000001Example
stringExample
gid://shopify/Market/12345Example
stringExample
stringExample
stringExample
stringResponses
Section titled “Responses”Success — example response shown.
object
Example
{ "window": { "from": "2026-05-26T00:00:00Z", "to": "2026-06-25T23:59:59Z" }, "sort_by": "pending", "direction": "desc", "rows": [ { "shopify_variant_id": 47284734423096, "shopify_product_id": 8784906035384, "variant_title": "Blue / Medium", "product_title": "Classic Sneaker", "pending": 47, "total": 89, "last_requested_at": "2026-06-25T11:30:00Z" }, { "shopify_variant_id": 47284734455864, "shopify_product_id": 8784906035384, "variant_title": "Red / Large", "product_title": "Classic Sneaker", "pending": 23, "total": 56, "last_requested_at": "2026-06-25T09:15:00Z" } ], "meta": { "total_count": 287, "page": 1, "per_page": 50, "total_pages": 6 }}Missing or invalid X-Auth-Token.
Error envelope returned by every failed request.
object
Example
{ "errors": [ "Unauthorized" ]}The request failed validation.
Error envelope returned by every failed request.
object
Example
{ "errors": [ "name is required" ]}Rate limited — cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.
Error envelope returned by every failed request.
object
Example
{ "errors": [ "Rate limit exceeded" ]}Thanks for letting us know.
Still stuck? Ask Quinn or chat with support