DW.get_category (eng) - datawizio/pythonAPI GitHub Wiki

get_category – returns a category or a category tree.

Shows the name of a chosen category, list of products belonging to it, parent and child category.

Parameters:

categories: int,list, default:None

id of the category or a list of chosen categories. If it is not set, then the category of the highest level will be used.

Returns: returns object of the category or a list of object of a certain type

       {
           "children": [
               {<child_category_id>: <child_category_name>}
               ...
               ],
           "category_id": <category_id>,
           "category_name": <category_name>,
           "products": [
               {<product_id>: <product_name>}
               ...
               ],
           "parent_category_id": <parent_category_id>
           "parent_category_name": <parent_category_name>
       }   

Example:

dw = datawiz.DW()
dw.get_category(categories = [51171, 51172])
⚠️ **GitHub.com Fallback** ⚠️