Inventory Intelligence
Build Forecast
Build a forecast for one or more suppliers. Returns forecast results per supplier including recommended order quantities.
Build Forecast (Single Supplier)
Build a forecast for a single supplier. If product count is large, dispatches a background job and returns a job_id for polling. Otherwise returns the result synchronously.
Get Job Status
Poll the status of a background forecast job dispatched by build-single.
Get Sales History
Get aggregated sales history for products grouped by time period.
Get Sales Orders (Drill-Down)
Get individual sales orders for a product (drill-down view). Used when clicking into a product's sales period in the forecast UI.
Create Purchase Orders from Forecast
Create purchase orders from forecast results. Creates a ForecastScheduleRun to track the creation.
Recalculate Costs
Recalculate supplier product costs using a different pricing tier. Used when the user switches pricing tier in the forecast UI.
Supplier Summary
Get a summary of suppliers with product counts. Used for lazy-loading supplier tabs in the forecast UI before running the full forecast.
List Configurations
List all forecast configurations (non-paginated). Includes schedule counts.
Create Configuration
Create a new saved forecast configuration.
List Configurations (Paginated)
Get paginated forecast configurations.
Get Configuration
Get a single forecast configuration with full details.
Update Configuration
Update a forecast configuration. Merges with existing data so only changed fields need to be sent.
Delete Configuration
Delete a forecast configuration.
Duplicate Configuration
Duplicate an existing forecast configuration. If name is not provided, a default copy name is generated.
Check Configuration Usage
Check if a configuration is currently in use by any schedules.
List Schedules
List all forecast schedules (non-paginated).
Create Schedule
Create a new forecast schedule.
Get Schedule
Get a single forecast schedule with full details.
Update Schedule
Update a forecast schedule. All fields are optional; merges with existing data.
Delete Schedule
Delete a forecast schedule.
Toggle Schedule
Toggle a schedule's enabled/disabled status.
Run Schedule Now
Manually trigger a forecast schedule immediately.
Get Schedule Runs
Get paginated run history for a specific schedule.
Get Schedule Activity Log
Get the Spatie activity log for a specific schedule showing all changes.
Get Schedule Limits
Get supplier run limits status. Shows how many runs are scheduled for each supplier on a given date.
Get Schedule Statistics
Get aggregate statistics for all forecast schedules.
Get Schedule Timeline
Get upcoming schedule runs for a date range.
Get Today's Schedules
Get schedules that run on the given day of the week.
List All Runs
Get all forecast runs across all schedules (both manual and scheduled), paginated.
Get Recent Runs
Get recent runs (not paginated). Useful for dashboard widgets.
Get Run Details
Get full details for a single forecast run.
Create Manual Run
Create and persist a manual (ad-hoc) forecast run record. Called when users run forecasts manually from the UI.
Link Purchase Orders to Run
Link purchase orders to an existing manual forecast run. Can only be used for manual runs.
Re-run from Run
Re-run a forecast using the configuration from a previous run.
Export Forecast
Build a forecast and export the results to a file. Returns a download URL/filename.
Download Export File
Downloads a completed accounting transaction export file from the model-exports disk. Supports both CSV and XLSX files.
List Test Scenarios
List all available test data scenarios.
Seed Test Data
Run one or more test data scenarios.
Reset Test Data
Reset test data for one or all scenarios.
Get Inventory Aging Report
Get the paginated inventory aging report. Supports two view modes:
Get Inventory Aging Metrics
Get summary metrics for the inventory aging report. Returns aggregate statistics like total inventory value, average age, count by age bracket. Accepts the same filter parameters as the index endpoint.
Get Inventory Aging Distribution
Get distribution chart data for inventory aging. Returns data suitable for rendering age distribution charts. Accepts the same filter parameters as the index endpoint.
Export Inventory Aging to CSV
Export the inventory aging report as a CSV file download. Accepts the same filter parameters as the index endpoint. Returns a streamed CSV file.
Get Sales Channels for Filter
Get the list of sales channels available for use in the inventory aging sales channel filter. Returns integration instance IDs and names.
Update Product Note
Create or update a note for a product in the inventory aging report. Notes are used to track aging strategy decisions (e.g., liquidation plans, review dates).
Delete Product Note
Delete the aging note for a product.