Root categories and category levels

Questions › Category: Product category › Root categories and category levels
integrations@anchanto.com asked 5 years ago

How can we identify if a category is a root category or not, because from the api response it’s not possible.
Sample response:- 

    {
       “data”: [
        {
            “id”: 2,
            “name”: “Root”,
            “description”: “We select and import the latest and best English titles”,
            “parent_id”: 1,
            “is_primary”: false
        },
           .
           .
           . 
         ]
     }