0

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)?

1 Answer 1

2

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.

1
  • 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, 2013 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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