Magento rest API configurable product and category list Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Price In Configurable Product is 0 in REST API Response : Magento 2Changing/Modifying Magento 2 Rest Api call from urlHow to get same products from rest api as are visible on frontend?How to show configurable price range on product list page & product page?Magento 2 filter products by price from Rest APIMultiple Filters not working in magetno2 using rest APIHow to set the multi lang storeHow to load another language variables by REST APIMagento 2.3 V1/Search with sortOrders not working in REST APIMagento2 API Filtering Multiple categoriesError on retriving Product List API

Why do we bend a book to keep it straight?

If windows 7 doesn't support WSL, then what does Linux subsystem option mean?

How do I use the new nonlinear finite element in Mathematica 12 for this equation?

Do wooden building fires get hotter than 600°C?

Does the Weapon Master feat grant you a fighting style?

How would a mousetrap for use in space work?

Disembodied hand growing fangs

Using audio cues to encourage good posture

Chinese Seal on silk painting - what does it mean?

Can a new player join a group only when a new campaign starts?

What's the meaning of "fortified infraction restraint"?

The code below, is it ill-formed NDR or is it well formed?

What is the font for "b" letter?

Take 2! Is this homebrew Lady of Pain warlock patron balanced?

Is there hard evidence that the grant peer review system performs significantly better than random?

What do you call the main part of a joke?

How to write this math term? with cases it isn't working

Generate an RGB colour grid

Significance of Cersei's obsession with elephants?

A term for a woman complaining about things/begging in a cute/childish way

Trademark violation for app?

How were pictures turned from film to a big picture in a picture frame before digital scanning?

Did Krishna say in Bhagavad Gita "I am in every living being"

Using et al. for a last / senior author rather than for a first author



Magento rest API configurable product and category list



Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Price In Configurable Product is 0 in REST API Response : Magento 2Changing/Modifying Magento 2 Rest Api call from urlHow to get same products from rest api as are visible on frontend?How to show configurable price range on product list page & product page?Magento 2 filter products by price from Rest APIMultiple Filters not working in magetno2 using rest APIHow to set the multi lang storeHow to load another language variables by REST APIMagento 2.3 V1/Search with sortOrders not working in REST APIMagento2 API Filtering Multiple categoriesError on retriving Product List API



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








6















I am having a project using Magento rest API V1, I have read through the documentation and looking for the answer around the web but cannot find the solution.



** First: **



I want to show list of configurable products and user will select the size before adding to cart, I am using :



domain/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=has_options&searchCriteria[filterGroups][0][filters][01][value]=1&searchCriteria[pageSize]=10


**The response I get: **




"items": [

"id": 1,
"sku": "AA0001",
"name": "Sample Product",
"attribute_set_id": 1,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
....
,
....
]



The problem is the price is 0, and I only want to show configurable product list.



** Second: **



I want to do a filter by size, color and another attribute for a specific category, how can I get a list of available attributes by category?
Like category_id = 1 and show what sizes are available only for that category.



Thanks in advance










share|improve this question
















bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • To my mind if your logic is specific you need to create your custom API based on the Magento native API. You will have more control to manage the output.

    – Franck Garnier
    Dec 1 '16 at 7:56

















6















I am having a project using Magento rest API V1, I have read through the documentation and looking for the answer around the web but cannot find the solution.



** First: **



I want to show list of configurable products and user will select the size before adding to cart, I am using :



domain/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=has_options&searchCriteria[filterGroups][0][filters][01][value]=1&searchCriteria[pageSize]=10


**The response I get: **




"items": [

"id": 1,
"sku": "AA0001",
"name": "Sample Product",
"attribute_set_id": 1,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
....
,
....
]



The problem is the price is 0, and I only want to show configurable product list.



** Second: **



I want to do a filter by size, color and another attribute for a specific category, how can I get a list of available attributes by category?
Like category_id = 1 and show what sizes are available only for that category.



Thanks in advance










share|improve this question
















bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • To my mind if your logic is specific you need to create your custom API based on the Magento native API. You will have more control to manage the output.

    – Franck Garnier
    Dec 1 '16 at 7:56













6












6








6


2






I am having a project using Magento rest API V1, I have read through the documentation and looking for the answer around the web but cannot find the solution.



** First: **



I want to show list of configurable products and user will select the size before adding to cart, I am using :



domain/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=has_options&searchCriteria[filterGroups][0][filters][01][value]=1&searchCriteria[pageSize]=10


**The response I get: **




"items": [

"id": 1,
"sku": "AA0001",
"name": "Sample Product",
"attribute_set_id": 1,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
....
,
....
]



The problem is the price is 0, and I only want to show configurable product list.



** Second: **



I want to do a filter by size, color and another attribute for a specific category, how can I get a list of available attributes by category?
Like category_id = 1 and show what sizes are available only for that category.



Thanks in advance










share|improve this question
















I am having a project using Magento rest API V1, I have read through the documentation and looking for the answer around the web but cannot find the solution.



** First: **



I want to show list of configurable products and user will select the size before adding to cart, I am using :



domain/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=has_options&searchCriteria[filterGroups][0][filters][01][value]=1&searchCriteria[pageSize]=10


**The response I get: **




"items": [

"id": 1,
"sku": "AA0001",
"name": "Sample Product",
"attribute_set_id": 1,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
....
,
....
]



The problem is the price is 0, and I only want to show configurable product list.



** Second: **



I want to do a filter by size, color and another attribute for a specific category, how can I get a list of available attributes by category?
Like category_id = 1 and show what sizes are available only for that category.



Thanks in advance







magento2 api rest






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 21 '17 at 3:51









Amrit Pal Singh

802624




802624










asked Dec 1 '16 at 4:55









HakutsuruHakutsuru

312




312





bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 19 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • To my mind if your logic is specific you need to create your custom API based on the Magento native API. You will have more control to manage the output.

    – Franck Garnier
    Dec 1 '16 at 7:56

















  • To my mind if your logic is specific you need to create your custom API based on the Magento native API. You will have more control to manage the output.

    – Franck Garnier
    Dec 1 '16 at 7:56
















To my mind if your logic is specific you need to create your custom API based on the Magento native API. You will have more control to manage the output.

– Franck Garnier
Dec 1 '16 at 7:56





To my mind if your logic is specific you need to create your custom API based on the Magento native API. You will have more control to manage the output.

– Franck Garnier
Dec 1 '16 at 7:56










2 Answers
2






active

oldest

votes


















0














Here is the REST API call to filter only configurable product:



 http://magento2api.com/rest/V1/products?searchCriteria[pageSize]=5&searchCriteria[currentPage]=1&searchCriteria[filterGroups][0][filters][0][field]=type_id&searchCriteria[filterGroups][0][filters][0][value]=configurable&searchCriteria[filterGroups][0][filters][0][conditionType]=eq


postman screen image:



enter image description here



