How to get subcategries for each category in REST API?

I tried to get category as:


2 Answers 2


That is correct, are you sure you're using a valid category ID? Example:


Then you can get the sub categories from the response, response.children.

  • 2
    Just for future reference, with that endpoint, response.children returns a comma separated list of child IDs. Jan 30, 2018 at 13:28
  • @PaulBlundell The painful turth that Magento like to develop the Framework to 75% of it's maximum potenial. Leave the 25% to the Community
    – MackieeE
    Aug 13, 2019 at 9:36

Your method is correct, but it will only return all child category ID's in comma-separated numbers. If you want to get sub-category information, then you need to write down a custom module with webapi.xml for your custom route to write a logic for this. This is not possible without doing customization in interface method.


Rahul Anand

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.