Skip to main content

Attach multiple nodes

POST 

/pcm/products/attach_nodes

Assigns products to multiple hierarchies and their children nodes. You can apply a filter to search for the appropriate products to attach to a node. For general filtering syntax, see Filtering.

The following attributes and operators are supported.

OperatorAttributeDescriptionExample
eqsku, slug,upc_ean, manufacturer_part_num, name, templates, commodity_type, owner, product_typesEquals. Checks if the values of two operands are equal. If they are, the condition is true. For product_types, you can only specify one product type. For example, filter=eq(product_types,child)filter=eq(name,some-name)
likesku, slug,upc_ean, manufacturer_part_num, nameLike. Checks if the operand contains the specified string. Wildcards are supported.filter=like(name,*some-name*)
Inid, name, SKU, slug, upc_ean, manufacturer_part_num, product_typesChecks if the values are included in the specified string. If they are, the condition is true. For product_types, you can specify more than one product type. For example, filter=in(product_types,child,bundle).filter=in(id,some-id)

Request

Body

required
    data objectrequired
    filter stringrequired

    Filters applied to search for appropriate products to attach to a node. See Attach multiple nodes.

    node_ids string[]required

    A list of node unique identifiers that you want to assign to the products.

Responses

This request assigns the products that you have selected to multiple hierarchies and their children nodes and returns the following.

Schema
    meta object
    nodes_attached integer

    Number of nodes assigned to the products.

    nodes_not_found string[]

    A list of node unique identifiers that could not be identified.

Loading...