Result:



 
"items": [
"id": 67,
"sku": "MH01",
"name": "Chaz Kangeroo Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:52",
"updated_at": "2016-09-26 06:45:52",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.</p>n<p>&bull; Two-tone gray heather hoodie.<br />&bull; Drawstring-adjustable hood. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 83,
"sku": "MH02",
"name": "Teton Pullover Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>This Teton Pullover Hoodie gives you more than laid-back style. It's equipped with moisture-wicking fabric to keep light and dry inside, especially in chilly-weather workouts. An elasticized hem lets you move about freely.</p>n<p>&bull; Black pullover hoodie.<br />&bull; Soft, brushed interior. <br />&bull; Front hand pockets. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 99,
"sku": "MH03",
"name": "Bruno Compete Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Stay comfortable and stay in the race no matter what the weather's up to. The Bruno Compete Hoodie's water-repellent exterior shields you from the elements, while advanced fabric technology inside wicks moisture to keep you dry.</p>n<p>&bull; Full zip black hoodie pullover. <br />&bull; Adjustable drawstring hood. <br />&bull; Ribbed cuffs/waistband. <br />&bull; Kangaroo pocket. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 115,
"sku": "MH04",
"name": "Frankie Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>The Frankie Sweatshirt is your best friend at long afternoon stadium stints or winter trailside campsites. The soft fleece fabric keeps you toasty as moisture-wicking technology kicks in when the sun comes out.</p>n<p>&bull; Light green crewneck sweatshirt.<br />&bull; Hand pockets.<br />&bull; Relaxed fit.<br />&bull; Machine wash/dry.</p>"
]
,
"id": 131,
"sku": "MH05",
"name": "Hollister Backyard Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Kick off your weekend in the Hollister Backyard Sweatshirt. Whether you're raking leaves or flipping burgers, this comfy layer blocks the bite of the crisp autumn air. Puffy thick from hood to hem, it traps heat against your core.</p>n<p>&bull; Cream crewneck sweatshirt with navy sleeves/trim.<br />&bull; Relaxed fit. <br />&bull; Ribbed cuffs and hem. <br />&bull; Machine wash/dry.</p>"
]
],
"search_criteria":
"filter_groups": [
"filters": [
"field": "type_id",
"value": "configurable",
"condition_type": "eq"
]
],
"page_size": 5,
"current_page": 1
,
"total_count": 147



for more attribute change type_id with the atteibute code and value of the attribute for example:
searchCriteria[filterGroups][0][filters][0][field] color



searchCriteria[filterGroups][0][filters][0][value] red



searchCriteria[filterGroups][0][filters][0][conditionType] eq






share|improve this answer























  • How to display a real price without 0 ?

    – Jsparo30
    Aug 20 '17 at 5:56


















0














I know it's an old question, but I hope someone would find it useful.



You need to use another endpoint to get the configurable product price.



/rest/V1/configurable-products/:sku/children


Each product children might be having their own price.



So you need to find a lower price or any reasonable way from the children to display the configurable product price in a category list. Also in default product detail display.



Because each product children might be having different price. You need to get the correct price based on the selected configurable product options.



You can see all the options below the "extension_attributes" -> "configurable_product_options" property or using below endpoint :



/rest/V1/configurable-products/:sku/options/all


To display the options correct values, you need to get all available product attributes using below endpoint :



/rest/V1/products/attributes?searchCriteria[filterGroups][0][filters][0][field]=is_visible&searchCriteria[filterGroups][0][filters][0][value]=1&searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[filterGroups][1][filters][0][field]=is_user_defined&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq



Check & modify the query param for your best result. Also by the time I answer this question, you cannot test this endpoint using plain Postman request, you need to pass the Authorization header.




Then display the options based on the "configurable_product_options" property.






share|improve this answer























  • I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

    – Jsparo30
    Aug 20 '17 at 6:00











  • I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

    – sule
    Aug 20 '17 at 10:09











  • Does any Magento 2 interface or api not leak profusely?

    – J. M. Becker
    Dec 16 '18 at 19:13











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f148310%2fmagento-rest-api-configurable-product-and-category-list%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Here is the REST API call to filter only configurable product:



 http://magento2api.com/rest/V1/products?searchCriteria[pageSize]=5&searchCriteria[currentPage]=1&searchCriteria[filterGroups][0][filters][0][field]=type_id&searchCriteria[filterGroups][0][filters][0][value]=configurable&searchCriteria[filterGroups][0][filters][0][conditionType]=eq


postman screen image:



enter image description here



