Skip to main content

Suggest Promo Windows

POST 

/api/inventory-forecasting/promo-windows/suggest

Suggest candidate promo windows for a product by clustering its detected upward demand spikes into contiguous date ranges, so a promotion can be confirmed instead of typed by hand.

Authentication: Requires Bearer token.

This consumes the same spike_up points produced by Detect Demand Anomalies: it clusters unresolved upward spikes into candidate date ranges. Downward and stockout anomalies are never suggested. Candidates are ranked by peak spike severity and capped at 10. A confirmed suggestion can be created as a promo window (Create Promo Window), measured (Measure Promo Lift), and then re-applied on a future build as a promo_lift demand modifier.

Body fields:

  • product_id (required): the product to analyse.
  • min_gap_days (optional): a gap larger than this many days splits two spike clusters into separate windows, 0-60 (default 3).
  • lookback_days (optional): how far back to scan for spikes, 1-1095 (default 365).

Each suggestion reports the cluster's start_date and end_date, the peak spike score, the total excess units above expectation, the number of flagged days, and whether an existing promo window already overlaps the range.

Request

Responses

OK

Response Headers
    Content-Type