industry-department-solutions
latest
false
- Overview
- API Resources

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
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) stock records via UPSERT operation |
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Your Personal Access Token (PAT) from platform.peak.ai |
Content-Type | Yes | Must 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
| Attribute | Data Type | Required | Description |
|---|---|---|---|
location_id | string | Yes | Location identifier (Primary Key, Foreign Key) |
product_id | string | Yes | Product identifier (Primary Key, Foreign Key) |
stock_date_at | date | Yes | Stock snapshot date (Primary Key) |
stock_units | integer | No | Number of units in stock |
stock_id | string | No | Alternative stock record identifier |
created_at | datetime | No | Timestamp when the record was created |
updated_at | datetime | No | Timestamp when the record was last updated |
Relationships
Outbound References
None
Inbound References
- location - Foreign key
location_idreferences location - product - Foreign key
product_idreferences 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_idandlocation_idto 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-attributeendpoint - Data Validation: All attributes are validated according to their defined data types
Related Resources
- product - Product information
- location - Stock location
- purchase_order - Incoming stock from orders
- sale - Stock depletion from sales