Result:



 
"items": [
"id": 67,
"sku": "MH01",
"name": "Chaz Kangeroo Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:52",
"updated_at": "2016-09-26 06:45:52",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.</p>n<p>&bull; Two-tone gray heather hoodie.<br />&bull; Drawstring-adjustable hood. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 83,
"sku": "MH02",
"name": "Teton Pullover Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>This Teton Pullover Hoodie gives you more than laid-back style. It's equipped with moisture-wicking fabric to keep light and dry inside, especially in chilly-weather workouts. An elasticized hem lets you move about freely.</p>n<p>&bull; Black pullover hoodie.<br />&bull; Soft, brushed interior. <br />&bull; Front hand pockets. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 99,
"sku": "MH03",
"name": "Bruno Compete Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Stay comfortable and stay in the race no matter what the weather's up to. The Bruno Compete Hoodie's water-repellent exterior shields you from the elements, while advanced fabric technology inside wicks moisture to keep you dry.</p>n<p>&bull; Full zip black hoodie pullover. <br />&bull; Adjustable drawstring hood. <br />&bull; Ribbed cuffs/waistband. <br />&bull; Kangaroo pocket. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 115,
"sku": "MH04",
"name": "Frankie Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>The Frankie Sweatshirt is your best friend at long afternoon stadium stints or winter trailside campsites. The soft fleece fabric keeps you toasty as moisture-wicking technology kicks in when the sun comes out.</p>n<p>&bull; Light green crewneck sweatshirt.<br />&bull; Hand pockets.<br />&bull; Relaxed fit.<br />&bull; Machine wash/dry.</p>"
]
,
"id": 131,
"sku": "MH05",
"name": "Hollister Backyard Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Kick off your weekend in the Hollister Backyard Sweatshirt. Whether you're raking leaves or flipping burgers, this comfy layer blocks the bite of the crisp autumn air. Puffy thick from hood to hem, it traps heat against your core.</p>n<p>&bull; Cream crewneck sweatshirt with navy sleeves/trim.<br />&bull; Relaxed fit. <br />&bull; Ribbed cuffs and hem. <br />&bull; Machine wash/dry.</p>"
]
],
"search_criteria":
"filter_groups": [
"filters": [
"field": "type_id",
"value": "configurable",
"condition_type": "eq"
]
],
"page_size": 5,
"current_page": 1
,
"total_count": 147



for more attribute change type_id with the atteibute code and value of the attribute for example:
searchCriteria[filterGroups][0][filters][0][field] color



searchCriteria[filterGroups][0][filters][0][value] red



searchCriteria[filterGroups][0][filters][0][conditionType] eq






share|improve this answer























  • How to display a real price without 0 ?

    – Jsparo30
    Aug 20 '17 at 5:56















0














Here is the REST API call to filter only configurable product:



 http://magento2api.com/rest/V1/products?searchCriteria[pageSize]=5&searchCriteria[currentPage]=1&searchCriteria[filterGroups][0][filters][0][field]=type_id&searchCriteria[filterGroups][0][filters][0][value]=configurable&searchCriteria[filterGroups][0][filters][0][conditionType]=eq


postman screen image:



enter image description here



Result:



 
"items": [
"id": 67,
"sku": "MH01",
"name": "Chaz Kangeroo Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:52",
"updated_at": "2016-09-26 06:45:52",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.</p>n<p>&bull; Two-tone gray heather hoodie.<br />&bull; Drawstring-adjustable hood. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 83,
"sku": "MH02",
"name": "Teton Pullover Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>This Teton Pullover Hoodie gives you more than laid-back style. It's equipped with moisture-wicking fabric to keep light and dry inside, especially in chilly-weather workouts. An elasticized hem lets you move about freely.</p>n<p>&bull; Black pullover hoodie.<br />&bull; Soft, brushed interior. <br />&bull; Front hand pockets. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 99,
"sku": "MH03",
"name": "Bruno Compete Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Stay comfortable and stay in the race no matter what the weather's up to. The Bruno Compete Hoodie's water-repellent exterior shields you from the elements, while advanced fabric technology inside wicks moisture to keep you dry.</p>n<p>&bull; Full zip black hoodie pullover. <br />&bull; Adjustable drawstring hood. <br />&bull; Ribbed cuffs/waistband. <br />&bull; Kangaroo pocket. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 115,
"sku": "MH04",
"name": "Frankie Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>The Frankie Sweatshirt is your best friend at long afternoon stadium stints or winter trailside campsites. The soft fleece fabric keeps you toasty as moisture-wicking technology kicks in when the sun comes out.</p>n<p>&bull; Light green crewneck sweatshirt.<br />&bull; Hand pockets.<br />&bull; Relaxed fit.<br />&bull; Machine wash/dry.</p>"
]
,
"id": 131,
"sku": "MH05",
"name": "Hollister Backyard Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Kick off your weekend in the Hollister Backyard Sweatshirt. Whether you're raking leaves or flipping burgers, this comfy layer blocks the bite of the crisp autumn air. Puffy thick from hood to hem, it traps heat against your core.</p>n<p>&bull; Cream crewneck sweatshirt with navy sleeves/trim.<br />&bull; Relaxed fit. <br />&bull; Ribbed cuffs and hem. <br />&bull; Machine wash/dry.</p>"
]
],
"search_criteria":
"filter_groups": [
"filters": [
"field": "type_id",
"value": "configurable",
"condition_type": "eq"
]
],
"page_size": 5,
"current_page": 1
,
"total_count": 147



