cancel
Showing results for 
Search instead for 
Did you mean: 

Getting products by REST API

0 Kudos

Getting products by REST API

Feature request from wozniakm, posted on GitHub Mar 14, 2016

Steps to reproduce

  1. Create configurable product
  2. Call REST API to get products, for example GET /rest/V1/products?searchCriteria[page_size]=3

Expected result

  1. Returned array should contain your added product with extension_attributes key inside

Actual result

  1. The extension_attributes is not present

In ProductRepository there is a line $this->extensionAttributesJoinProcessor->process($collection); which calls method responsible for extension_attributes, but despite that they are not included into product. If you request product details by calling GET /rest/V1/products/:sku the extension_attributes array is present.

It really makes no sense to call API once to get products, then call API to get configurable product details and then, finally, call API to get values and labels for configurable options. Is there easier way?

3 Comments
apiuser
New Member
Status changed to: Investigating
 
apiuser
New Member

Comment from mbrinton01, posted on GitHub May 13, 2016

Internal issue MAGETWO-52814

apiuser
New Member

Comment from sereban, posted on GitHub Aug 17, 2016

Done See code sample here: https://github.com/magento/magento2-samples/tree/master/sample-external-links