Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Magento rest API with multi store view

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?

like image 241
salgua Avatar asked Nov 13 '22 04:11

salgua


1 Answers

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.

like image 177
pavan kumar Avatar answered Nov 14 '22 22:11

pavan kumar