cancel
Showing results for 
Search instead for 
Did you mean: 

How to build mobile app homepage with default API ?

How to build mobile app homepage with default API ?

We are working to build our Mobile app with M2 and we found the default APIs from Magento 2.2 very useful and we did not need to build any custom APIs until now. 

 

Now we are working on the mobile app homepage, its has different sections such as: (Top Banner, Best Seller, Featured products, New products, top categories, etc) see our app homepage

 

We would like to control all these homepage sections manually.

What is the best way to manage and setup the homepage with APIs? 

 

We looked at CMS Blocks which in my opinion is perfect for this task especially that there is complete endpoints for Blocks BUT the only problem with blocks when we call the API endpoint it returns HTML content which is not predictable and it changes if the theme of our store change. 

 

So Now I am looking at creating a new root category name is "Mobile" and create different sub-categories such as Top sellers, Trending, New etc. 

 

Is there a better best practice way to do this without getting into building custom APIs? 

 

Also even if I would build custom APIs what if I wanted to change the position of the sections or disable a section to not appear on my app homepage. 

 

Appreciate any thoughts or previous experiences  

 

2 REPLIES 2

Re: How to build mobile app homepage with default API ?

@ibrahimmmYou may not be able to use default API's for everything. You would have to come up with some custom API as per the requirement of your home page.

 

Rest all is depend on how much time and money you want to spend on your app. More control you need more updates need to be made at Magento as well as in app.

 

My 2 cents would be to have configuration for all those settings in the Magento and handle them in the App. So in future if you want to hide or change the position then it can be controlled within the Magento and as soon as cache refreshes in the app will have updated design.

 

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: How to build mobile app homepage with default API ?

Hello @ibrahimmm,

 

your idea is good to work with default API to build a mobile app but not every time. when you want to develop an extra feature or put any theme in a mobile app or set up the design by every unique customer default API some point not working.

 

That time you should try custom  API you have no problem with change the position of the section.  I would suggest one which I have already used the Magento mobile app. It comes with well-thought predefined sections for the homepage. Seamlessly build a native mobile app with customer-centric features like a simple checkout process, easy password retrieval, product detailing, etc.