# 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;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devs.snowdropsolutions.co.uk/advanced-use-cases/aggregation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
