I have created multiple store views, pattern lang_country.

It is my understanding that the REST API url syntax is as follows <host>/rest/<store_code>/V1/<action> where <store_code> becomes all when targeting the default store view.

Now, if I create a customer from Magento frontend, while browsing a particular store view, I see the customer being created under that store view. If I create a customer using the REST API, although using <host>/rest/de_ch/V1/customers the customer is created under "Default Store View", exactly the same as using <host>/rest/all/V1/customers.

Furthermore, if I enable Add Store Code to Urls, the swagger view shows [ Base URL: <host>/<store_code>/rest/all, which seems like repeating store_code twice.

I am very confused about all this. Can someone please shed some light on

  1. the effect of enabling Add Store Code to Urls to REST endpoints
  2. how to use the REST syntax to target api actions to specific store views

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.