---
title: "Get Consent Requests Of Data Request And Uid"
method: GET
path: "/api/agreement/v1/data-requests/{id}/uids/{uid}/consent-requests"
tags: ["Data Requests"]
---

# Get Consent Requests Of Data Request And Uid

`GET /api/agreement/v1/data-requests/{id}/uids/{uid}/consent-requests`

## Request

- The document declares no server URL.
- Auth: OpenID Connect (`http://localhost:6999/realms/agate/.well-known/openid-configuration`, scopes: `agridata.ch.Agridata_Datenbezueger`)

Retrieves the UID- and BUR-based consent requests of a specific data request for a single producer UID. Accessible to the consumer who owns the data request.

## Path parameters

- `id` string, uuid, required
- `uid` string, required

## Response `200`

OK

- ConsentRequestFundamentalViewDto[]
  - `id` string, uuid, required
  - `dataRequestId` string, uuid, required
  - `dataProducerUid` string: UID of the data producer
  - `dataProducerBur` string: BUR of the data producer
  - `grantedDataPeriodFrom` string, date
  - `grantedDataPeriodTo` string, date
  - `stateCode` 'GRANTED' | 'OPENED' | 'DECLINED' | 'LEGALLY_PERMITTED' | 'NOT_CREATED' | 'WITHDRAWN': 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.
  - `lastModifiedDateTime` string, datetime: Date and time of the most recent modification to the consent request

## Other responses

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

## Changes

- **2026-10-19** `75957f6bdc66`: 4 warning
  - added the new `EXPORT_CAPACITY_EXHAUSTED` enum value to the `type` response property for the response status `404`
  - added the new `EXPORT_CAPACITY_EXHAUSTED` enum value to the `type` response property for the response status `500`
  - added the new `EXPORT_LIMIT_EXCEEDED` enum value to the `type` response property for the response status `404`
  - added the new `EXPORT_LIMIT_EXCEEDED` enum value to the `type` response property for the response status `500`
- **2026-10-01** `ae5c7d8cdb15`: 1 warning
  - added the new `WITHDRAWN` enum value to the `items/stateCode` response property for the response status `200`
- **2026-09-24** `1aa7b6ad5bcc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agridata/apis/agridata-ch-api/changes/api/agreement/v1/data-requests/:id/uids/:uid/consent-requests/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.dev/agridata/apis/agridata-ch-api/revisions/48ab7e1541c3?raw)
