Assign Products to Multiple Nodes
POST
Attach multiple nodes
https://api.moltin.com/pcm/products/attach_nodes
Assigns products to multiple hierarchies and their children nodes.
Request Parameters
Body
Name | Required | Type | Description |
---|---|---|---|
filter | Required | string | Filters applied to search for appropriate products. For more details on filtering, see Filtering |
node_ids | Required | string | A list of node UUIDs that you want to assign to the products. |
Headers
Name | Required | Type | Description |
---|---|---|---|
Authorization | Required | string | The Bearer token required to get access to the API. |
Request Example
This request assigns the products that you have selected to multiple hierarchies and their children nodes.
curl -X POST https://api.moltin.com/pcm/products/attach_nodes \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"filter": "eq(sku,book)",
"node_ids": ["123"]
}
}
Response Example
200 OK
{
"meta": {
"nodes_attached": 3,
"nodes_not_found": []
}
}'
Response Objects
Name | Description |
---|---|
nodes_attached | Number of nodes assigned to the products. |
nodes_not_found | A list of node UUIDs that could not be identified. |