industry-department-solutions
latest
false
Supply Chain & Retail Solutions API guide
- Overview
- API Resources
Products Parent Child Mapping API resource defining parent-child relationships between products for substitution and hierarchy modelling in the Rebuy & Replenishment model.
Overview
The Products Parent Child Mapping resource defines parent-child relationships between products. Each record links a child product to its parent, along with a label and rank that describe the child's role within the hierarchy. This mapping supports substitution and product hierarchy modelling in the Rebuy & Replenishment model.
Resource Endpoint
/api/v2/ingest/object/{prefix}PRODUCTS_PARENT_CHILD_MAPPING{suffix}
/api/v2/ingest/object/{prefix}PRODUCTS_PARENT_CHILD_MAPPING{suffix}
Supported Methods
| Method | Return Type | Description |
|---|---|---|
| POST | Response | Ingest (create/update) Products Parent Child Mapping 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
- child_id (string) - Unique identifier for the child product. Used as the primary key for deduplication and UPSERT operations.
Attributes
| Attribute | Data Type | Required | Description |
|---|---|---|---|
parent_id | string | Yes | Unique identifier of the parent product in the hierarchy |
child_id | string | Yes | Unique identifier of the child product mapped to the parent |
child_label | string | Yes | Human-readable label describing the child product's role or variant |
child_rank | integer | Yes | Ordering rank of the child within the parent's hierarchy |
Relationships
Outbound References
The products_parent_child_mapping resource does not reference any downstream resources as foreign keys.
Inbound References
The following resources are referenced by products_parent_child_mapping:
- products —
parent_id→products.product_id - products —
child_id→products.product_id
JSON Representation
{
"solutionName": "INV_OOTB",
"data": [
{
"parent_id": "PROD-001",
"child_id": "PROD-002",
"child_label": "Small",
"child_rank": 1
}
],
"operationType": "UPSERT"
}
{
"solutionName": "INV_OOTB",
"data": [
{
"parent_id": "PROD-001",
"child_id": "PROD-002",
"child_label": "Small",
"child_rank": 1
}
],
"operationType": "UPSERT"
}
Example Request
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/INV_PRODUCTS_PARENT_CHILD_MAPPING_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "INV_OOTB",
"data": [
{
"parent_id": "PROD-001",
"child_id": "PROD-002",
"child_label": "Small",
"child_rank": 1
}
],
"operationType": "UPSERT"
}'
curl -X POST \
'https://ingestion.peak.ai/api/v2/objects/INV_PRODUCTS_PARENT_CHILD_MAPPING_OOTB' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"solutionName": "INV_OOTB",
"data": [
{
"parent_id": "PROD-001",
"child_id": "PROD-002",
"child_label": "Small",
"child_rank": 1
}
],
"operationType": "UPSERT"
}'
Important Notes
child_idis the primary key, used for deduplication and UPSERT operations. Each child product maps to exactly one parent.parent_idandchild_idmust both correspond to existing records in the Products resource.child_rankorders sibling children under the same parent; lower ranks are typically presented first.- Records are ingested via UPSERT: an existing record with matching primary keys will be updated; otherwise a new record is inserted.