How to create dynamic urls without actually having sub-categories ? By using only root categories, without sub categories and use search refinements to get desired results page. We can use dw.web.URLUtils class to create links from code. Use $url$ content link function to create links from content. Use Search-Show as controller route, add prefnX and prefvX parameters to apply the needed refinements where X is a number starting from 1
Is there anyway to change the response structure coming from OCAPI? There are hooks for certain OCAPI endpoints that you can use to modify the output.If need something more specific and it goes with use case ... create a custom controller to get what you need in a certain format.