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

NameDescription
groupbyThe attribute that products will be grouped by.

Grouping Attribute specifications

- It must be an indexed, single-valued text attribute.
- It cannot be a numeric attribute.
- It cannot be a SKU attribute.
- You can only use 1 attribute on the groupby field.
- Reserved attributes such as pid, brand, etc. cannot be used for grouping. Please reach out to your Technical Services representative for alternatives.
group_limitThe number of products to be returned in each group.

Default value is 1 (returns 1 product per group).
startThe starting point for groups.
rowsThe number of groups to be returned.
group_offsetThis allows you to set the pagination within groups. The default value of group_offset is 0

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": {}
}