Magento 2 REST API – How to Get Store ID

magento2rest api

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.

Best 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>
Related Topic