Root categories and category levels

QuestionsCategory: Product categoryRoot categories and category levels
integrations@anchanto.com asked 3 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
        },
           .
           .
           . 
         ]
     }