Skip to main content

Overview

Demand history import stores weekly actual and forecast values used by planning workflows. Records are grouped by SKU, location, week start, and channel.

Quick Start

  1. Build records[] with weekly demand rows.
  2. POST to /api/import/demand-history.
  3. Poll /api/import/status/[jobId].

Field Reference

Better Data FieldTypeRequiredExampleDescription
skuIdstringYESSKU-001SKU identifier.
locationIdstringYESDC-WESTLocation code.
weekStartingstringYES2026-03-02ISO date representing week bucket.
channelstringNoALLChannel segment, default ALL.
actualDemandnumberNo320Actual units sold/consumed, default 0.
forecastedDemandnumberNo300Forecast units, defaults to actualDemand.

Validation Rules

  • records[] must be present and non-empty.
  • Each row must include skuId, locationId, and weekStarting.
  • Existing forecast rows are updated for matching model key (weekStarting + channel).

Common Errors

ErrorMeaningHow to fix
records[] is requiredMissing demand history rows.Send { "records": [ ... ] }.
required fields missingMissing one of required keys in a row.Include all required row keys.