UiPath Documentation
industry-department-solutions
latest
false
  • Overview
    • Introduction
    • Getting Started
    • API Guide
    • Customizations
    • Data Onboarding Checklist
  • API Resources
UiPath logo, featuring letters U and I in white

Supply Chain & Retail Solutions API guide

Last updated Apr 16, 2026

Stock

Overview

The stock resource represents inventory levels for products at specific locations on specific dates. This resource tracks stock quantities over time for inventory management.

Resource Endpoint

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

Supported Methods

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

Request Headers

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

Properties

Primary Keys

  • location_id (string) - Foreign key reference to locations
  • product_id (string) - Foreign key reference to products
  • stock_date_at (date) - Date for the stock snapshot

Attributes

AttributeData TypeRequiredDescription
location_idstringYesLocation identifier (Primary Key, Foreign Key)
product_idstringYesProduct identifier (Primary Key, Foreign Key)
stock_date_atdateYesStock snapshot date (Primary Key)
stock_unitsintegerNoNumber of units in stock
stock_idstringNoAlternative stock record identifier
created_atdatetimeNoTimestamp when the record was created
updated_atdatetimeNoTimestamp when the record was last updated

Relationships

Outbound References

None

Inbound References

  • location - Foreign key location_id references location
  • product - Foreign key product_id references product

JSON Representation

{
  "solutionName": "QP_OOTB",
  "data": [
    {
      "location_id": "LOC-UK-001",
      "product_id": "PROD-001",
      "stock_date_at": "2025-01-28",
      "stock_units": 450,
      "stock_id": "STK-2025-001",
      "created_at": "2025-01-28T00:00:00Z",
      "updated_at": "2025-01-28T10:00:00Z"
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "QP_OOTB",
  "data": [
    {
      "location_id": "LOC-UK-001",
      "product_id": "PROD-001",
      "stock_date_at": "2025-01-28",
      "stock_units": 450,
      "stock_id": "STK-2025-001",
      "created_at": "2025-01-28T00:00:00Z",
      "updated_at": "2025-01-28T10:00:00Z"
    }
  ],
  "operationType": "UPSERT"
}

Example Request

curl -X POST \
  'https://service.peak.ai/ingestion-api/api/v2/ingest/object/QP_STOCK_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "QP_OOTB",
    "data": [
      {
        "location_id": "LOC-UK-001",
        "product_id": "PROD-001",
        "stock_date_at": "2025-01-28",
        "stock_units": 450,
        "stock_id": "STK-2025-001",
        "created_at": "2025-01-28T00:00:00Z",
        "updated_at": "2025-01-28T10:00:00Z"
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://service.peak.ai/ingestion-api/api/v2/ingest/object/QP_STOCK_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "QP_OOTB",
    "data": [
      {
        "location_id": "LOC-UK-001",
        "product_id": "PROD-001",
        "stock_date_at": "2025-01-28",
        "stock_units": 450,
        "stock_id": "STK-2025-001",
        "created_at": "2025-01-28T00:00:00Z",
        "updated_at": "2025-01-28T10:00:00Z"
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes

  • Foreign Key Dependencies: Requires valid product_id and location_id to exist in their respective tables
  • Daily Snapshots: Captures stock levels at specific dates for historical tracking
  • Location-Specific: Stock is tracked separately for each location
  • Inventory Management: Essential for stock level monitoring and replenishment planning
  • Custom Attributes: Additional custom attributes can be added using the /STOCK/add-attribute endpoint
  • Data Validation: All attributes are validated according to their defined data types

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated