UiPath Documentation
industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
  • Overview
  • API Resources

Forecast

Forecast API resource representing demand forecast values per product-location, capturing predicted units across forecast horizons for replenishment planning.

Overview

The Forecast resource represents demand forecast values for a product at a given location. Each record captures the predicted demand for a future period, along with the cutoff date on which the forecast was generated and the horizon it covers. Forecast records provide the forward-looking demand signal used by the inventory optimisation engine for replenishment planning.

Resource Endpoint

/api/v2/ingest/object/{prefix}FORECAST{suffix}
/api/v2/ingest/object/{prefix}FORECAST{suffix}

Supported Methods

MethodReturn TypeDescription
POSTResponseIngest (create/update) Forecast records via UPSERT operation

Request Headers

HeaderRequiredDescription
AuthorizationYesYour Personal Access Token (PAT) from platform.peak.ai
Content-TypeYesMust be application/json

Properties

Primary Keys

  • product_id (string) - Unique identifier for the product. Part of the composite primary key.
  • location_id (string) - Unique identifier for the location. Part of the composite primary key.
  • cutoff_date (date) - The date on which the forecast was generated. Part of the composite primary key.
  • start_date (date) - The first date of the forecast period. Part of the composite primary key.

Attributes

AttributeData TypeRequiredDescription
product_idstringYesUnique identifier for the product being forecast
location_idstringYesUnique identifier for the location the forecast applies to
cutoff_datedateYesThe date on which the forecast was generated, in YYYY-MM-DD format
start_datedateYesThe first date of the forecast period, in YYYY-MM-DD format
end_datedateYesThe last date of the forecast period, in YYYY-MM-DD format
horizonintegerYesNumber of periods ahead of the cutoff date that this forecast covers
yhatfloatYesForecasted demand value for the period
frequencyintegerYesLength of the forecast period, in days

Relationships

Outbound References

The forecast resource does not reference any downstream resources as foreign keys.

Inbound References

The following resources are referenced by forecast:

  • productsproduct_idproducts.product_id
  • locationslocation_idlocations.location_id

JSON Representation

{
  "solutionName": "INV_OOTB",
  "data": [
    {
      "product_id": "PROD-001",
      "location_id": "LOC-001",
      "cutoff_date": "2025-01-15",
      "start_date": "2025-01-16",
      "end_date": "2025-01-22",
      "horizon": 1,
      "yhat": 320.5,
      "frequency": 7
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "INV_OOTB",
  "data": [
    {
      "product_id": "PROD-001",
      "location_id": "LOC-001",
      "cutoff_date": "2025-01-15",
      "start_date": "2025-01-16",
      "end_date": "2025-01-22",
      "horizon": 1,
      "yhat": 320.5,
      "frequency": 7
    }
  ],
  "operationType": "UPSERT"
}

Example Request

curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/INV_FORECAST_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "INV_OOTB",
    "data": [
      {
        "product_id": "PROD-001",
        "location_id": "LOC-001",
        "cutoff_date": "2025-01-15",
        "start_date": "2025-01-16",
        "end_date": "2025-01-22",
        "horizon": 1,
        "yhat": 320.5,
        "frequency": 7
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/INV_FORECAST_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "INV_OOTB",
    "data": [
      {
        "product_id": "PROD-001",
        "location_id": "LOC-001",
        "cutoff_date": "2025-01-15",
        "start_date": "2025-01-16",
        "end_date": "2025-01-22",
        "horizon": 1,
        "yhat": 320.5,
        "frequency": 7
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes

  • product_id, location_id, cutoff_date, and start_date together form the composite primary key. All four fields must be provided on every record.
  • All date fields must be in YYYY-MM-DD format.
  • cutoff_date records when the forecast was produced; start_date and end_date bound the period the forecast value applies to.
  • product_id must correspond to an existing record in the Products resource.
  • location_id must correspond to an existing record in the Locations resource.
  • Records are ingested via UPSERT: an existing record with matching primary keys will be updated; otherwise a new record is inserted.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated