Introducing: Variations Mapping in API
One of our key focuses is to ensure that the APIs customers use are always fast and efficient. To that end, we have introduced a parameter that will allow users of the search, browse and autocomplete APIs to specify which attributes are included in the variations response, enabling you to reduce the size of the payload and shave valuable milliseconds off your page load times. For users with slower connections (e.g. a cell phone with just one bar) that can mean results hundreds of milliseconds faster, the difference between now and an eternity in the world of ecommerce.
Want to display a price range on your products on your product listing page? No problem, you can add the variations_map parameter to your browse API request with the following JSON to only show an aggregated price range for all variation groups under each item (this example has a price field within the data object; your structure may be different):
Now instead of the entire variation object structure, you will receive the following in the response for each item:
There are many ways to customise these calls to get just what you need. Documentation for this new parameter can be found here.
For more information, please connect with your Customer Success Manager or contact us through support@constructor.io.