Forum Discussion

satya's avatar
satya
Expert
12 months ago

Get sub categories and group hubs using single API

Hi Team,

We are working on a use case where a category has 10 subcategories and 5 group hubs and we want to fetch all the details of the category (both subcategories and group hubs) via a single v2 API.

Is there any specific API that is available to get those details?

Thanks,

Srujana Satya Datla.

  • Hi satya 

    You can use the below API for your use case:

    SELECT * FROM nodes WHERE parent.id="category:zzzzzzzz"

    Please replace zzzzzzzz with your category ID and let me know if you face any issues or have any further queries.

    If you appreciate my efforts, please give me a Kudo
    Accept as a Solution to help others find it faster.


  • Hi satya! Could you please let me know the specific fields you would like to retrieve? The nodes collection will be the object to query here, but it's possible that some data for group hubs won't be available directly from the nodes collection, so the field details matter here.