Jump to content

Products in multishop via Webservice API


dianacitrus

Recommended Posts

After a bit of a struggle I've got 2 sub shops working under my main shop.

Now i want to get a list of products for each of those shops using the webservice API.

When i call the list of products for the main shop, with the api key registered with the main shop:

http://localhost/webshop/api/products/ 

i get a list of 8 products.

 

When i call the list of products for the main shop, with the api key registered with the sub shop:

http://localhost/webshop/subshop/api/products/

i still get a list of 8 products, whereas in my shop i only have one product.

 

The same url construction does work for the cms pages (with the corresponding API keys):

http://localhost/webshop/api/content_management_system

returns 5 pages

http://localhost/webshop/subshop/api/content_management_system

returns 6 pages, which is correct, because i added a page specifically for my sub shop.

 

 

Do i need to pass some additional parameters to filter the products call by sub shop?

Edited by dianacitrus (see edit history)
Link to comment
Share on other sites

I got what i needed by filtering the products call by default category id.

/products?filter[id_category_default]=1

 

But still i think it should be easier, and more robust, by just getting the products from the sub shop when i make an api call to the sub shop.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...