Skip to main content

Magento 2 as a headless solution

I want to know if there are some best practices to use Magento 2 as a headless E-commerce solution.

A typical E-commerce in 2017 is to have an omni-channel solution which includes

  • E-commerce
  • CMS
  • Multiplatform
  • Tier system integration (ERP, ...)

I want to know how involve Magento 2 API with this kind of solution.


My approach:

  • Use a different frontend framework (such as angular) for desktop/mobile webapp and mobile app

  • Only use Magento 2 API in order to retrieve or interact with E-commerce data/action

  • Only use CMS API in order to retrieve CMS data.

Pro: Only API's, omnichannel

Cons: Limitation for performance/features/formatting


Some questions for this approach :

  • Who is responsible for formatting data, for example prices. Magento API and frontend framework?
  • Who is responsible for resizing product images and cache them? Because in the native Magento 2 API there is no resize or cache system.
  • Do I need to create new custom isolated API or extend native for future upgrade purpose?
  • Do you recommend to use an extra layer in order to combine CMS and Magento API?

I appreciate you to share your return in experience.

Moreover, I found this approach: http://fbrnc.net/blog/2015/10/super-scaling-magento

Franck Garnier
  • 2.9k
  • 1
  • 18
  • 35