4

How to use V1/search to get the names and SKU's of the magento products?

I need a text based search to get the names and SKU's of the magento products. While using V1/products API, the response is too much. I just need the name and the SKU, just like google suggestions come up when you type something.

I tried wit the V1/search api but no luck:http://192.168.1.180/magento/index.php/rest/V1/search?searchCriteria[filter_groups][0][filters][0][field]=name&searchCriteria[filter_groups][0][filters][0][value]=%nike%&searchCriteria[filter_groups][0][filters][0][condition_type]=like

3

Use V1/products instead of V1/search and add fields=items[sku],items[name] GET parameter to the request URL. This allows to get only requested fields in the response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.