---
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' | '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' | '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

---

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