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

Sales

Sales API resource representing daily sales actuals per product-location combination, providing the historical demand signal for the inventory optimization engine.

Overview​

The Sales resource represents daily sales actuals for a product at a specific location. Each record captures the number of units sold and the total monetary value of those sales on a given day, providing the historical demand signal used by the inventory optimisation engine for forecasting and replenishment planning.

Resource Endpoint​

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

Supported Methods​

MethodReturn TypeDescription
POSTResponseIngest (create/update) Sales 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.
  • day_date (date) - The calendar date for which sales are recorded. Part of the composite primary key.

Attributes​

AttributeData TypeRequiredDescription
product_idstringYesUnique identifier for the product sold
location_idstringYesUnique identifier for the location at which sales occurred
day_datedateYesThe date of the sales record, in YYYY-MM-DD format
sales_unitsfloatYesNumber of units sold on the given date
sales_valuefloatYesTotal monetary value of units sold on the given date

Relationships​

Outbound References​

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

Inbound References​

The following resources are referenced by sales_daily:

  • products — product_id → products.product_id
  • locations — location_id → locations.location_id

JSON Representation​

{
  "solutionName": "INV_OOTB",
  "data": [
    {
      "product_id": "PROD-001",
      "location_id": "LOC-001",
      "day_date": "2025-01-15",
      "sales_units": 42.0,
      "sales_value": 1049.58
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "INV_OOTB",
  "data": [
    {
      "product_id": "PROD-001",
      "location_id": "LOC-001",
      "day_date": "2025-01-15",
      "sales_units": 42.0,
      "sales_value": 1049.58
    }
  ],
  "operationType": "UPSERT"
}

Example Request​

curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/INV_SALES_DAILY_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "INV_OOTB",
    "data": [
      {
        "product_id": "PROD-001",
        "location_id": "LOC-001",
        "day_date": "2025-01-15",
        "sales_units": 42.0,
        "sales_value": 1049.58
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/INV_SALES_DAILY_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "INV_OOTB",
    "data": [
      {
        "product_id": "PROD-001",
        "location_id": "LOC-001",
        "day_date": "2025-01-15",
        "sales_units": 42.0,
        "sales_value": 1049.58
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes​

  • product_id, location_id, and day_date together form the composite primary key. All three fields must be provided on every record.
  • day_date must be in YYYY-MM-DD format.
  • sales_units must be a non-negative number. A value of 0 is valid and indicates no sales occurred on that date.
  • sales_value must be a non-negative float representing the total revenue value for the day.
  • 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(opens in new window)

Want to learn? UiPath Academy(opens in new window)

Have questions? UiPath Forum(opens in new window)

Stay updated