# Group Attribute Sets

The **Group Attribute Sets** feature allows users to organize the attributes of an attribute set into logical groups. This configuration enables the grouped display of attributes on the product detail page, improving readability and usability.

The configuration for attribute groups can be managed in **Omnitron**, under **Products and Catalogs > Group Attribute Sets**. Once configured, this data can be retrieved via API to implement grouped attribute display on brand applications (e.g., web or mobile interfaces).

## <mark style="color:red;">Steps for Configuration</mark>

To configure **Group Attribute Sets**, an attribute set must first be created. For detailed instructions, refer to the [Attributes & Attribute Sets](https://app.gitbook.com/s/IbwGN7KwvYi0iLbjtnXz/omnitron/products-and-catalogs/how-to-create-product-attributes-and-attribute-sets-in-omnitron) tutorial on creating attribute sets.

Once the attribute set is created, it will be listed on the **Products and Catalogs > Group Attribute Sets** page, where grouping can be configured.

### Step 1: Creating Group Names

*   Navigate to **Products and Catalogs > Group Attribute Sets.**

    <figure><img src="https://2911598027-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlQinVPnOffBiOp126ldR%2Fuploads%2FlownBrLFui7UyuYjRi8n%2Fimage.png?alt=media&#x26;token=6dcd8d98-f05d-408d-9c18-e63a514bdc15" alt=""><figcaption></figcaption></figure>
*   Select the desired attribute set to configure from the list.

    <figure><img src="https://2911598027-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlQinVPnOffBiOp126ldR%2Fuploads%2FQjDoJDBCpaWOGnnK409c%2Fimage.png?alt=media&#x26;token=3dddad93-93d1-4ae4-8e49-891fa6f4f2b5" alt=""><figcaption></figcaption></figure>
*   In the right-hand column, enter the group names for the attributes, click **Save** to apply the changes.

    <figure><img src="https://2911598027-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlQinVPnOffBiOp126ldR%2Fuploads%2FgMY0iWsbrMeZzc4UACUI%2Fimage.png?alt=media&#x26;token=36fa3a5f-9979-41a7-9dd6-12c7c9bea119" alt=""><figcaption></figcaption></figure>

### Step 2. Adding Attributes to Groups

*   **Expand** the respective group name by clicking on it and then click the **“+”** button to **add** the attributes you want to include in that group.

    <figure><img src="https://2911598027-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlQinVPnOffBiOp126ldR%2Fuploads%2F5ZDD1EuGMxSHXUJNqPij%2Fimage.png?alt=media&#x26;token=c26dbbdd-756a-4c25-ab9d-b949dd0c0a23" alt=""><figcaption></figcaption></figure>
* To verify the changes, navigate to **Product Pool > + New Product**, select the configured **Attribute Set**, and observe the grouped attributes displayed under their respective group names.
*   Any attributes not assigned to a group will appear under **“Ungrouped Attributes”.**

    <figure><img src="https://2911598027-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlQinVPnOffBiOp126ldR%2Fuploads%2FiH4TO8w4M4GdBbmLuuks%2Fimage.png?alt=media&#x26;token=c3c42fd8-23a8-440c-b3c7-878f5ad03b7f" alt=""><figcaption></figcaption></figure>

## <mark style="color:red;">Fetching Attribute Config Groups</mark>

Once the attribute groups are configured, they can be fetched programmatically for integration into brand applications.

### `GET` Attribute Config Groups

This API retrieves the attribute configuration groups for a specific attribute set.

**Path**: `/attribute_set/{{Attribute_Set_pk}}/attribute_config_groups/`

#### **Example Request**

```python
import requests

url = "https://{commerce_url}/attribute_set/1/attribute_config_groups"

payload={}
headers = {
    'Accept': 'application/json',
    }

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```

#### **Example Response (200 OK)**

When the request is successful, the response will include a list of attribute configuration groups and their respective attributes.

<table><thead><tr><th width="214.17578125">Parameter</th><th width="99.65234375">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>attribute_config_groups</td><td>list</td><td>List of attribute config groups.</td></tr><tr><td>attributes</td><td>list</td><td>List of attributes in the current attribute config group.</td></tr><tr><td>group_name</td><td>string</td><td>The name of the attribute config group.</td></tr></tbody></table>

```json
{
   "attribute_config_groups":[
       {
            "attributes": [
                 "description",
		],
             "group_name": "Other Attributes Group"
       },
       {
            "attributes": [
                 "size",
                 "gender"
		],
             "group_name": "Variant Attributes Group"
       },
       {
            "attributes": [
                 "arm_lenght",
		],
             "group_name": "Ungrouped Attributes"
       }
   ]
}
```