for more attribute change type_id with the atteibute code and value of the attribute for example:
searchCriteria[filterGroups][0][filters][0][field] color



searchCriteria[filterGroups][0][filters][0][value] red



searchCriteria[filterGroups][0][filters][0][conditionType] eq






share|improve this answer























  • How to display a real price without 0 ?

    – Jsparo30
    Aug 20 '17 at 5:56













0












0








0







Here is the REST API call to filter only configurable product:



 http://magento2api.com/rest/V1/products?searchCriteria[pageSize]=5&searchCriteria[currentPage]=1&searchCriteria[filterGroups][0][filters][0][field]=type_id&searchCriteria[filterGroups][0][filters][0][value]=configurable&searchCriteria[filterGroups][0][filters][0][conditionType]=eq


postman screen image:



enter image description here



Result:



 
"items": [
"id": 67,
"sku": "MH01",
"name": "Chaz Kangeroo Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:52",
"updated_at": "2016-09-26 06:45:52",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.</p>n<p>&bull; Two-tone gray heather hoodie.<br />&bull; Drawstring-adjustable hood. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 83,
"sku": "MH02",
"name": "Teton Pullover Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>This Teton Pullover Hoodie gives you more than laid-back style. It's equipped with moisture-wicking fabric to keep light and dry inside, especially in chilly-weather workouts. An elasticized hem lets you move about freely.</p>n<p>&bull; Black pullover hoodie.<br />&bull; Soft, brushed interior. <br />&bull; Front hand pockets. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 99,
"sku": "MH03",
"name": "Bruno Compete Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Stay comfortable and stay in the race no matter what the weather's up to. The Bruno Compete Hoodie's water-repellent exterior shields you from the elements, while advanced fabric technology inside wicks moisture to keep you dry.</p>n<p>&bull; Full zip black hoodie pullover. <br />&bull; Adjustable drawstring hood. <br />&bull; Ribbed cuffs/waistband. <br />&bull; Kangaroo pocket. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 115,
"sku": "MH04",
"name": "Frankie Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>The Frankie Sweatshirt is your best friend at long afternoon stadium stints or winter trailside campsites. The soft fleece fabric keeps you toasty as moisture-wicking technology kicks in when the sun comes out.</p>n<p>&bull; Light green crewneck sweatshirt.<br />&bull; Hand pockets.<br />&bull; Relaxed fit.<br />&bull; Machine wash/dry.</p>"
]
,
"id": 131,
"sku": "MH05",
"name": "Hollister Backyard Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Kick off your weekend in the Hollister Backyard Sweatshirt. Whether you're raking leaves or flipping burgers, this comfy layer blocks the bite of the crisp autumn air. Puffy thick from hood to hem, it traps heat against your core.</p>n<p>&bull; Cream crewneck sweatshirt with navy sleeves/trim.<br />&bull; Relaxed fit. <br />&bull; Ribbed cuffs and hem. <br />&bull; Machine wash/dry.</p>"
]
],
"search_criteria":
"filter_groups": [
"filters": [
"field": "type_id",
"value": "configurable",
"condition_type": "eq"
]
],
"page_size": 5,
"current_page": 1
,
"total_count": 147



