PXM Products/
PXM Products API/
Assign Products to Multiple Nodes

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

NameRequiredTypeDescription
filterRequiredstringFilters applied to search for appropriate products. For more details on filtering, see Filtering
node_idsRequiredstringA list of node UUIDs that you want to assign to the products.

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe 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

NameDescription
nodes_attachedNumber of nodes assigned to the products.
nodes_not_foundA list of node UUIDs that could not be identified.

Was this helpful?

Previous
Personalized PXM Products

Learn

Docs