Skip to content

Retrieve product revenue

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

GET/back_in_stock/reports/product_revenue

Costs 1 rate-limit point · Rate limits

Revenue, units and orders from back-in-stock alerts per variant (or product), as the dashboard's revenue table.

revenue is the line revenue of the alerted items only (not whole orders), so rows add up to the total without overlap. units_sold is item quantity; orders is distinct orders containing the item. image_url is the variant's stored image, else the product's (null if none is stored).

Also searched asrevenue by productwhich products recovered revenueback in stock product revenuetop selling restocked productsunits sold from alerts

Query parameters

  • group_bystring
    One of variantproduct
  • fromstring
  • tostring
  • rangestring
  • sort_bystring
  • directionstring
  • pagestring
  • per_pagestring

Errors

401

Missing or invalid X-Auth-Token.

422

The request failed validation.

429

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

Every error has the same shape: see Errors.

GET/back_in_stock/reports/product_revenue
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/reports/product_revenue" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
No body