How can I get a category filter by name?
If I used
http://example.com/index.php/rest/V1/categories?
searchCriteria[filter_groups][0][filters][0][field]=name&
searchCriteria[filter_groups][0][filters][0][value]=Robots&
searchCriteria[filter_groups][0][filters][0][condition_type]=eq
Then it returned me all categories but I want only the category with name = Robots
Is it possible?
Thanks
thanks for your help
But if I send:
Then I get:
{
"message": "Invalid type for value: \"list\". Expected Type: \"int\"." }
If I send:
I get all the categories
Thanks
Best Answer
You should use
/V1/categories/list
instead of/V1/categories
. And modify your parameters fromfilter_groups
tofilterGroups
, andcondition_type
toconditionType
. So that:Ref: http://devdocs.magento.com/swagger/index.html#!/catalogCategoryListV1/catalogCategoryListV1GetListGet