Get products in demand report
LegacyAPI v1 is the older API. It still works and is supported, but new integrations should use API v2. Migrating from v1 to v2
const url = 'https://app.stoqapp.com/api/v1/external/intents/products_in_demand?sort_by=pending&direction=asc&page=1&per_page=25';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/v1/external/intents/products_in_demand?sort_by=pending&direction=asc&page=1&per_page=25' \ --header 'X-Auth-Token: <X-Auth-Token>'Retrieve a paginated list of product variants with demand metrics based on customer intents. Returns aggregated data showing total intents, pending intents, and last requested date for each variant. Results can be filtered by date range and sorted by different metrics.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”API key for authentication
Query Parameters
Section titled “Query Parameters”Filter by start date (YYYY-MM-DD). Filters based on last_requested_at field.
Filter by end date (YYYY-MM-DD). Filters based on last_requested_at field.
Sort results by pending intents, total intents, or last requested date
Sort direction (ascending or descending)
Page number for pagination
Number of items per page (maximum 500)
Filter by intent type (used when loading product data)
Responses
Section titled “Responses”A paginated list of product variants with demand metrics
object
Product variant with demand metrics and product data
object
Shopify variant identifier
Shopify product identifier
Shopify inventory item identifier
Total number of intents (both pending and sent) for this variant
Number of pending (unsent) intents for this variant
Timestamp of the most recent intent created for this variant
Shopify product data including variants
object
Shopify product ID
Product title
Product vendor/brand
Array of product variants
object
Shopify variant ID
Variant title (e.g., “Medium / Red”)
Variant SKU
Specific variant data for this demand entry
object
Shopify variant ID
Variant title (e.g., “Medium / Red”)
Variant SKU
Current page number
Number of items per page
Whether there is a next page
Whether there is a previous page
Example
{ "product_variants_in_demand": [ { "shopify_variant_id": 43900910010503, "shopify_product_id": 7891234567890, "total": 42, "pending": 37, "last_requested_at": "2026-06-24T09:12:00Z", "variant_data": { "id": 43900910010503, "title": "Medium / Red", "sku": "TSHIRT-M-RED" }, "product_data": { "id": 7891234567890, "title": "Classic T-Shirt", "vendor": "Acme" } } ], "page": 1, "per_page": 25, "has_next_page": true, "has_prev_page": false}Bad request - invalid parameters
object
Example generated
{ "error": "example"}Unauthorized
Thanks for letting us know.
Still stuck? Ask Quinn or chat with support