industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
- Overview
- API Resources
Locations API resource representing physical and logical nodes in the supply chain network, including distribution centres, retail stores, and factories.
Overview
The Locations resource represents physical or logical nodes in the supply chain network, such as distribution centres, retail stores, and factories. Each location record captures the site's identity, geographic context, and its functional role within the inventory management system.
Resource Endpoint
/api/v2/ingest/object/{prefix}LOCATIONS{suffix}
/api/v2/ingest/object/{prefix}LOCATIONS{suffix}
Supported Methods
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) Locations 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) - Unique identifier for the location. Used as the primary key for deduplication and UPSERT operations.
Attributes
| Attribute | Data Type | Required | Description |
|---|---|---|---|
location_id | string | Yes | Unique identifier for the location |
location_name | string | No | Human-readable name of the location (for example, "Central Warehouse") |
country | string | No | Country in which the location resides |
is_store | boolean | Yes | Indicates whether the location is a retail store |
is_dc | boolean | Yes | Indicates whether the location is a distribution centre |
is_factory | boolean | Yes | Indicates whether the location is a manufacturing facility |
Relationships
Outbound References
The locations resource does not reference any other resource as a foreign key.
Inbound References
The following resources reference locations via location_id:
- stock_daily —
location_id→locations.location_id - pricing —
location_id→locations.location_id - order_parameters —
location_id→locations.location_id - purchase_orders —
location_id→locations.location_id - transfers —
location_id→locations.location_id - sku_calendar —
location_id→locations.location_id - sales_daily —
location_id→locations.location_id
JSON Representation
{
"solutionName": "INV_OOTB",
"data": [
{
"location_id": "LOC-001",
"location_name": "Central Warehouse",
"country": "United Kingdom",
"is_store": false,
"is_dc": true,
"is_factory": false
}
],
"operationType": "UPSERT"
}
{
"solutionName": "INV_OOTB",
"data": [
{
"location_id": "LOC-001",
"location_name": "Central Warehouse",
"country": "United Kingdom",
"is_store": false,
"is_dc": true,
"is_factory": false
}
],
"operationType": "UPSERT"
}
Example Request
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/INV_LOCATIONS_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "INV_OOTB",
"data": [
{
"location_id": "LOC-001",
"location_name": "Central Warehouse",
"country": "United Kingdom",
"is_store": false,
"is_dc": true,
"is_factory": false
}
],
"operationType": "UPSERT"
}'
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/INV_LOCATIONS_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "INV_OOTB",
"data": [
{
"location_id": "LOC-001",
"location_name": "Central Warehouse",
"country": "United Kingdom",
"is_store": false,
"is_dc": true,
"is_factory": false
}
],
"operationType": "UPSERT"
}'
Important Notes
location_idis the primary key, used for deduplication and UPSERT operations.- The boolean flags
is_store,is_dc, andis_factoryare all required. A location may have more than one flag set totrueif it serves multiple roles. - Records are ingested via UPSERT: an existing record with matching primary keys will be updated; otherwise a new record is inserted.