# 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="https://3426765591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3PkUQNFQ8zz26qyVygsV%2Fuploads%2FttP5WIIIMZiV3OTH62gg%2Faggregation.png?alt=media&#x26;token=69940628-1625-4c7b-985a-dc5a207fab7e" alt=""><figcaption></figcaption></figure>

**Response Object:**

<figure><img src="https://3426765591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3PkUQNFQ8zz26qyVygsV%2Fuploads%2FmZ3Z3AUE6eLjd7k4kL1i%2FScreenshot%20from%202025-07-08%2015-40-33.png?alt=media&#x26;token=1dd56aea-312d-4d73-b870-7b3ebf46f12b" 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;
