Create Forecast Configuration
POST/api/inventory-forecasting/configurations
Creates a new forecast configuration.
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:sales_history,target_quantity,fill_backorders)target_stock_days(integer 0-365) — required forsales_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) — used bytarget_quantityforecast typesales_history_days(integer 1-365) — used bysales_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 POsrounding_method(enum:round_half_up,round_up,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
Note: When forecast_type is fill_backorders, the controller strips boolean product filters (has_moq, has_leadtime, supplier_in_stock, has_sales_history) and forces target_stock_days and sales_history_days to null.
Authentication: Requires Bearer token.
Request
Responses
- 200
Successful response