Create Promo Window
POST/api/inventory-forecasting/promo-windows
Create a promo window - a named date range, optionally scoped to an order tag, a set of products, and sales channels. A promo window is the anchor for measuring a promotion's demand lift and later re-applying it.
Authentication: Requires Bearer token.
Typical flow:
- Create the window over the promotion's date range (optionally scoped by order_tag, product_scope, channel_scope).
- Call Measure Promo Lift for a product to compute the realised in-window lift and the post-promo dip; the measured lift is stored on the window.
- Reference the window from a build request as a demand_modifiers entry of type promo_lift (promo_window_id). The stored lift is applied MULTIPLICATIVELY to the current baseline, so a window measured last year automatically re-scales to this year's larger baseline.
Body fields:
- name (required): label for the window, up to 255 characters.
- start_date (required, YYYY-MM-DD): must be on or before end_date.
- end_date (required, YYYY-MM-DD): must be on or after start_date.
- order_tag (optional): the order tag that marks orders belonging to this promotion.
- recurrence (optional): one_off (a single-date promotion) or annual (repeats on the same dates each year, so its lift can be re-applied to the next occurrence). Default one_off.
- product_scope (optional): array of product IDs the window applies to.
- channel_scope (optional): array of sales channels the window applies to.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
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.
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.