5
votes

I have a Magento website with 3 languages on 3 different store view. I need to retrieve product information through the rest API, accessing to this address:

http://-mysite-/api/rest/products

It works really fine, but I receive data only from the default store view. In my webapp I need to switch languages, and I need to access to the others store view. I read the documentation (http://www.magentocommerce.com/api/rest/introduction.html), but I cannot find anything about store view and multilingual sites... I tried passing language in the header or passing the store_id as "get variable"... nothing, it works only with the default store view. Any idea?

2

2 Answers

1
votes

You can try this. magentomysite/api/rest/products/store/storeid . For example you can use as magentomysite/api/rest/products/store/1 for english store products.

Remember one thing. In the admin panel you have to give permissions to guest user also. Then only you can get the data through this url.

I hope this helps u.

0
votes

To elaborate on Pavan's answer the following URL worked for me:

magentodomain.com/api/rest/products/:product_id/store/:store_id

You can find your store id with the following method explained in this answer:

How to find out what my store ID is?