Wanted to use REST API to get all categories where is_active
attribute is true
.
Here is endpoint I am calling https://www.domain.com/rest/default/V1/categories
Which giving me all the categories is_active is true and false.
I tried to add filters but didnt work either.
https://www.domain.com/rest/default/V1/categories?searchCriteria[filterGroups][0][filters][0][field]=is_active&searchCriteria[filterGroups][0][filters][0][value]=true&searchCriteria[filterGroups][0][filters][0][conditionType]=eq
Could someone help how to apply filter on category to get only active categories?
Best Answer
Use the below code in Postman you will find all the categories
Reference : This is a reference link for the code
Also, try replacing the " list " with the default category Id. Say Default Category Id is 2. Then the endpoint will be below
Try below:
Note: Make sure you pass all keyword in Url and it will works