---
title: "Get Consent Request Aggregations"
method: GET
path: "/api/agreement/v1/consent-request-aggregations"
tags: ["Consent Request Aggregations"]
---

# Get Consent Request Aggregations

`GET /api/agreement/v1/consent-request-aggregations`

Retrieves summary aggregated consent requests for the current data producer, grouped by data request.

## Query parameters

- `dataProducerUid` string, required

## Response `200`

OK

- ConsentRequestAggregationSummaryDto[]
  - `id` string, uuid, required
  - `stateCode` 'GRANTED' | 'OPENED' | 'DECLINED' | 'LEGALLY_PERMITTED' | 'PARTIALLY_GRANTED' | 'PARTIALLY_OPENED'
  - `requestDate` string, date
  - `showStateAsMigrated` boolean — Indicates whether the aggregated state originates from migrated consent requests
  - `lastStateChangeDate` string, date-time
  - `dataRequest` DataRequestSummaryDto — Reduced data transfer object representing a data request
    - `id` string, uuid, required
    - `dataConsumerDisplayName` string — Shorter name of the data consumer defined by the data consumer used when displaying the request to the producer
    - `dataConsumerLogoBase64` string — Base64-encoded logo of the data consumer
    - `dataConsumerCity` string — City of the data consumer
    - `title` DataRequestTitleDto
      - `de` string
      - `fr` string
      - `it` string
  - `consentRequests` ConsentRequestStateDto[] — List of consent requests included in this aggregation
    - `id` string, uuid, required
    - `stateCode` 'GRANTED' | 'OPENED' | 'DECLINED' | 'LEGALLY_PERMITTED' | 'NOT_CREATED' — Possible states of a consent request: - GRANTED: Consent has been granted - OPENED: Consent request is open and awaiting response - DECLINED: Consent has been declined - NOT_CREATED: Placeholder to indicate that no consent request exists yet for a given UID.

## Other responses

- `401` — Not Authorized
- `403` — Not Allowed
- `404` — The resource or element was not found
- `500` — Internal server error: unexpected error

## Changes

- **2026-08-31** `5760204210ed` — 2 warning
  - added the new `LEGALLY_PERMITTED` enum value to the `items/consentRequests/items/stateCode` response property for the response status `200`
  - added the new `LEGALLY_PERMITTED` enum value to the `items/stateCode` response property for the response status `200`
- **2026-08-13** `a0609096db65` — 4 breaking, 27 warning
  - the `items/dataRequest/dataConsumerCity` response property's maxLength was unset from `120` for the response status `200`
  - the `items/dataRequest/dataConsumerDisplayName` response property's maxLength was unset from `255` for the response status `200`
  - removed the required property `items/dataRequest/advantages` from the response with the `200` status
  - removed the required property `items/dataRequest/stateCode` from the response with the `200` status
  - …27 more
- **2026-08-11** `52c1637abca0` — 1 info
  - added the optional property `items/consentRequests/items/dataProducerBur` to the response with the `200` status
- **2026-06-19** `a3a589189892` — 2 info
  - added the required property `items/consentRequests/items/dataRequest/advantages` to the response with the `200` status
  - added the required property `items/dataRequest/advantages` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/agridata/apis/agridata-ch-api/changes/api/agreement/v1/consent-request-aggregations/get.md)

---

[API](https://skmtc.dev/agridata/apis/agridata-ch-api.md) · [All operations](https://skmtc.dev/agridata/apis/agridata-ch-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agridata/agridata-ch-api/revisions/cb85ba8b5d77/schema)
