UiPath Documentation
industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
Importante :
Este conteúdo não está disponível no idioma selecionado. Portanto, ele é exibido em inglês

Product Category

product_category API resource representing product categories in the B2C pricing application, with parent-child hierarchical structure support.

Overview​

The product_category resource represents product categories in the B2C pricing application. This resource supports hierarchical category structures with parent-child relationships.

Resource Endpoint​

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

Supported Methods​

MethodReturn TypeDescription
POSTResponseIngest (create/update) product category 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_category_id (string) - Unique identifier for the product category

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_category_idstringYesNoUnique product category identifier (Primary Key)
namestringYesYesDisplay name of the category
metadatastringYesYesAdditional metadata or attributes in JSON format
parent_product_category_idstringYesYesReference to the parent category, for hierarchical structure
created_attimestampYesYesTimestamp when the record was created
updated_attimestampYesYesTimestamp when the record was last updated

Relationships​

Outbound References​

This resource has relationships to:

  • product - Categories can contain multiple products
  • product_category (self-reference) - Categories can have child categories

Inbound References​

  • product_category (self-reference) - parent_product_category_id points to a parent category to form hierarchies — a logical reference, not an enforced foreign key

JSON Representation​

{
  "solutionName": "MP_OOTB",
  "data": [
    {
      "product_category_id": "CAT-ELEC",
      "name": "Electronics",
      "metadata": "{\"display_order\": 1, \"is_featured\": true}",
      "parent_product_category_id": null,
      "created_at": "2025-01-10T08:00:00Z",
      "updated_at": "2025-01-28T10:00:00Z"
    }
  ],
  "operationType": "UPSERT"
}
{
  "solutionName": "MP_OOTB",
  "data": [
    {
      "product_category_id": "CAT-ELEC",
      "name": "Electronics",
      "metadata": "{\"display_order\": 1, \"is_featured\": true}",
      "parent_product_category_id": null,
      "created_at": "2025-01-10T08:00:00Z",
      "updated_at": "2025-01-28T10:00:00Z"
    }
  ],
  "operationType": "UPSERT"
}

Example Request​

curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/MP_PRODUCT_CATEGORY_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "MP_OOTB",
    "data": [
      {
        "product_category_id": "CAT-ELEC",
        "name": "Electronics",
        "metadata": "{\"display_order\": 1, \"is_featured\": true}",
        "parent_product_category_id": null,
        "created_at": "2025-01-10T08:00:00Z",
        "updated_at": "2025-01-28T10:00:00Z"
      }
    ],
    "operationType": "UPSERT"
  }'
curl -X POST \
  'https://ingestion.peak.ai/api/v2/objects/MP_PRODUCT_CATEGORY_OOTB' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "solutionName": "MP_OOTB",
    "data": [
      {
        "product_category_id": "CAT-ELEC",
        "name": "Electronics",
        "metadata": "{\"display_order\": 1, \"is_featured\": true}",
        "parent_product_category_id": null,
        "created_at": "2025-01-10T08:00:00Z",
        "updated_at": "2025-01-28T10:00:00Z"
      }
    ],
    "operationType": "UPSERT"
  }'

Important Notes​

  • Primary Key: This resource uses product_category_id as the primary key
  • Hierarchical Structure: The parent_product_category_id enables multi-level category trees
  • Self-Referencing: Categories can reference other categories as parents
  • Flexible Metadata: The metadata field allows storing additional structured information
  • Custom Attributes: Additional custom attributes can be added using the /PRODUCT_CATEGORY/add-attribute endpoint
  • Data Validation: All attributes are validated according to their defined data types

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades