UiPath Documentation
industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
Importante :
Este contenido no está disponible en el idioma seleccionado. Se muestra el contenido en inglés en su lugar

Product Cost

product_cost API resource representing the cost of products in specific regions for margin calculations and pricing decisions.

Overview​

The product_cost resource represents the cost of products in specific regions. This resource stores cost information used for margin calculations and pricing decisions.

→ For business context (purpose, usage notes, how this resource is used in the solution), see Product cost dataset in the User Guide.

Resource Endpoint​

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

Supported Methods​

MethodReturn TypeDescription
POSTResponseIngest (create/update) product cost 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) - Foreign key reference to products
  • region_id (string) - Foreign key reference to regions
  • updated_at (datetime) - Timestamp of when the record was last updated

Attributes​

About Required + Nullable: every attribute key must appear in each payload (Required: Yes). Nullable: Yes means the value can be null when you don't have data; Nullable: No means a non-null value is required. See Schema definition structure for the underlying rules.

AttributeData TypeRequiredNullableDescription
product_idstringYesNoUnique identifier for each product. Used to join product metadata to quotations and sales for model training and guardrails.
region_idstringYesNoRegion identifier (Primary Key, Foreign Key)
updated_atdatetimeYesYesTimestamp when the record was updated. Used to identify the most up-to-date data in the UI and when optimising prices. For model training, used to match the cost price to the date of each quote.
product_costfloatYesYesCost price of the product. Used to calculate the margin/profit applied to all quotations and sales orders for model training and optimising prices.

Relationships​

Outbound References​

None

Inbound References​

  • product - Foreign key product_id references product
  • region - Foreign key region_id references region

JSON Representation​

{
  "solutionName": "QP_OOTB",
  "data": [
    {
      "product_id": "PROD-001",
      "region_id": "EMEA-UK",
      "updated_at": "2025-01-28T10:00:00Z",
      "product_cost": 89.50
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "QP_OOTB",
  "data": [
    {
      "product_id": "PROD-001",
      "region_id": "EMEA-UK",
      "updated_at": "2025-01-28T10:00:00Z",
      "product_cost": 89.50
    }
  ],
  "operationType": "UPSERT"
}

Example Request​

curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/QP_PRODUCT_COST_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "QP_OOTB",
    "data": [
      {
        "product_id": "PROD-001",
        "region_id": "EMEA-UK",
        "updated_at": "2025-01-28T10:00:00Z",
        "product_cost": 89.50
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/QP_PRODUCT_COST_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "QP_OOTB",
    "data": [
      {
        "product_id": "PROD-001",
        "region_id": "EMEA-UK",
        "updated_at": "2025-01-28T10:00:00Z",
        "product_cost": 89.50
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes​

  • Foreign Key Dependencies: Requires valid product_id and region_id to exist in their respective tables
  • Margin Calculation: Used in combination with list prices to calculate profit margins
  • Regional Variations: Costs may vary by region due to shipping, taxes, and local factors
  • Custom Attributes: Custom attributes can be added with POST /api/v2/schema/{objectName}/add-attribute, where {objectName} is this table's fully qualified warehouse name ({prefix}PRODUCT_COST{suffix} — for example, QP_PRODUCT_COST_OOTB), as returned by Describe a solution's schema
  • Data Validation: All attributes are validated according to their defined data types

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado