> For the complete documentation index, see [llms.txt](https://devs.snowdropsolutions.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.snowdropsolutions.co.uk/advanced-use-cases/aggregation.md).

# Aggregation

When querying brand data, the API response includes both the specific **brand** and its corresponding **aggregateLevel**, which represents the highest-level parent brand. The goal for this is to make it easier to aggregate spending in situations where a large brand operates one or more sub-brands.

The new '**aggregateLevel**' field allows you to merge transactions from 'parent brands' and 'sub-brands'. For example, with this new feature, you can seamlessly compile all transactions from sub-brands like 'Carrefour Express' and 'Carrefour Market' along with the main brand 'Carrefour' for your users.

<figure><img src="/files/5IEYv5nlICHXvNbrcsoQ" alt=""><figcaption></figcaption></figure>

**Response Object:**

<figure><img src="/files/wAlHNlIsrogLjA655eTT" alt=""><figcaption></figcaption></figure>

**How to Use**

* Use the `brand` object for specific sub-brand data.
* Use the `aggregateLevel` object to group or associate the sub-brand with its parent brand entity.
* This is useful for reporting, filtering, or visual grouping under a single master brand in your application.
* In the cases where the brand doesn’t belong to any parent brand, the same brand itself will be returned as the aggregate brand.
* If you wish to consolidate transactions at the sub-brand level without including the main brand, avoid using the `aggregateLevel` attribute. For instance, if you want transactions at Carrefour Express to appear under Carrefour Express instead of the overarching brand Carrefour, do not apply this attribute.&#x20;
