Skip to content

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

GET
/external/intents/products_in_demand
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.

X-Auth-Token
required
string

API key for authentication

start_date
string format: date

Filter by start date (YYYY-MM-DD). Filters based on last_requested_at field.

end_date
string format: date

Filter by end date (YYYY-MM-DD). Filters based on last_requested_at field.

sort_by
string
default: pending
Allowed values: pending total last_requested_at

Sort results by pending intents, total intents, or last requested date

direction
string
default: desc
Allowed values: asc desc

Sort direction (ascending or descending)

page
integer
default: 1

Page number for pagination

per_page
integer
default: 25 <= 500

Number of items per page (maximum 500)

intent_type
string

Filter by intent type (used when loading product data)

A paginated list of product variants with demand metrics

Media typeapplication/json
object
product_variants_in_demand
Array<object>

Product variant with demand metrics and product data

object
shopify_variant_id

Shopify variant identifier

integer
shopify_product_id

Shopify product identifier

integer
shopify_inventory_item_id

Shopify inventory item identifier

integer
nullable
total

Total number of intents (both pending and sent) for this variant

integer
pending

Number of pending (unsent) intents for this variant

integer
last_requested_at

Timestamp of the most recent intent created for this variant

string format: date-time
nullable
product_data

Shopify product data including variants

object
id

Shopify product ID

integer
title

Product title

string
vendor

Product vendor/brand

string
variants

Array of product variants

Array<object>
object
id

Shopify variant ID

integer
title

Variant title (e.g., “Medium / Red”)

string
sku

Variant SKU

string
variant_data

Specific variant data for this demand entry

object
id

Shopify variant ID

integer
title

Variant title (e.g., “Medium / Red”)

string
sku

Variant SKU

string
page

Current page number

integer
per_page

Number of items per page

integer
has_next_page

Whether there is a next page

boolean
has_prev_page

Whether there is a previous page

boolean

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

Media typeapplication/json
object
error
string

Example generated

{
"error": "example"
}

Unauthorized

Was this page helpful?

Still stuck? Ask Quinn or chat with support