cancel
Showing results for 
Search instead for 
Did you mean: 

Using store-code in API request is not working as expected

Using store-code in API request is not working as expected

Basically we have a client who's got Magento 2 is installed on client.com .
But they have many other domains/sites for example: 
client.de and another-client.fr etc..

Within their Magento 2 setup, installed on 
client.com , they have multiple stores set up for each domain/site.

In the magento docs it says to make an API request by doing: 

client.com/rest/<store code>/V1/orders?<filters> 

This works fine - and obviously if I pass an incorrect store code I get an error.


But what is odd is: when I do make a request using any 1 of the 4 different store codes theyt have setup from their Magento configuration, I get ALL stores data back in the response.

The response items array even has objects showing me they are from different stores because I can see the store_name and store_id.

Is this a bug in the API?
Or perhaps documentation not explaining fully what a store code is?
Or has there been a miss understanding for us and our client?

We do have this process setup for other clients and it works as expected. But I would say the
main difference is they have it setup so a Magento "store" is installed per domain.

 

Cheers for any feedback or pointers on this, as I'm very confused at the moment.

1 REPLY 1

Re: Using store-code in API request is not working as expected

Bump, as I believe this is a bug.