Magento2 REST API – Create Multi-Language APIs

languagemagento2restrest api

I have multi-language store in Magento v 2.2.5

English
enter image description here

French
enter image description here

Now,I have created multiple REST API's, like

  • Custom Home Page REST API's
  • GET Products, Categories
  • Add to cart
  • Checkout
  • Place an Order (In short whole front-store)

Now I want these API's in multi-language, Any one have achieved the same with Magento 2 or with custom code.

  • Only Guidance will be helpful.

Best Answer

You have to add the store code before the /V1/

For example, let say you have two store views (store_en/store_de), if you call this api /store_en/V1/products, then you will retrive all products for the store_en store view, so you only need to put the store code before the /V1/

Related Topic