Question

How to manage Banner module for Web and Mobile Application as per service contact standards and REST API ?

  • Should i make different modules for mobile and web ?
  • Or it can be manageable by common ?
Was it helpful?

Solution

As I know Magento isn't contained REST API for banners. So I see two ways

1) you can create your custom Magento extension, where you will be adding banners data and provide your API endpoints to get this data via REST.

2) you can store banner data inside cms block and fetch with default REST API like

/V1/cmsBlock/:blockId

For web part usually used Cms Block where you can place banners with simple html/css/javascript.

OTHER TIPS

It returns image ULR that can only be used on a PHTML file. We can't use that in mobile app. What's the point of giving such image src in rest api. See the content filed returned from the REST API rest/V1/cmsBlock/:{blockId}

"content": "<p><img src=\"{{media url=&quot;banner1.jpg&quot;}}\" alt=\"\"></p>"
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top