cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the root category for a given store through soap api?

SOLVED

How to get the root category for a given store through soap api?

I have the store id and I can get the store information via the `storeInfo` API. However, the store info does not contain the root category id. Is there any way I can get this information from the soap api?

4 REPLIES

Re: How to get the root category for a given store through soap api?

Hi @tao_zhang,

 

Maybe you can try getting the category tree?

 

http://devdocs.magento.com/guides/m1x/api/soap/catalog/catalogCategory/catalog_category.tree.html

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: How to get the root category for a given store through soap api?

Hey @Damian Culotta,

 

Thank you for your reply. My goal is to get the root category for a given store, which can be any node in the category tree. When getting the category tree, we can either provide or not provide the parent id. I might be missing something here. but:

 

I am assuming the parent id is not known and thus not provided. otherwise, we already have the answer. In that case, we can get the entire category tree. the root node is in that tree, but how can we tell which node is what we are looking for?

 

Re: How to get the root category for a given store through soap api?

Hi @tao_zhang,

 

I guess you won't be able to get the information in that way.

Maybe you could develop your own endpoint to get that information? I can't imagine right now another option.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: How to get the root category for a given store through soap api?

Hey @Damian Culotta,

 

Thanks for confirming. My team figured the same.