critic
critic

Reputation: 69

Magento API Rest filters

So I have this piece of code below which will sucessfully pull a product and give the XML data for my magento store...

http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][in]=test%20product%20name

However, it will ONLY pull up the product info if I make the product name perfect. If I try to just put in

http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][in]=test

It will not bring ANY products. It was my understanding that if I used the "[in]" filter that it should bring up all products containing the "test" word but it doesnt...

Upvotes: 0

Views: 1189

Answers (1)

Stelian
Stelian

Reputation: 41

in - "equals any of" - returns items that are equal to the item(s) with the specified attribute(s)

Try to use 'like' ...

http://mywebsite.com/api/rest/products?type=rest&filter[1][attribute]=name&filter[1][like]=%test%

Upvotes: 4

Related Questions