Update a node
PUT/pcm/hierarchies/:hierarchyID/nodes/:nodeID
Updates the specified node in a hierarchy. You can do a partial update, where you specify only the field value to change.
Sorting Nodes in a hierarchy
You can sort the order of your nodes, regardless of where the nodes are in the hierarchy.
The node with the highest value of sort_order is displayed first. For example, a node with a sort_order
value of 3
appears before a node with a sort_order
value of 2
.
- If you don’t provide
sort_order
when creating nodes, all child nodes in the response for Get a Node’s Children request are ordered by theupdated_at
time in descending order, with the most recently updated child node first. - If you set
sort_order
for only a few child nodes or not all, the child nodes with asort_order
value appear first and then other child nodes appear in the order ofupdated_at
time.
You can also specify a sort_order when creating a node relationship.
- If you update a node (Node A) with a
sort_order
and then you create a relationship for Node A with another node (Node B), thesort_order
you specified when updating Node A is overwritten. - If you have updated Node A and then you create a relationship with Node B but do not configure a
sort_order
, thesort_order
you specified when you updated Node A is not overwritten.
Curating Products in a node
You can curate the products in a node. Product curation allows you to promote specific products within each node of your hierarchies, enabling you to create unique product collections in your storefront. For example, you may find you have an abundance of cotton T-Shirts and you want to promote these products to the top of the product list. When a shopper navigates to T-shirts, the cotton T-Shirts are displayed first.
You can do this by adding a curated_products
attribute to the body of your request and adding an array of product IDs to the attribute. You should add the products IDs in the order you want them to be displayed in your node. The first product ID is displayed first in the product list.
You can only curate 20 products or less. You cannot have more than 20 curated products.
- The product IDs you provide must exist in the specified node.
- If a curated product is removed from a node, the product is also removed from the curated_products list.
- Once you have curated the products in a node, you can use the get node products endpoint to retrieve a list of curated products.
You can then display your curated products in your catalogs using the following catalog endpoints.
- Get a node in your latest catalog release
- Get a node in a catalog
- Get all nodes in your latest catalog release
- Get all nodes in a catalog
- Get node children in your latest catalog release
- Get node children in a catalog
Request
Responses
- 200
- 403
- 404
- 422
- 500