Create Forecast Configuration
POST/api/inventory-forecasting/configurations
Creates a new forecast configuration.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Required fields:
name(string, max 255, unique among non-deleted configurations)supplier_ids(array of integers, min 1, must exist in suppliers table)forecast_type(enum:with_sales_history,target_stock_level,fill_backorders)target_stock_days(integer 0-365) — required forwith_sales_history. Optional fortarget_stock_level(allows 0 whenuse_min_stock_level_as_targetis true) andfill_backorders(ignored)
Optional fields:
description(string, max 1000)target_quantity(integer, min 0) — fixed target quantity used bytarget_stock_levelforecast typeuse_min_stock_level_as_target(boolean) — when true,target_stock_levelforecasts use each product's minimum stock level as the target instead of a fixedtarget_quantity. Persisted on both create and update.sales_history_days(integer 1-365) — used bywith_sales_historyforecast typesales_start_date/sales_end_date(Y-m-d) — alternative date range for sales historyuse_leadtime(boolean)use_moq(boolean)enforce_minimum_order_value(boolean) — enforces supplier minimum order value when generating POsenforce_minimum_order_quantity(boolean) — enforces supplier minimum order quantity when generating POsuse_case_pack(boolean) — round order quantities to supplier case-pack multiplescase_pack_rounding(enum:always_round_up,always_round_down,round_nearest) — how to round to the case-pack multipleignore_min_stock_level(boolean) — skip the per-product minimum stock level constraint when computing demandrounding_method(enum:round_half_up,round_half_down,always_round_up,always_round_down,no_rounding)destination_warehouse_id(integer, must exist in warehouses table)pricing_tier_id(integer, must exist in supplier_pricing_tiers table)product_filters(array) — filter criteria applied to candidate productssales_filters(array) — filter criteria applied to sales historydemand_modifiers(array) — adjustments to projected demand
Authentication: Requires Bearer token.
Baseline decomposition fields (persist onto the saved configuration and drive scheduled runs):
baseline_method(enum:flatdefault,recency_weighted,damped_trend) — how the daily velocity baseline is derived from sales history.trend_damping_factor(number 0..1, default 0.85) — damping factor phi fordamped_trend; lower = more damping.trend_max_growth_pct(number >= 0, default 100) — caps how far the trend may lift the baseline above the flat mean (100 = may at most double it). When the cap binds a line reportstrend_capped: true.trend_half_life_days(integer >= 1, nullable, default 21) — reserved tuning forrecency_weighted.exclude_detected_anomalies(boolean, default false) — when true, days resolved as excluded or smoothed anomalies are dropped/replaced before the baseline is computed, de-contaminating promo spikes and stockout gaps.
These persist onto the configuration, so a schedule attached to it re-applies the same trend and anomaly-cleansing settings on every run. Baseline settings are ignored for fill_backorders.
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.
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.