How can i get store_id in Magento2 REST API and by passing store_id i want to show different store views in application using REST API.
-
Try the answer and let me know if you have any query.– Aditya ShahSep 26, 2018 at 6:16
-
yes i got, but i want separate stores views is there any api for that– Pratap PenmetsaSep 26, 2018 at 6:21
-
Yes it is, but what exactly you want to achieve, can you please elaborate ?– Aditya ShahSep 26, 2018 at 6:24
-
i have select city option in website if i select particular city or place i want that id as store id and whole app must change based on that id– Pratap PenmetsaSep 26, 2018 at 6:32
-
1can u elaborate please. which parameters should i pass in api– Pratap PenmetsaSep 26, 2018 at 6:44
1 Answer
storeStoreRepositoryV1
Group repository interface
http://magento.host/index.php/rest/V1/store/storeGroups
method : GET
Authorization : Bearer <admin token>
This will return website_id
, root_category_id
, default_store_id
, name
, code
Store repository interface
This will return store id, website id and also code, in-short all data of store repository.
http://magento.host/index.php/rest/V1/store/storeViews
method : GET
Authorization : Bearer <admin token>
As per discussion,
storeStoreConfigManagerV1
http://magento.host/index.php/rest/V1/store/storeConfigs
method : GET
Authorization : Bearer <token>
-
after getting store code we should pass store code in base.url/rest{store code}/V1/categories then we will get separate store Views Sep 26, 2018 at 7:35
-
I was looking for website ids list and now I have it. Thank you! Jun 4, 2019 at 15:21
-
-
1