Skip to content

Get products in demand

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

GET
/back_in_stock/reports/products_in_demand
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.

group_by
Allowed values: variant product

Example

variant
from

Example

string
to

Example

string
range

Example

string
variant_id

Example

45000000001
product_id

Example

78000000001
channel

Example

string
market_id

Example

gid://shopify/Market/12345
sort_by

Example

string
direction

Example

string
page

Example

string
per_page

Example

string

Success — example response shown.

Media typeapplication/json
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.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Unauthorized"
]
}

The request failed validation.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"name is required"
]
}

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

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Rate limit exceeded"
]
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support