UiPath Documentation
industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
重要 :
此内容在所选语言中不可用。系统会改为显示英文内容。

Locations

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​

MethodReturn TypeDescription
POSTResponseIngest (create/update) Locations 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) - Unique identifier for the location. Used as the primary key for deduplication and UPSERT operations.

Attributes​

AttributeData TypeRequiredDescription
location_idstringYesUnique identifier for the location
location_namestringNoHuman-readable name of the location (for example, "Central Warehouse")
countrystringNoCountry in which the location resides
is_storebooleanYesIndicates whether the location is a retail store
is_dcbooleanYesIndicates whether the location is a distribution centre
is_factorybooleanYesIndicates 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
  • manufacturing_orders — location_id → locations.location_id
  • sku_calendar — location_id → locations.location_id
  • sales_daily — location_id → locations.location_id
  • customer_orders — location_id → locations.location_id
  • forecast — 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_id is the primary key, used for deduplication and UPSERT operations.
  • The boolean flags is_store, is_dc, and is_factory are all required. A location may have more than one flag set to true if 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.

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新