Get Assortment Explorer Report
GET/api/reports/assortment-explorer
Nested rows grouped by up to four dimensions, each with the buyer metrics, a trend series, an optional comparison period and a Winners / Chasers / Losers classification with its reason. A parent row is always the exact sum of its children. Products count when they sold in the period or are unarchived with stock on hand; a variant without its own value inherits its parent's; rows with no value come last (value_key __none__, label e.g. "Not set", "No brand").
reports:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Metrics on every row (ratios are fractions and null when undefined, never zero-filled): net units = units sold − units returned (units on return requests (RMAs) that weren't cancelled, against orders placed in the period — repair returns excluded); net sales and cost from order-line financials; gross margin $ / %; full-price share = units on lines with no discount ÷ units sold; ASP = net sales ÷ net units; on hand now; sell-through = net units ÷ (net units + on hand); weeks of supply = on hand ÷ weekly net units; GMROI = annualised gross margin ÷ inventory at cost now (an estimate from current stock); return rate = returned ÷ sold (a cohort rate: both counts come from the period's orders).
Every row gets classification (winner, chaser, steady, loser, not_enough_data), an index (its weekly units per product ÷ the same rate for the row above it; the whole report for top rows) and a plain-language reason. Rules, first match wins: under min_units → not_enough_data; sell-through ≥ chaser_sell_through and weeks of supply ≤ chaser_max_weeks_of_supply → chaser; index ≥ winner_index and sell-through ≥ winner_sell_through → winner; index ≤ loser_index or sell-through < loser_sell_through → loser; otherwise steady.
coverage gives the share of products and units sold with a value for each grouping. notices: style_needs_parents (style grouping but no product has a parent), compare_no_history / compare_partial_history, full_price_partly_unclassified (some recent lines have no price type yet, so for those full price falls back to no discount on the line). full_price_basis is price_type: a unit is full price when it sold with no markdown and no discount.
Optional column groups (extras, a list; each is computed only when asked for):
stockouts: every row (andtotals_stockout) getsstockout—stockout_days,in_stock_days,carried_days,in_stock_rate,in_stock_velocity_per_week(units sold ÷ in-stock days × 7) and a separately labelled ESTIMATE of lost demand:est_lost_units= in-stock velocity × stockout days andest_lost_sales= lost units × each product's average net selling price (est_lost_sales_partialwhen some lost units had no price). Stock days come from a day-by-day rebuild of each product's on-hand stock from the inventory ledger (account-timezone days, inventory debt included). A product with no ledger, or one whose ledger goes negative (more units left than were ever received), gets no stockout days and no estimate — counted inno_history_products/incomplete_history_products. A product in stock fewer than 14 days in the period keeps its stockout days but gets no estimate (too few days to trust a rate), counted inshort_in_stock_products; one never in stock is counted innever_in_stock_products;stock_coveragesays how much of the report rests on real history.confidenceis high / medium / low / none (high needs 10+ units over 28+ in-stock days per product, medium 4+ over 14+; weighted by each product's share of the estimated loss; dropped a tier when under half the products can be estimated) with plain-languageconfidence_reasons. Products count when they sold in the period or are in stock now (the explorer's usual scope).return_reasons: every row (andtotals_return_reasons) getsreturn_reasons— the row's returned units split into families (too_small, too_large, fit_width, comfort, defect, wrong_item, not_as_described, preference, other, unspecified) by keywords in the reason name (Shopify's Size Too Small, Size Too Large, Defective… arrive this way); when the reason is blank, Unknown or Other the customer's note is read and those units count ininferred_units. Alsounlinked_returned_units(RMA units with no order link dated in the period: in the families, never in a rate; left out with a channel filter),size_related_units,size_related_rate(too small + too large + fit/width ÷ units sold),top_bucketandtop_reasons(raw reason names).sortalso acceptsstockout_days,est_lost_units(needsstockouts) andsize_related_return_rate(needsreturn_reasons).extrasis echoed back.
Requires access to the Assortment Explorer report and the reports scope.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.