Set product categories

ps_set_product_categories

Write · preview + approveBlock 1 · Content & SEODaily connector

Moves products into or out of categories.

Ask Claude

„Move all products from Corner sofas to Sofas, make Sofas their default category, and also add them to Sale.”

Example preview

14 products. Product 140 Corner sofa Bergen: categories [Corner sofas] -> [Sofas, Sale], default Corner sofas -> Sofas.
URL: /corner-sofas/140-bergen.html -> /sofas/140-bergen.html, old URL will redirect 301.

Technical details

Adds products to categories, removes them, and sets the default category, for a list of products or all products of a source category. Example "move from X to Y and also add to Z": from_category_id=X, add_category_ids=[Y,Z], remove_category_ids=[X], default_category_id=Y. When the category is part of the product URL, the preview shows the URL changes and whether old URLs will redirect with 301.

Parameters

NameTypeRequiredDescription
productsarray of stringnoList of products (max 200), or use from_category_id.
from_category_idintegernoAll products assigned to this category (without subcategories).
add_category_idsarray of integernoCategories to add (max 20).
remove_category_idsarray of integernoCategories to remove (max 20).
default_category_idintegernoNew default category (also added to the product's categories).
shop_idintegernoShop ID in a multistore installation. Defaults to the shop in the connector address. IDs are listed by ps_get_shop_info.
confirmbooleannofalse (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token.
change_tokenstringwhen: confirm=trueToken from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state.

Limits

Max 200 products per call, max 20 categories to add and 20 to remove.

What you see before anything is saved

Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.

Related tools

Last updated: 2026-10-03