read_products to read, write_products to change (it includes read_products), the same as products.
The category
name, slug and thumb are required on create. A product lists its categories in category_ids: set them on the product with Update a product.
The HTML content is not part of the API
A category can have HTML content that the merchant writes in the dashboard. Apps can neither read nor write it: it is in no answer, and sendingcontent or is_advanced_content answers 400 invalid_request. A category you create starts with none, as in the dashboard, and an update leaves what the merchant wrote.
Subcategories
parent_idmust be a category of the store. It cannot be the category itself, nor one of its own subcategories (422, ruleparent). APATCHwithparent_id: nullmakes the category a top-level one.- List categories lists every level. Filter it with
filter=parent_id||$isnullfor the top level, orfilter=parent_id||$eq||<id>for one category’s subcategories. - Get a category adds subcategories as
childrenwithjoin=children, up to three levels (children.children.children). One read joins at most 100 subcategories over all levels (422 join_too_large); list them instead.
Deleting
Delete a category removes it from lists and reads (404), and products stop listing it in category_ids. It cannot be restored through the API. A category that still has subcategories answers 409 category_has_children: delete them or move them first.