Measure Promo Lift
POST/api/inventory-forecasting/promo-windows/:id/measure
Measure the realised demand lift during a promo window and the dip in the days after it, for one product. The result is persisted onto the window and returned alongside suggested forward demand modifiers for next year's occurrence.
Authentication: Requires Bearer token.
The measured lift is what a promo_lift demand modifier applies at build time. It is reported as a percentage but is applied MULTIPLICATIVELY to whatever the current baseline is, so it stays correct as demand grows - a promotion that lifted demand 85% last year still lifts this year's larger baseline by 85%. Re-measure whenever you want the applied lift refreshed (for example after editing the window or accruing more sales).
Path parameter: id - the promo window to measure.
Body fields:
- product_id (required): the product to measure.
- dip_days (optional): number of days after the window to measure the post-promo dip, 1-365 (default 14).
- sales_filters (optional): object narrowing which sales are counted.
- warehouse_id (optional): restrict the measurement to one warehouse.
The response reports measured_lift_pct, post_promo_dip_pct, the in-window and expected daily rates, and suggested_modifiers - event demand modifiers pre-dated to the same window one year forward, ready to add to a build or configuration.
Request
Responses
- 200
- 401
- 403
- 404
- 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.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.