for more attribute change type_id with the atteibute code and value of the attribute for example:
searchCriteria[filterGroups][0][filters][0][field] color



searchCriteria[filterGroups][0][filters][0][value] red



searchCriteria[filterGroups][0][filters][0][conditionType] eq






share|improve this answer













Here is the REST API call to filter only configurable product:



 http://magento2api.com/rest/V1/products?searchCriteria[pageSize]=5&searchCriteria[currentPage]=1&searchCriteria[filterGroups][0][filters][0][field]=type_id&searchCriteria[filterGroups][0][filters][0][value]=configurable&searchCriteria[filterGroups][0][filters][0][conditionType]=eq


postman screen image:



enter image description here



Result:



 
"items": [
"id": 67,
"sku": "MH01",
"name": "Chaz Kangeroo Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:52",
"updated_at": "2016-09-26 06:45:52",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.</p>n<p>&bull; Two-tone gray heather hoodie.<br />&bull; Drawstring-adjustable hood. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 83,
"sku": "MH02",
"name": "Teton Pullover Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>This Teton Pullover Hoodie gives you more than laid-back style. It's equipped with moisture-wicking fabric to keep light and dry inside, especially in chilly-weather workouts. An elasticized hem lets you move about freely.</p>n<p>&bull; Black pullover hoodie.<br />&bull; Soft, brushed interior. <br />&bull; Front hand pockets. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 99,
"sku": "MH03",
"name": "Bruno Compete Hoodie",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Stay comfortable and stay in the race no matter what the weather's up to. The Bruno Compete Hoodie's water-repellent exterior shields you from the elements, while advanced fabric technology inside wicks moisture to keep you dry.</p>n<p>&bull; Full zip black hoodie pullover. <br />&bull; Adjustable drawstring hood. <br />&bull; Ribbed cuffs/waistband. <br />&bull; Kangaroo pocket. <br />&bull; Machine wash/dry.</p>"
]
,
"id": 115,
"sku": "MH04",
"name": "Frankie Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>The Frankie Sweatshirt is your best friend at long afternoon stadium stints or winter trailside campsites. The soft fleece fabric keeps you toasty as moisture-wicking technology kicks in when the sun comes out.</p>n<p>&bull; Light green crewneck sweatshirt.<br />&bull; Hand pockets.<br />&bull; Relaxed fit.<br />&bull; Machine wash/dry.</p>"
]
,
"id": 131,
"sku": "MH05",
"name": "Hollister Backyard Sweatshirt",
"attribute_set_id": 9,
"price": 0,
"status": 1,
"visibility": 4,
"type_id": "configurable",
"created_at": "2016-09-26 06:45:53",
"updated_at": "2016-09-26 06:45:53",
"extension_attributes": [],
"product_links": [],
"tier_prices": [],
"custom_attributes": [
"attribute_code": "description",
"value": "<p>Kick off your weekend in the Hollister Backyard Sweatshirt. Whether you're raking leaves or flipping burgers, this comfy layer blocks the bite of the crisp autumn air. Puffy thick from hood to hem, it traps heat against your core.</p>n<p>&bull; Cream crewneck sweatshirt with navy sleeves/trim.<br />&bull; Relaxed fit. <br />&bull; Ribbed cuffs and hem. <br />&bull; Machine wash/dry.</p>"
]
],
"search_criteria":
"filter_groups": [
"filters": [
"field": "type_id",
"value": "configurable",
"condition_type": "eq"
]
],
"page_size": 5,
"current_page": 1
,
"total_count": 147



for more attribute change type_id with the atteibute code and value of the attribute for example:
searchCriteria[filterGroups][0][filters][0][field] color



