Delete a category node
Deletes a category node together with its descendants. This is a hard delete — the rows are removed from the database.
The node's own menu item and pretty URL are deleted with it, and a redirect is kept from the deleted pretty URL to the node's /category/{pk}/ route (which no longer resolves once the node is gone). The pretty URLs of deleted descendants are left in place and receive no redirect, so delete a branch node by node if their storefront URLs matter.
Deletion is refused with 406 Not Acceptable in two cases:
category_600_4
The node is a tree root.
category_600_5
The node or any of its descendants still has products filed under it.
Detach the products through the product_category endpoints before deleting a branch. The wording of the error message is translated, so match on error_code rather than on the message text.
Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.
The unique identifier of the category node.
The category node was deleted successfully. No response body.
No content
Authentication credentials were not provided or are invalid.
The authenticated user does not have administrator privileges.
No category node exists with the given identifier.
The request is well-formed but violates a business rule — creating a tree root when the storefront navigation already has a root menu item, deleting a tree root or a node that still holds products, or a pretty URL that could not be generated. See the CategoryNodeBusinessError schema for the individual codes.
DELETE /api/v1/remote/1/category_node/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?

