Detach multiple nodes
POST/pcm/products/detach_nodes
Dissociates products from multiple hierarchies and their children nodes. You can apply filters to search for the appropriate products to detach. For general filtering syntax, see Filtering.
The following attributes and operators are supported.
Operator | Attribute | Description | Example |
---|---|---|---|
eq | sku , slug ,upc_ean , mpn , name , templates , commodity_type , owner , product_types | Equals. 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) |
like | sku , slug ,upc_ean , mpn , name | Like. Checks if the operand contains the specified string. Wildcards are supported. | filter=like(name,*some-name*) |
In | id , name , SKU , slug , upc_ean , mpn , product_types | Checks 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
- application/json
Body
required
data objectrequired
You can apply filters to search for the appropriate products to detach. See Detach multiple nodes.
A list of node unique identifiers that you want to assign to the products.
Responses
- 200
- 400
- 422
- 500
The request dissociates the products that you have selected from multiple hierarchies and their children and returns the following.
- application/json
- Schema
- Example (from schema)
- created-product
Schema
meta object
Number of nodes dissociated from the products.
A list of node unique identifiers that could not be identified.
{
"meta": {
"nodes_detached": 0,
"nodes_not_found": [
"123"
]
}
}
Detach multiple nodes
{
"meta": {
"nodes_detached": 1,
"nodes_not_found": []
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- bad-request
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Bad Request",
"detail": "Could not parse the supplied filter",
"status": "400"
}
]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- failed-validation
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Failed Validation",
"status": "422",
"detail": "<XYZ> can not be empty"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}