Hi i’m using magento soap api v2 with c#. Do far I have been calling
var groupedProducts = magentoService.catalogProductLinkList(sessionId, "grouped", id, "productId");
that does return grouped Products, but instead I would like to retrieve simple products such as green large t-shirt which is associated with configurable t-shirt.
How can this be achieved?
Unfortunatelly that’s not possible with the magento SOAP api. You are not able to retrieve child products of a parent product via the api. Believe me, I have tackled this myself some time ago. I can suggest 2 fixes and 1 workaround.
Workaround – Try to retrieve child products by sku or name. This can work provided that all your child products use the parent’s name or sku as the prefix. That’s how I resolved it in the beginning and it worked well as long as the client did not introduce child product names that did not match the parent name. Here’s some sample code:
Fix #1 – Free – Write your own api extension. To retrieve child products you could use:
You then send the results to the api caller and all should be well. I have not tried that myself, though, so I’m not sure if there are any other problems on the way.
Fix #2 – Paid – Get the (excellent, but pricey) CoreAPI extension from netzkollektiv. That’s what I did when the workaround stopped working out for me and never regretted this decision.