Tell me more ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

Here's one for the gurus here.

By default, Magento's WSDL provides a single endpoint (mainstore.com). The issue is, for multisite installs, there's no way to provide localized info (different prices, info etc.). How can one configure Magento to provide an endpoint per site (secondstore.com/api/soap) if the wsdl was requested from it (secondstore.com/api/soap/wsdl=1)?

share|improve this question

1 Answer

up vote 1 down vote accepted

The API does, as you say, have a single endpoint. However, it will actually serve up the localized information on a per-store basis. The key here is sending the store ID and/or code you wish to get the information for along with the API requests. If you don't send it, the API will serve the global information.

The catalog_product.info call, for example, accepts a storeView argument. Try setting this and see what you get.

Additional information on this specific example can be found here.

share|improve this answer
+1 -- so in every custom api response i will need to add the storeView param? – boruch Apr 30 at 17:04
Correct. If you are building your own API calls, then you'll want to add the storeView param to it to allow the client to specify which store they want the data for. You can then (in most cases) simply set that on the models and collections you're loading up in your API logic. – davidalger Apr 30 at 20:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.