2

I have some products with a custom attribute called "day_special" which may have a value of 'yes' or 'no'. When I called a product (say sku: abc115) through webapi (url: domain.com/rest/V1/products/abc115), It shows all the product details and the "day_special" attribute is there within the "custom_attributes" section and values in it.

Now I want to get all the products with a specific custom attribute. That is get all products with attributes "day_special" as "yes". Is there any rest api method which gives the mentioned results?

asked Oct 10, 2016 at 6:52

1 Answer 1

4

You can try using the catalogProductRepositoryV1 -> [GET] /V1/products

searchCriteria[filter_groups][0][filters][0][field]
searchCriteria[filter_groups][0][filters][0][value]
searchCriteria[filter_groups][0][filters][0][condition_type]

So the final URL will look like this:

http://<magento_host>/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=custom_attribute_code&searchCriteria[filter_groups][0][filters][0][value]=custom_attribute_value&searchCriteria[filter_groups][0][filters][0][condition_type]=eq

References: http://devdocs.magento.com/swagger/

answered Oct 10, 2016 at 9:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.