searchCriteria[filterGroups][0][filters][0][value] red



searchCriteria[filterGroups][0][filters][0][conditionType] eq







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 8 '16 at 10:04









ManishManish

2,02931840




2,02931840












  • How to display a real price without 0 ?

    – Jsparo30
    Aug 20 '17 at 5:56

















  • How to display a real price without 0 ?

    – Jsparo30
    Aug 20 '17 at 5:56
















How to display a real price without 0 ?

– Jsparo30
Aug 20 '17 at 5:56





How to display a real price without 0 ?

– Jsparo30
Aug 20 '17 at 5:56













0














I know it's an old question, but I hope someone would find it useful.



You need to use another endpoint to get the configurable product price.



/rest/V1/configurable-products/:sku/children


Each product children might be having their own price.



So you need to find a lower price or any reasonable way from the children to display the configurable product price in a category list. Also in default product detail display.



Because each product children might be having different price. You need to get the correct price based on the selected configurable product options.



You can see all the options below the "extension_attributes" -> "configurable_product_options" property or using below endpoint :



/rest/V1/configurable-products/:sku/options/all


To display the options correct values, you need to get all available product attributes using below endpoint :



/rest/V1/products/attributes?searchCriteria[filterGroups][0][filters][0][field]=is_visible&searchCriteria[filterGroups][0][filters][0][value]=1&searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[filterGroups][1][filters][0][field]=is_user_defined&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq



Check & modify the query param for your best result. Also by the time I answer this question, you cannot test this endpoint using plain Postman request, you need to pass the Authorization header.




Then display the options based on the "configurable_product_options" property.






share|improve this answer























  • I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

    – Jsparo30
    Aug 20 '17 at 6:00











  • I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

    – sule
    Aug 20 '17 at 10:09











  • Does any Magento 2 interface or api not leak profusely?

    – J. M. Becker
    Dec 16 '18 at 19:13















0














I know it's an old question, but I hope someone would find it useful.



You need to use another endpoint to get the configurable product price.



/rest/V1/configurable-products/:sku/children


Each product children might be having their own price.



So you need to find a lower price or any reasonable way from the children to display the configurable product price in a category list. Also in default product detail display.



Because each product children might be having different price. You need to get the correct price based on the selected configurable product options.



You can see all the options below the "extension_attributes" -> "configurable_product_options" property or using below endpoint :



/rest/V1/configurable-products/:sku/options/all


To display the options correct values, you need to get all available product attributes using below endpoint :



/rest/V1/products/attributes?searchCriteria[filterGroups][0][filters][0][field]=is_visible&searchCriteria[filterGroups][0][filters][0][value]=1&searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[filterGroups][1][filters][0][field]=is_user_defined&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq



Check & modify the query param for your best result. Also by the time I answer this question, you cannot test this endpoint using plain Postman request, you need to pass the Authorization header.




Then display the options based on the "configurable_product_options" property.






share|improve this answer























  • I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

    – Jsparo30
    Aug 20 '17 at 6:00











  • I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

    – sule
    Aug 20 '17 at 10:09











  • Does any Magento 2 interface or api not leak profusely?

    – J. M. Becker
    Dec 16 '18 at 19:13













0












0








0







I know it's an old question, but I hope someone would find it useful.



You need to use another endpoint to get the configurable product price.



/rest/V1/configurable-products/:sku/children


Each product children might be having their own price.



So you need to find a lower price or any reasonable way from the children to display the configurable product price in a category list. Also in default product detail display.



Because each product children might be having different price. You need to get the correct price based on the selected configurable product options.



You can see all the options below the "extension_attributes" -> "configurable_product_options" property or using below endpoint :



/rest/V1/configurable-products/:sku/options/all


To display the options correct values, you need to get all available product attributes using below endpoint :



/rest/V1/products/attributes?searchCriteria[filterGroups][0][filters][0][field]=is_visible&searchCriteria[filterGroups][0][filters][0][value]=1&searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[filterGroups][1][filters][0][field]=is_user_defined&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq



