To create a root product category to a profile product catalog, send a POST request to "/admin/product_catalog/create_category" with the following parameters:
- product_category[name] == the name of product category to be created
- product_category[description] == the description of the product category
- product_category[tag_list] == tags you want to attach to the product category
Removing a product category from a profile's product catalog is a bit easier, send a POST request to "/admin/product_catalog/delete_category with an "id" parameter. The "id" parameter is the id of the product category to be deleted.
So now... how do we add/remove a product under a product category in a profile's product catalog? In my previous post, I explained how to add/remove products to a profile's product catalog. Just follow that guide and pass a "category_id" parameter with each add/remove request: the "category_id" param is the id of the product category where you want to add/remove the product.
And lastly... no, there is no update product category yet. Anyway I hope you love this new feature.
Have a good one!


Posted by Spencer Shek on 07-14-2008