# 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%2Fgit-blob-0cc5ede731bdf26ea2335cadd47b8bd0fc7a33a6%2Fimage.png?alt=media" 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%2Fgit-blob-6fb24053c77ea5a6e0e55b976782171baa269f5b%2Fimage.png?alt=media" 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%2Fgit-blob-f9a303740d3b5f057309717b4f68ad2f80aadfff%2Fimage.png?alt=media" 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%2Fgit-blob-a972439fa0480437de5999159dff93e35b5bc45c%2Fimage.png?alt=media" 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%2Fgit-blob-e2a3981cc7c191a7a45ca0f4f409603a3f905399%2Fimage.png?alt=media" 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"
       }
   ]
}
```
