Dynamic Grouping Parameters

The Dynamic Grouping feature uses several parameters.

Which APIs support Dynamic Grouping?

The following APIs support Dynamic Grouping:

  • Product Search API
  • Category API

Parameters

Name

Description

groupby

The attribute that products will be grouped by.

Any single-valued, indexed, non-numeric attribute can be used as a value, and you can only group by a single attribute.

group_limit

The number of products to be returned in each group.

Default value is 1 (returns 1 product per group).

start

The starting point for groups.

rows

The number of groups to be returned.

Sample request and response

GET https://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach provided account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8438674018839
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=dress
&request_type=search
&search_type=keyword
&q=dress
&fl=pid,title,brand,price,sale_price,thumb_image,url,description
&groupby=gender
&group_limit=3
&rows=10
&start=0
{
   "group_response": {
      "gender": {
         "matches": 4,
         "groups": [{
            "groupValue": "Mens",
            "doclist": {
               "numFound": 2,
               "start": 0,
               "docs": [
            {
               "pid": "1",
            },
            {
               "pid": "2",
            },
            ]
      }
   }
   {
      "groupValue": "Womens",
      "doclist": {
         "numFound": 2,
         "start": 0,
         "docs": [
         {
            "pid": "3",
         },
         {
            "pid": "4",
         }
         ]
      }
   }
   ]
   }
   },
   "facet_counts": {
      "facet_ranges": {},
      "facet_fields": {},
   },
   "category_map": {},
   "metadata": {}
}