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
.
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