Check & modify the query param for your best result. Also by the time I answer this question, you cannot test this endpoint using plain Postman request, you need to pass the Authorization header.




Then display the options based on the "configurable_product_options" property.






share|improve this answer













I know it's an old question, but I hope someone would find it useful.



You need to use another endpoint to get the configurable product price.



/rest/V1/configurable-products/:sku/children


Each product children might be having their own price.



So you need to find a lower price or any reasonable way from the children to display the configurable product price in a category list. Also in default product detail display.



Because each product children might be having different price. You need to get the correct price based on the selected configurable product options.



You can see all the options below the "extension_attributes" -> "configurable_product_options" property or using below endpoint :



/rest/V1/configurable-products/:sku/options/all


To display the options correct values, you need to get all available product attributes using below endpoint :



/rest/V1/products/attributes?searchCriteria[filterGroups][0][filters][0][field]=is_visible&searchCriteria[filterGroups][0][filters][0][value]=1&searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[filterGroups][1][filters][0][field]=is_user_defined&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq



Check & modify the query param for your best result. Also by the time I answer this question, you cannot test this endpoint using plain Postman request, you need to pass the Authorization header.




Then display the options based on the "configurable_product_options" property.







share|improve this answer












share|improve this answer



share|improve this answer










answered May 8 '17 at 7:59









sulesule

1




1












  • I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

    – Jsparo30
    Aug 20 '17 at 6:00











  • I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

    – sule
    Aug 20 '17 at 10:09











  • Does any Magento 2 interface or api not leak profusely?

    – J. M. Becker
    Dec 16 '18 at 19:13

















  • I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

    – Jsparo30
    Aug 20 '17 at 6:00











  • I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

    – sule
    Aug 20 '17 at 10:09











  • Does any Magento 2 interface or api not leak profusely?

    – J. M. Becker
    Dec 16 '18 at 19:13
















I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

– Jsparo30
Aug 20 '17 at 6:00





I have a problem which I return configurable products in many APIs, So I can't loop on each API to make it custom. Can you check this question magento.stackexchange.com/questions/189724/…

– Jsparo30
Aug 20 '17 at 6:00













I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

– sule
Aug 20 '17 at 10:09





I'm also did that for now, because I'm not yet having time to find out where to override the output of this endpoint. But you can start checking the magento/module-catalog/etc/webapi.xml and repositories used there.

– sule
Aug 20 '17 at 10:09













Does any Magento 2 interface or api not leak profusely?

– J. M. Becker
Dec 16 '18 at 19:13





Does any Magento 2 interface or api not leak profusely?

– J. M. Becker
Dec 16 '18 at 19:13

















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f148310%2fmagento-rest-api-configurable-product-and-category-list%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Jet Time Laivasto | Lähteet | Aiheesta muualla | NavigointivalikkoJet Time - The CompanyThe CompanyManagementJet Time aloittaa lauantaina Suomi-rekisterissä olevalla Boeing 737 -koneellaJettime Finland Fleet Details and HistoryJettime Fleet Details and HistoryRegional Jet OÜ takes over ATR production for SASJet Time Returns To Its Core BusinessYhtiön kotisivutlaajentamalla

Olympian arkeologinen museo Sisällysluettelo Historia ja rakennus | Kokoelmat | Lähteet | Aiheesta muualla | Navigointivalikko37°38′36″N, 21°37′46″EInfobox OKArchaeological Museum of Olympia: HistoryArchaeological Museum of Olympia: DescriptionΜουσείο Ιστορίας των Ολυμπιακών Αγώνων της Αρχαιότητας: ΙστορικόArchaeological Museum of Olympia

Äpy Sisällysluettelo Äpyt kautta historian | Esimerkkejä Äpy-huumorista | Katso myös | Kirjallisuutta | Aiheesta muualla | Navigointivalikkowww.äpy.fi