1

I am making following REST API call to get product list, response for this API has extension_attributes tag, but in response these tags are missing.

V1/products?searchCriteria[filter_groups][0][filters][0][field]='.$field.'&searchCriteria[filter_groups][0][filters][0][value]='. $value.'&searchCriteria[filter_groups][0][filters][0][condition_type]='.$condition_type;

Response

{"items":[{"id":1,"sku":"24-MB01","name":"Joust Duffle Bag","attribute_set_id":15,"price":34,"status":1,"visibility":4,"type_id":"simple","created_at":"2016-06-26 16:01:55","updated_at":"2016-07-02 06:45:32","product_links":[{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-MB03","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-MB05","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-MB06","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-MB02","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-UB02","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-WB03","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-WB07","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-MB01","link_type":"upsell","linked_product_sku":"24-WB04","linked_product_type":"simple","position":null,"extension_attributes":[]}],"options":[],"tier_prices":[],"custom_attributes":[{"attribute_code":"description","value":"<p>The sporty Joust Duffle Bag can't be beat - not in the gym, not on the luggage carousel, not anywhere. Big enough to haul a basketball or soccer ball and some sneakers with plenty of room to spare, it's ideal for athletes with places to go.<p>\r\n<ul>\r\n<li>Dual top handles.<\/li>\r\n<li>Adjustable shoulder strap.<\/li>\r\n<li>Full-length zipper.<\/li>\r\n<li>L 29\" x W 13\" x H 11\".<\/li>\r\n<\/ul>"},{"attribute_code":"image","value":"\/m\/b\/mb01-blue-0.jpg"},{"attribute_code":"small_image","value":"\/m\/b\/mb01-blue-0.jpg"},{"attribute_code":"thumbnail","value":"\/m\/b\/mb01-blue-0.jpg"},{"attribute_code":"options_container","value":"container2"},{"attribute_code":"required_options","value":"0"},{"attribute_code":"has_options","value":"0"},{"attribute_code":"image_label","value":"Image"},{"attribute_code":"small_image_label","value":"Image"},{"attribute_code":"thumbnail_label","value":"Image"},{"attribute_code":"msrp_display_actual_price_type","value":"0"},{"attribute_code":"url_key","value":"joust-duffle-bag"},{"attribute_code":"tax_class_id","value":"2"},{"attribute_code":"activity","value":"11,19,21,22"},{"attribute_code":"style_bags","value":"25,26,29"},{"attribute_code":"material","value":"37,38"},{"attribute_code":"strap_bags","value":"61,62,63,64,65,66"},{"attribute_code":"features_bags","value":"74,76,79"},{"attribute_code":"eco_collection","value":"0"},{"attribute_code":"performance_fabric","value":"0"},{"attribute_code":"erin_recommends","value":"0"},{"attribute_code":"new","value":"0"},{"attribute_code":"sale","value":"0"}]}],"search_criteria":{"filter_groups":[{"filters":[{"field":"sku","value":"24-MB01","condition_type":"eq"}]}]},"total_count":1}

How can I get extension_attributes in the response? Extension_attributes are available in Product search based on sku.

1

The answer is here: http://devdocs.magento.com/codelinks/attributes.html I don't know why products wasn't included on that list.

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.