---
title: "Create or Update Product Hierarchy"
method: POST
path: "/api/beta/version/{version_id}/product-hierarchy"
tags: ["Product Hierarchy (Beta)"]
---

# Create or Update Product Hierarchy

`POST /api/beta/version/{version_id}/product-hierarchy`

Asynchronously creates or updates the product hierarchy for a 'DRAFT' version. This operation returns a `request_id` for tracking.

## Path parameters

- `version_id` string, required

## Request body

- ProductHierarchyNode[]
  - `nameOrSku` string — The SKU of the product/bundle or the name of the label.
  - `type` 'PRODUCT' | 'BUNDLE' | 'LABEL' — The type of the hierarchy item.
  - `mandatory` boolean — Whether the item is mandatory.
  - `alternative` boolean — Whether the item is an alternative choice.
  - `children` ProductHierarchyNode[] — A nested list of child items.

## Response `200`

Success. The update process has started.

- AsyncResponse
  - `request_id` string — The ID of the asynchronous request for tracking.

---

[API](https://skmtc.dev/dealhub/apis/quote-api.md) · [All operations](https://skmtc.dev/dealhub/apis/quote-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dealhub/quote-api/revisions/c30f5b9fbfab/schema)
