3

I need one help. I need to fetch the product details by product ID using REST API magento-2. I searched many API but its taking the sku value to give the product details. Here My requirement is to get all details using the product ID.

1

The only way to get the product details by id is to use the searchCriteria, But unfortunately, this will not give you all details, you have to build your custom API endpoint, below is an endpoint example on how to use the searchCriteria.

/V1/products?&searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=99&searchCriteria[filter_groups][0][filters][0][condition_type]=eq

I hope this will help you

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.