1
votes

I'm writing a middleware solution which should be able to take products from a specific source and add/update these to/in Magento.

Since there are products with different sizes/colors/etc I'll need to make use of Magento's configurable and simple products.

Adding the products does not expose a problem, linking a simple product to a configurable one however does.

Does anyone know how to accomplish this using the API?

I'm using C# and the v2 SOAP Magento API. Using custom PHP code or CSV imports is not a possibility.

Thanks in advance!

2

2 Answers

1
votes

This is not achivable via Standart API. You should write your own.

We had project where we wrote Configurable API and other Company Java warehouse connector. So you can try to directly access DB. Or try to find some module.

0
votes

In Magento you can extend their API, either directly in the php code, or via a magento extension(preferred approach, as it allows you to upgrade magento). Neither of these approaches requires hitting the database directly. Rather you are using the serverside php api (lots of examples on the magento site) and using the php object/entity model and methods to do that.

Specifically the call that you're looking for in the product API is called getAssociatedProducts() This call is NOT availble in the webservices API, but you can call it via an extension that you write and make it available in the through the webservice API that way.

Alternatively you can get ALL of the products with attributes and try to link the association between configurables/simples that way, but that approach will obviously be much slower than the extension route.