1

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 ?

2 Answers 2

1

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.

2
  • But how to manage for both ? web and API ? will there any size regarding issue ? Aug 7, 2018 at 12:41
  • For web part usually used Cms Block where you can place banners with simple html/css/javascript. (Added this to the answer) Aug 7, 2018 at 12:51
0

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>"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.