---
openapi: 3.1.0
components:
schemas:
BurDto:
type: object
description: Data transfer object representing a bur
properties:
bur:
type: string
farmTypeCode:
$ref: "#/components/schemas/FarmTypeEnum"
ConsentRequestAggregationProducerView:
type: object
required:
- id
description: Data transfer object representing an aggregation of consent requests
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier of the aggregation. Corresponds to the underlying
data request ID.
dataProducerUid:
type: string
examples:
- CHE123456789
description: UID of the data producer
stateCode:
$ref: "#/components/schemas/ConsentRequestAggregationStateEnum"
type: string
description: Aggregated state derived from the states of the underlying
consent requests
showStateAsMigrated:
type: boolean
examples:
- true
description: Indicates whether the aggregated state originates from migrated
consent requests
lastStateChangeDate:
$ref: "#/components/schemas/LocalDateTime"
type: string
examples:
- 2025-06-16T11:04:51.823889
description: Date and time when the state was changed last
requestDate:
$ref: "#/components/schemas/LocalDate"
type: string
examples:
- 2025-05-19
description: Date when the request was made
dataRequest:
type: object
required:
- id
- stateCode
description: Details of the underlying data request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afb7
description: Unique identifier of the data request
dataProviderId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- e37b148b-9a0f-4c2e-80c5-fe9c9416b640
description: Unique identifier of the data provider responsible for
this data request. This value is derived from the data source systems
of the associated data products.
dataSourceSystemId:
$ref: "#/components/schemas/UUID"
dataSourceSystem:
$ref: "#/components/schemas/DataSourceSystemDto"
humanFriendlyId:
type: string
examples:
- GL56
description: Human friendly id of the data request
submissionDate:
type: string
format: date
examples:
- 2025-06-16T11:04:51.823889
description: Date and time when the data request was submitted
title:
$ref: "#/components/schemas/DataRequestTitleDto"
type: object
description: Title of the data request
description:
$ref: "#/components/schemas/DataRequestDescriptionDto"
type: object
description: 'Description of the data request '
purpose:
$ref: "#/components/schemas/DataRequestPurposeDto"
type: object
description: Purpose of the data request
products:
type: array
items:
type: string
format: uuid
pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
description: List of data products requested
stateCode:
type:
- string
- object
enum:
- DRAFT
- IN_REVIEW
- TO_BE_SIGNED
- ACTIVE
description: State of the data request
dataConsumerLegalName:
type: string
examples:
- "Bio Suisse, Vereinigung Schweizer Biolandbau-Organisationen"
maxLength: 255
description: LegalName of the data consumer taken from the uid register
dataConsumerDisplayName:
type: string
examples:
- Bio Suisse
maxLength: 255
description: Shorter name of the data consumer defined by the data consumer
used when displaying the request to the producer
dataConsumerUid:
type: string
examples:
- CHE101708094
description: Uid of the data consumer
dataConsumerCity:
type: string
examples:
- Basel
maxLength: 120
description: City of the data consumer
dataConsumerZip:
type: string
examples:
- "4052"
maxLength: 10
description: Zip code of the data consumer
dataConsumerStreet:
type: string
examples:
- Peter Merian-Str. 34
maxLength: 255
description: Street of the data consumer
dataConsumerCountry:
type: string
examples:
- CH
maxLength: 2
description: 2 letter country code of the data consumer
contactPhoneNumber:
type: string
examples:
- +41 79 123 45 67
maxLength: 50
description: Contact phone number for the data request
contactEmailAddress:
type: string
examples:
- example@labelorganisation.ch
maxLength: 255
description: Contact email address for the data request
dataConsumerLogoBase64:
type: string
examples:
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
description: Base64-encoded logo of the data consumer
targetGroup:
type: string
maxLength: 150
validRedirectUriRegex:
type: string
examples:
- ^https:\/\/www\.dummy-label-organisation\/.*$
maxLength: 255
description: Regex of valid redirect_uri. Must compile as regex successfully.
currentContractRevisionId:
$ref: "#/components/schemas/UUID"
type: string
description: Id of current contract revision
consentRequests:
type: array
items:
$ref: "#/components/schemas/ConsentRequestProducerViewDto"
ConsentRequestAggregationStateEnum:
type: string
enum:
- GRANTED
- OPENED
- DECLINED
- PARTIALLY_GRANTED
- PARTIALLY_OPENED
ConsentRequestConsumerViewDto:
type: object
deprecated: true
required:
- id
description: Data transfer object representing a consent request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier of the consent request
dataProducerUid:
type: string
examples:
- CHE123456789
description: UID of the data producer
stateCode:
$ref: "#/components/schemas/ConsentRequestStateEnum"
ConsentRequestConsumerViewV2Dto:
type: object
required:
- id
description: Data transfer object representing a consent request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier of the consent request
dataProducerUid:
type: string
examples:
- CHE123456789
description: UID of the data producer
name:
type: string
examples:
- Testorganisation AG
description: Name of the uid
stateCode:
$ref: "#/components/schemas/ConsentRequestStateEnum"
ConsentRequestCreatedDto:
type: object
required:
- id
- dataProducerUid
description: Data transfer object representing a consent request that has been
created
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier of the consent request
dataProducerUid:
type: string
examples:
- CHE123456789
description: UID of the data producer
isCreated:
type: boolean
ConsentRequestFundamentalViewDto:
type: object
required:
- id
- dataRequestId
description: Data transfer object representing a consent request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier of the consent request
dataRequestId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afb7
description: Unique identifier of the corresponding data request
dataProducerUid:
type: string
examples:
- CHE123456789
description: UID of the data producer
dataProducerBur:
type: string
examples:
- A123456
description: BUR of the data producer
grantedDataPeriodFrom:
$ref: "#/components/schemas/LocalDate"
type: string
examples:
- 2024-06-16
description: Start of the data period that is granted by this consent
grantedDataPeriodTo:
$ref: "#/components/schemas/LocalDate"
type: string
examples:
- 2025-06-16
description: End of the data period that is granted by this consent
stateCode:
$ref: "#/components/schemas/ConsentRequestStateEnum"
type: string
examples:
- GRANTED
description: State of the consent request
ConsentRequestProducerViewDto:
type: object
required:
- id
description: Data transfer object representing a consent request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier of the consent request
dataProducerUid:
type: string
examples:
- CHE123456789
description: UID of the data producer
stateCode:
$ref: "#/components/schemas/ConsentRequestStateEnum"
showStateAsMigrated:
type: boolean
examples:
- true
description: If the state should be shown as migrated
lastStateChangeDate:
type: string
format: date
examples:
- 2025-06-16T11:04:51.823889
description: Date and time when the state was changed last
requestDate:
$ref: "#/components/schemas/LocalDate"
type: string
examples:
- 2025-05-19
description: Date when the request was made
dataRequest:
type: object
required:
- id
- stateCode
description: Details of the underlying data request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afb7
description: Unique identifier of the data request
dataProviderId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- e37b148b-9a0f-4c2e-80c5-fe9c9416b640
description: Unique identifier of the data provider responsible for
this data request. This value is derived from the data source systems
of the associated data products.
dataSourceSystemId:
$ref: "#/components/schemas/UUID"
dataSourceSystem:
$ref: "#/components/schemas/DataSourceSystemDto"
humanFriendlyId:
type: string
examples:
- GL56
description: Human friendly id of the data request
submissionDate:
type: string
format: date
examples:
- 2025-06-16T11:04:51.823889
description: Date and time when the data request was submitted
title:
$ref: "#/components/schemas/DataRequestTitleDto"
type: object
description: Title of the data request
description:
$ref: "#/components/schemas/DataRequestDescriptionDto"
type: object
description: 'Description of the data request '
purpose:
$ref: "#/components/schemas/DataRequestPurposeDto"
type: object
description: Purpose of the data request
products:
type: array
items:
type: string
format: uuid
pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
description: List of data products requested
stateCode:
type:
- string
- object
enum:
- DRAFT
- IN_REVIEW
- TO_BE_SIGNED
- ACTIVE
description: State of the data request
dataConsumerLegalName:
type: string
examples:
- "Bio Suisse, Vereinigung Schweizer Biolandbau-Organisationen"
maxLength: 255
description: LegalName of the data consumer taken from the uid register
dataConsumerDisplayName:
type: string
examples:
- Bio Suisse
maxLength: 255
description: Shorter name of the data consumer defined by the data consumer
used when displaying the request to the producer
dataConsumerUid:
type: string
examples:
- CHE101708094
description: Uid of the data consumer
dataConsumerCity:
type: string
examples:
- Basel
maxLength: 120
description: City of the data consumer
dataConsumerZip:
type: string
examples:
- "4052"
maxLength: 10
description: Zip code of the data consumer
dataConsumerStreet:
type: string
examples:
- Peter Merian-Str. 34
maxLength: 255
description: Street of the data consumer
dataConsumerCountry:
type: string
examples:
- CH
maxLength: 2
description: 2 letter country code of the data consumer
contactPhoneNumber:
type: string
examples:
- +41 79 123 45 67
maxLength: 50
description: Contact phone number for the data request
contactEmailAddress:
type: string
examples:
- example@labelorganisation.ch
maxLength: 255
description: Contact email address for the data request
dataConsumerLogoBase64:
type: string
examples:
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
description: Base64-encoded logo of the data consumer
targetGroup:
type: string
maxLength: 150
validRedirectUriRegex:
type: string
examples:
- ^https:\/\/www\.dummy-label-organisation\/.*$
maxLength: 255
description: Regex of valid redirect_uri. Must compile as regex successfully.
currentContractRevisionId:
$ref: "#/components/schemas/UUID"
type: string
description: Id of current contract revision
ConsentRequestStateEnum:
type: string
enum:
- GRANTED
- OPENED
- DECLINED
- NOT_CREATED
description: |
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.
ContractRevisionDto:
type: object
required:
- id
- dataRequestId
- dataConsumerName
- dataConsumerCity
- dataProviderName
- dataRequestContext
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 24945B85-6E53-4059-8FB4-C0B0AC4FFD47
description: Unique identifier of the data request
dataRequestId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 0D74F63F-9491-4B9B-80BA-0CA43A1A3A6F
description: Identifier of the associated data request
dataConsumerName:
type: string
examples:
- "Bio Suisse, Vereinigung Schweizer Biolandbau-Organisationen"
description: LegalName of the data consumer taken from the uid register
dataConsumerCity:
type: string
examples:
- Basel
description: City of the data consumer
dataProviderName:
type: string
examples:
- BLW
description: Name of the data provider
dataRequestContext:
$ref: "#/components/schemas/DataRequestContextDto"
type: object
description: "Contextual information from the parent data request (e.g.\
\ logo, reduced metadata)"
consumerSignatures:
type: array
items:
$ref: "#/components/schemas/ContractRevisionSignatureDto"
description: List of signatures of the data consumer
ContractRevisionSignatureDto:
type: object
required:
- signatureSlotCode
- userId
- name
- timestamp
properties:
signatureSlotCode:
$ref: "#/components/schemas/SignatureSlotCodeEnum"
type: string
examples:
- DATA_CONSUMER_01
description: Slot in which the signature is stored
userId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 43FAB890-492E-4EEB-9B65-F4A4FB3DD74E
description: ID of the user
name:
type: string
examples:
- John Doe
description: ID of the user of the signature
timestamp:
$ref: "#/components/schemas/LocalDateTime"
type: string
examples:
- 2026-03-19T12:00:00
description: Timestamp of when the signature was added
CreateConsentRequestDto:
type: object
required:
- dataRequestId
- uid
properties:
dataRequestId:
$ref: "#/components/schemas/UUID"
uid:
type: string
DataProductDto:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afb7
description: Unique identifier of the product
dataSourceSystemCode:
type: string
examples:
- AGIS
description: Code of data source system from which this product originates
dataSourceSystem:
$ref: "#/components/schemas/DataSourceSystemDto"
type: object
description: Data source system from which this product originates
name:
$ref: "#/components/schemas/TranslationDto"
type: object
examples:
- R01
description: How this product is categorized
description:
$ref: "#/components/schemas/TranslationDto"
type: object
description: Description of the product
deprecatedSince:
$ref: "#/components/schemas/LocalDateTime"
type: string
examples:
- 2026-03-06T00:00:00
description: Timestamp indicating when the product was marked as deprecated.
DataProviderDto:
type: object
required:
- id
properties:
id:
$ref: "#/components/schemas/UUID"
code:
type: string
name:
$ref: "#/components/schemas/TranslationDto"
DataRequestContextDto:
type: object
description: Data transfer object representing a minimal version of a data request
for UI/UX use.
properties:
dataConsumerLogoBase64:
type: string
examples:
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
description: Base64-encoded logo of the data consumer
DataRequestDescriptionDto:
type: object
properties:
de:
type: string
examples:
- "Ziel der Anfrage ist es, Informationen über Bodentypen und deren Qualitä\
t zu erhalten, um fundierte Entscheidungen zur Fruchtfolge, Düngung und\
\ nachhaltigen Bewirtschaftung treffen zu können."
description: Description of the data request
fr:
type: string
examples:
- "L'objectif de la demande est d'obtenir des informations sur les types\
\ de sols et leur qualité afin de prendre des décisions éclairées concernant\
\ la rotation des cultures, la fertilisation et la gestion durable."
description: Description de la demande de données
it:
type: string
examples:
- "L'obiettivo della richiesta è ottenere informazioni sui tipi di suolo\
\ e sulla loro qualità per prendere decisioni informate sulla rotazione\
\ delle colture, la fertilizzazione e la gestione sostenibile."
description: Descrizione della richiesta di dati
DataRequestDto:
type: object
required:
- id
- stateCode
description: Details of the underlying data request
properties:
id:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afb7
description: Unique identifier of the data request
dataProviderId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- e37b148b-9a0f-4c2e-80c5-fe9c9416b640
description: Unique identifier of the data provider responsible for this
data request. This value is derived from the data source systems of the
associated data products.
dataSourceSystemId:
$ref: "#/components/schemas/UUID"
dataSourceSystem:
$ref: "#/components/schemas/DataSourceSystemDto"
humanFriendlyId:
type: string
examples:
- GL56
description: Human friendly id of the data request
submissionDate:
type: string
format: date
examples:
- 2025-06-16T11:04:51.823889
description: Date and time when the data request was submitted
title:
$ref: "#/components/schemas/DataRequestTitleDto"
type: object
description: Title of the data request
description:
$ref: "#/components/schemas/DataRequestDescriptionDto"
type: object
description: 'Description of the data request '
purpose:
$ref: "#/components/schemas/DataRequestPurposeDto"
type: object
description: Purpose of the data request
products:
type: array
items:
type: string
format: uuid
pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
description: List of data products requested
stateCode:
type:
- string
- object
enum:
- DRAFT
- IN_REVIEW
- TO_BE_SIGNED
- ACTIVE
description: State of the data request
dataConsumerLegalName:
type: string
examples:
- "Bio Suisse, Vereinigung Schweizer Biolandbau-Organisationen"
maxLength: 255
description: LegalName of the data consumer taken from the uid register
dataConsumerDisplayName:
type: string
examples:
- Bio Suisse
maxLength: 255
description: Shorter name of the data consumer defined by the data consumer
used when displaying the request to the producer
dataConsumerUid:
type: string
examples:
- CHE101708094
description: Uid of the data consumer
dataConsumerCity:
type: string
examples:
- Basel
maxLength: 120
description: City of the data consumer
dataConsumerZip:
type: string
examples:
- "4052"
maxLength: 10
description: Zip code of the data consumer
dataConsumerStreet:
type: string
examples:
- Peter Merian-Str. 34
maxLength: 255
description: Street of the data consumer
dataConsumerCountry:
type: string
examples:
- CH
maxLength: 2
description: 2 letter country code of the data consumer
contactPhoneNumber:
type: string
examples:
- +41 79 123 45 67
maxLength: 50
description: Contact phone number for the data request
contactEmailAddress:
type: string
examples:
- example@labelorganisation.ch
maxLength: 255
description: Contact email address for the data request
dataConsumerLogoBase64:
type: string
examples:
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
description: Base64-encoded logo of the data consumer
targetGroup:
type: string
maxLength: 150
validRedirectUriRegex:
type: string
examples:
- ^https:\/\/www\.dummy-label-organisation\/.*$
maxLength: 255
description: Regex of valid redirect_uri. Must compile as regex successfully.
currentContractRevisionId:
$ref: "#/components/schemas/UUID"
type: string
description: Id of current contract revision
DataRequestPurposeDto:
type: object
properties:
de:
type: string
examples:
- Bewertung der Bodenqualität
fr:
type: string
examples:
- Évaluation de la qualité du sol
it:
type: string
examples:
- Valutazione della qualità del suolo
DataRequestStateEnum:
type: string
enum:
- DRAFT
- IN_REVIEW
- TO_BE_SIGNED
- ACTIVE
DataRequestTitleDto:
type: object
properties:
de:
type: string
examples:
- Anfrage zu Bodentypen und Bodenqualitätsdaten
fr:
type: string
examples:
- Demande sur les types de sols et les données de qualité du sol
it:
type: string
examples:
- Richiesta sui tipi di suolo e sui dati sulla qualità del suolo
DataRequestUpdateDto:
type: object
description: Data transfer object representing a data request
properties:
title:
$ref: "#/components/schemas/DataRequestTitleDto"
type: object
description: Title of the data request
description:
$ref: "#/components/schemas/DataRequestDescriptionDto"
type: object
description: 'Description of the data request '
purpose:
$ref: "#/components/schemas/DataRequestPurposeDto"
type: object
description: Purpose of the data request
dataConsumerDisplayName:
type: string
examples:
- Bio Suisse
description: Shorter name of the data consumer defined by the data consumer
used when displaying the request to the producer
dataConsumerCity:
type: string
examples:
- Basel
description: City of the data consumer
dataConsumerZip:
type: string
examples:
- "4052"
description: Zip code of the data consumer
dataConsumerStreet:
type: string
examples:
- Peter Merian-Str. 34
description: Street of the data consumer
dataConsumerCountry:
type: string
examples:
- CH
description: 2 letter country code of the data consumer
contactPhoneNumber:
type: string
examples:
- +41 79 123 45 67
maxLength: 50
description: Contact phone number for the data request
contactEmailAddress:
type: string
examples:
- example@labelorganisation.ch
maxLength: 255
description: Contact email address for the data request
targetGroup:
type: string
examples:
- von allen Bio Suisse Mitgliedern
description: Target group of the data request
products:
type: array
examples:
- - c661ea48-106d-4d7a-a5d1-a9a6db48dd8c
items:
type: string
format: uuid
pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
description: List of data products requested
DataRequestValidRedirectUriRegexUpdateDto:
type: object
properties:
validRedirectUriRegex:
type: string
examples:
- "^https:\\/\\/([A-Za-z0-9-]+\\.)*bio-suisse\\.ch(\\/.*)?$"
maxLength: 255
description: Regex used to validate redirect_uri values for this data request.
Must compile as regex successfully.
DataSourceSystemDto:
type: object
required:
- id
- dataProvider
properties:
id:
$ref: "#/components/schemas/UUID"
code:
type: string
name:
$ref: "#/components/schemas/TranslationDto"
dataProvider:
$ref: "#/components/schemas/DataProviderDto"
DataTransferResponse:
type: object
description: Response containing the requested product data and metadata about
the request.
properties:
data:
description: Contains the requested product data.
dataTransferRequestId:
type: string
description: Unique identifier for the data transfer request (uuid)
consentRequestId:
$ref: "#/components/schemas/UUID"
type: string
description: Identifier of the corresponding consent request
ExceptionDto:
type: object
required:
- requestId
properties:
message:
type: string
requestId:
type: string
type:
$ref: "#/components/schemas/ExceptionEnum"
debugMessage:
type: string
ExceptionDto1:
type: object
properties:
message:
type: string
requestId:
type: string
type:
$ref: "#/components/schemas/ExceptionEnum"
status:
type: integer
format: int32
debugMessage:
type: string
ExceptionEnum:
type: string
enum:
- GENERIC
- UID_MISSING
- EXTERNAL_SERVICE_ERROR
- CONSENT_NOT_GRANTED
- MAINTENANCE
FarmTypeEnum:
type: string
enum:
- GANZJAHRESBETRIEB
- PRODUKTIONSSTAETTE
- GEMEINSCHAFTSWEIDEBETRIEB
- SOEMMERUNGSBETRIEB
- BETRIEBSGEMEINSCHAFT
- VIEHHANDELSUNTERNEHMEN
- WANDERHERDE
- TIERKLINIK
- SCHLACHTBETRIEB
- VIEHMAERKTE_UND_VERANSTALTUNGEN
- BETRIEBSZWEIGGEMEINSCHAFT
- NICHTKOMMERZIELLE_TIERHALTUNG
- OELN_GEMEINSCHAFT
- VERGAERUNG_KOMPOSTIERUNG_NAEHRSTOFFPOOL
- TIERHALTUNG
- NICHT_ZUGETEILT
- UNKNOWN
LegalFormEnum:
type: string
enum:
- NATUERLICHE_PERSON
- EINFACHE_GESELLSCHAFT
- KOLLEKTIVGESELLSCHAFT
- KOMMANDITGESELLSCHAFT
- KOMMANDITAKTIENGESELLSCHAFT
- AKTIENGESELLSCHAFT
- GMBH
- GENOSSENSCHAFT
- VEREIN
- STIFTUNG
- OEFF_RECHT_KOERPERSCHAFT_VERWALTUNG
- LANDESKIRCHE
- BUND
- KANTON
- BEZIRK
- GEMEINDE
- OEFF_RECHT_KOERPERSCHAFT_BETRIEB
- EQUIDENEIGENTUEMER
- UNKNOWN
LocalDate:
type: string
format: date
examples:
- 2022-03-10
LocalDateTime:
type: string
format: date-time
examples:
- 2022-03-10T12:15:50
OtpChallengeDto:
type: object
properties:
challengeId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- F259F6C6-8C31-4809-AF3E-1C11379E9D32
description: Unique identifier of the challenge
expiresAt:
$ref: "#/components/schemas/LocalDateTime"
type: string
examples:
- 2026-03-19T12:00:00Z
description: Expiration time of the challenge
maskedPhoneNumber:
type: string
examples:
- '***********8'
description: Masked phone number
retryAfterSeconds:
type: integer
format: int64
examples:
- 30
description: Number of remaining attempts
PageResponseDto:
type: object
required:
- items
- totalItems
- totalPages
- currentPage
- pageSize
description: Generic paginated response wrapper.
properties:
items:
type: array
items: {}
description: List of items on the current page.
totalItems:
type: integer
format: int64
examples:
- 42
description: Total number of items across all pages.
totalPages:
type: integer
format: int32
examples:
- 5
description: Total number of pages available.
currentPage:
type: integer
format: int32
examples:
- 1
description: Current page number (0-based ).
pageSize:
type: integer
format: int32
examples:
- 10
description: Number of items per page.
PageResponseDtoConsentRequestFundamentalViewDto:
type: object
required:
- items
- totalItems
- totalPages
- currentPage
- pageSize
description: Generic paginated response wrapper.
properties:
items:
type: array
items:
$ref: "#/components/schemas/ConsentRequestFundamentalViewDto"
description: List of items on the current page.
totalItems:
type: integer
format: int64
examples:
- 42
description: Total number of items across all pages.
totalPages:
type: integer
format: int32
examples:
- 5
description: Total number of pages available.
currentPage:
type: integer
format: int32
examples:
- 1
description: Current page number (0-based ).
pageSize:
type: integer
format: int32
examples:
- 10
description: Number of items per page.
PageResponseDtoUserInfoDto:
type: object
required:
- items
- totalItems
- totalPages
- currentPage
- pageSize
description: Generic paginated response wrapper.
properties:
items:
type: array
items:
$ref: "#/components/schemas/UserInfoDto"
description: List of items on the current page.
totalItems:
type: integer
format: int64
examples:
- 42
description: Total number of items across all pages.
totalPages:
type: integer
format: int32
examples:
- 5
description: Total number of pages available.
currentPage:
type: integer
format: int32
examples:
- 1
description: Current page number (0-based ).
pageSize:
type: integer
format: int32
examples:
- 10
description: Number of items per page.
ResourceQueryDto:
type: object
properties:
page:
type: integer
format: int32
description: page number
minimum: 0
size:
type: integer
format: int32
description: page size
maximum: 100
minimum: 1
sortParams:
type: array
items:
type: string
description: List of field names to sort by. Default is ascending prefix
with - for descending
searchTerm:
type: string
description: string to search for in the resource
SignatureSlotCodeEnum:
type: string
enum:
- DATA_CONSUMER_01
- DATA_CONSUMER_02
- DATA_PROVIDER_01
- DATA_PROVIDER_02
TranslationDto:
type: object
properties:
de:
type: string
maxLength: 4000
fr:
type: string
maxLength: 4000
it:
type: string
maxLength: 4000
UUID:
type: string
format: uuid
pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
UidDto:
type: object
required:
- uid
description: Data transfer object representing an uid
properties:
uid:
type: string
name:
type: string
legalFormCode:
$ref: "#/components/schemas/LegalFormEnum"
UidRegisterAddressDto:
type: object
properties:
street:
type: string
zip:
type: string
city:
type: string
country:
type: string
UidRegisterOrganisationDto:
type: object
properties:
name:
type: string
legalName:
type: string
uid:
type: string
address:
$ref: "#/components/schemas/UidRegisterAddressDto"
UserInfoDto:
type: object
description: "Represents basic user information, such as name, contact details,\
\ and address."
properties:
userId:
$ref: "#/components/schemas/UUID"
type: string
examples:
- 3fa85f64-5717-4562-b3fc-2c963f66afa6
description: Unique identifier assigned by Agridata to a user (UUID format).
agateLoginId:
type: string
examples:
- "1234567"
description: AgateLoginId of the user.
ktIdP:
type: string
examples:
- ZH123456
description: KtIdP of the user. Only set for data producers
uid:
type: string
examples:
- CHE123456789
description: UID of the user. Only set for data consumers.
givenName:
type: string
examples:
- Anna
description: User's first name.
familyName:
type: string
examples:
- Muster
description: User's last name.
email:
type: string
examples:
- anna.muster@example.com
description: Email address of the user
phoneNumber:
type: string
examples:
- "+41791234567"
description: Phone number of the user
addressStreet:
type: string
examples:
- Bahnhofstrasse 10
description: Street name and house number of the user's residence.
addressLocality:
type: string
examples:
- Zürich
description: Locality (city or town) of the user's residence.
addressPostalCode:
type: string
examples:
- "8001"
description: Postal code of the user's residence.
addressCountry:
type: string
examples:
- CH
description: Country of residence
lastLoginDate:
$ref: "#/components/schemas/LocalDateTime"
type: string
examples:
- 2025-08-27T14:35:00
description: Date and time when the user last logged into the system.
userPreferences:
$ref: "#/components/schemas/UserPreferencesDto"
type: object
description: Preferences of the user in the frontend
rolesAtLastLogin:
type: array
items:
type: string
description: Roles of the user at the last login
UserPreferencesDto:
type: object
properties:
mainMenuOpened:
type: boolean
examples:
- true
description: If the main menu is opened or closed.
activeUid:
type: string
examples:
- CHE123456789
description: the active uid of the producer
dismissedMigratedIds:
type: array
examples:
- - a5b1d2e3-4f6a-2b7c-6d0e-9f1a3b5c7d9e
items:
type: string
description: consent request ids for which we dont want to show migration
notices anymore
hasSeenConsentRequestTourIntro:
type: boolean
examples:
- true
description: Indicates whether the user has already seen the consent request
feature tour introduction.
VerifyOtpRequestDto:
type: object
required:
- otpCode
properties:
otpCode:
type: string
examples:
- "123456"
pattern: "^\\d{6}$"
description: The 6-digit code to be verified.
securitySchemes:
SecurityScheme:
type: openIdConnect
description: Authentication
openIdConnectUrl: http://localhost:6999/realms/agate/.well-known/openid-configuration
tags:
- name: Consent Request Aggregations
description: Provides access to aggregated consent requests for data producers.
Each aggregation groups consent requests by the data request they belong to.
- name: Consent Requests
description: "Provides access to consent requests for data producers, consumers,\
\ and admins. Data producers can retrieve and update consent requests assigned\
\ to them, consumers can access consent requests linked to their data requests,\
\ and admins have full access to all consent requests."
- name: Contract Revisions
description: Provides access to contract revisions for consumers
- name: Data Products
description: Enables retrieval of available data products that can be requested
and used by Users in the data sharing process.
- name: Data Providers
description: Enables retrieval of data providers and their available data products.
- name: Data Requests
description: "Provides access to data requests for consumers and admins. Consumers\
\ can create, update, submit, and retrieve their own data requests, while admins\
\ have full access to all data requests and their associated consent requests."
- name: Data Transfer
description: "Relays data products that belong to a producer, identified by a specific\
\ UID or local BUR local unit Id. Before any data is transferred, the producer\
\ must have accepted an active data request that includes the requested product.\
\ This endpoint simply forwards the payload from the source system to the consumer."
- name: Data Transfer V2
- name: Test Data
- name: UID Register Search
description: Provides access to organisation details retrieved from the official
UID register.
- name: Users
description: "Provides access to UIDs and BURs authorized for specific data producers,\
\ based on their ktIdP or UID."
paths:
/api/agreement/v1/consent-request-aggregations:
get:
description: "Retrieves aggregated consent requests for the current data producer,\
\ grouped by data request."
operationId: getConsentRequestAggregations
tags:
- Consent Request Aggregations
parameters:
- description: Filter to retrieve consent requests for a specific producer UID.
example: CHE101000001
name: dataProducerUid
required: true
in: query
schema:
type: string
pattern: "^(?:CHE|ZZZ)\\d{9}$"
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ConsentRequestAggregationProducerView"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Consent Request Aggregations
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Support
x-api-subset:
- Mobile App
- agridata.ch Web App
/api/agreement/v1/consent-requests:
get:
description: Retrieves all consent requests assigned to the currently authenticated
data producer. Only accessible to users with the producer role.
operationId: getConsentRequests
tags:
- Consent Requests
parameters:
- description: "Optional filter to retrieve consent requests for a specific\
\ producer UID. If not provided, all requests for the currently authenticated\
\ producer are returned."
example: CHE101000001
name: dataProducerUid
in: query
schema:
type: string
pattern: "^(?:CHE|ZZZ)\\d{9}$"
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ConsentRequestProducerViewDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Consent Requests For Current Data Producer
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Support
x-api-subset:
- Mobile App
- agridata.ch Web App
post:
description: "Creates consent requests for given uids, provided the user actually\
\ has access to those uids."
operationId: createConsentRequests
tags:
- Consent Requests
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/CreateConsentRequestDto"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ConsentRequestCreatedDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"400":
description: Bad Request
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Create Consent Requests
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
x-api-subset: agridata.ch Web App
/api/agreement/v1/consent-requests/{id}:
get:
description: "Retrieves consent request with {id} if the authenticated data\
\ producer is assigned to it. "
operationId: getConsentRequest
tags:
- Consent Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ConsentRequestProducerViewDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Consent Request
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Support
x-api-subset: agridata.ch Web App
/api/agreement/v1/consent-requests/{id}/status:
put:
description: Updates the status of a specific consent request. Only accessible
to the data producer assigned to the consent request.
operationId: updateConsentRequestStatus
tags:
- Consent Requests
parameters:
- description: ID of the consent request
required: true
name: id
in: path
schema:
$ref: "#/components/schemas/UUID"
requestBody:
description: New status of the consent request
content:
application/json:
schema:
$ref: "#/components/schemas/ConsentRequestStateEnum"
required: true
responses:
"204":
description: No Content
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Update Consent Request State For Current Data Producer
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
x-api-subset:
- Mobile App
- agridata.ch Web App
/api/agreement/v1/contract-revisions/{id}:
get:
description: Retrieves a specific contract revision by its ID. Accessible by
the consumerthat owns the associated datarequest.
operationId: getContractRevision
tags:
- Contract Revisions
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractRevisionDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Contract Revision
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/agreement/v1/contract-revisions/{id}/signatures/{slotCode}/otp-challenges:
post:
description: Initiates a challenge for a specific signature slot of a specific
contract revision.
operationId: initiateConsumerSignatureChallenge
tags:
- Contract Revisions
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- name: slotCode
in: path
required: true
schema:
$ref: "#/components/schemas/SignatureSlotCodeEnum"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/OtpChallengeDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Initiate Consumer Signature Challenge
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/agreement/v1/contract-revisions/{id}/signatures/{slotCode}/otp-challenges/{challengeId}/verification:
post:
description: Verifies the otp and adds a signature to a specific signature slot.
operationId: verifyConsumerSignature
tags:
- Contract Revisions
parameters:
- name: challengeId
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- name: slotCode
in: path
required: true
schema:
$ref: "#/components/schemas/SignatureSlotCodeEnum"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/VerifyOtpRequestDto"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ContractRevisionDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"400":
description: Bad Request
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Verify Consumer Signature
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/agreement/v1/data-requests:
get:
description: "Retrieves a list of data requests. Admin users receive all data\
\ requests, while consumers receive only the data requests they own."
operationId: getDataRequests
tags:
- Data Requests
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/DataRequestDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Data Requests
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Datenanbieter
x-api-subset:
- agridata.ch Web App
- Data Consumer
- Data Provider
post:
description: Creates a new data request in draft status. Only accessible to
users with the consumer role. Disallows creating more than 10 draft requests
per consumer.
operationId: createDataRequestDraft
tags:
- Data Requests
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestUpdateDto"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"400":
description: Bad Request
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Create Data Request Draft
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/agreement/v1/data-requests/{id}:
put:
description: Updates the details of an existing data request. Only accessible
to the consumer who owns the data request.
operationId: updateDataRequestDetails
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestUpdateDto"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"400":
description: Bad Request
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Update Data Request Details
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
get:
description: 'Retrieves a specific data request by its ID. Accessible to admin
users or the consumer who owns the data request. '
operationId: getDataRequest
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Data Request
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Datenanbieter
x-api-subset: agridata.ch Web App
delete:
description: Deletes a data request
operationId: deleteDataRequest
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
responses:
"200":
description: OK
content:
application/json:
schema: {}
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Delete Data Request
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/agreement/v1/data-requests/{id}/consent-requests:
get:
description: Retrieves the consent requests of a specific data request. Accessible
to the provider who owns the data request.
operationId: getConsentRequestsOfDataRequest
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- name: lastModifiedFrom
in: query
schema:
allOf:
- $ref: "#/components/schemas/LocalDateTime"
- default: 1970-01-01T00:00:00
- name: page
in: query
schema:
type: integer
format: int32
default: 0
minimum: 0
- name: size
in: query
schema:
type: integer
format: int32
default: 100
maximum: 1000
minimum: 1
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/PageResponseDtoConsentRequestFundamentalViewDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Consent Requests Of Data Request
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenanbieter
x-api-subset: Data Provider
/api/agreement/v1/data-requests/{id}/kt-id-p/{kt-id-p}/consent-requests:
get:
description: "This endpoint is deprecated, because it does not return\
\ the name of the UIDs. Please use [/v2/data-requests/{id}/kt-id-p/{kt-id-p}/consent-requests](#/Data%20Requests/getConsentRequestsOfDataRequestAndKtIdPv2)\
\ instead.
Retrieves all consent requests associated with\
\ a specific data request and kt-id-p. Accessible to the consumer who owns\
\ the data request."
operationId: getConsentRequestsOfDataRequestAndKtIdP
deprecated: true
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- name: kt-id-p
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ConsentRequestConsumerViewDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Consent Requests Of Data Request And Kt Id P
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: Data Consumer
/api/agreement/v1/data-requests/{id}/logo:
put:
description: Updates the logo of a specific data request. Only accessible to
the consumer who owns the data request.
operationId: updateDataRequestLogo
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
logo:
type: string
format: binary
required: true
responses:
"204":
description: No Content
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Update Data Request Logo
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/agreement/v1/data-requests/{id}/status:
put:
description: sets status of data request. Only accessible to the consumer who
owns the data request and to admins. Only specific transitions are allowed.
operationId: setDataRequestStatus
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestStateEnum"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Set Data Request Status
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
x-api-subset: agridata.ch Web App
/api/agreement/v1/data-requests/{id}/valid-redirect-uri-regex:
put:
description: Updates the valid redirect URI regex of a specific data request.
Only accessible to admins.
operationId: updateDataRequestValidRedirectUriRegex
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestValidRedirectUriRegexUpdateDto"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataRequestDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"400":
description: Bad Request
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Update Data Request Valid Redirect Uri Regex
security:
- SecurityScheme:
- agridata.ch.Agridata_Admin
x-api-subset: agridata.ch Web App
/api/agreement/v2/data-requests/{id}/kt-id-p/{kt-id-p}/consent-requests:
get:
description: Retrieves all consent requests associated with a specific data
request and kt-id-p. Accessible to the consumer who owns the data request
and for admin users.
operationId: getConsentRequestsOfDataRequestAndKtIdPv2
tags:
- Data Requests
parameters:
- name: id
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- name: kt-id-p
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ConsentRequestConsumerViewV2Dto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Consent Requests Of Data Request And Kt Id Pv 2
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
x-api-subset: Data Consumer
/api/data-transfer/v1/product/{productId}/data:
get:
description: Retrieves data defined by productId. The needed query parameters
are depending on the requested productId. Please consult documentation to
find the necessary parameters
operationId: dataTransfer
deprecated: true
tags:
- Data Transfer
parameters:
- description: productId for which the data is requested
example: 085e4b72-964d-4bd5-a3c9-224d8c5585af
name: productId
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- description: Optional filter to retrieve data of a producer identified by
a id of a local bur unit
name: bur
in: query
schema:
type: string
- description: Optional filter to retrieve data of a producer identified by
the uid
example: CHE101000001
name: uid
in: query
schema:
type: string
- description: year for which the data is requested
example: 2024
name: year
in: query
schema:
type: integer
format: int32
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataTransferResponse"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Data Transfer
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: Data Consumer
/api/data-transfer/v1/product/{productId}/delta:
get:
description: "Returns a list of delta IDs (Producer UIDs) for the specified\
\ product, considering both data updates and newly granted consents since\
\ the given timestamp. This enables consumers to identify only those IDs for\
\ which a detail query is relevant"
operationId: getDeltaIds
tags:
- Data Transfer
parameters:
- description: productId for which the delta ids are requested
example: 085e4b72-964d-4bd5-a3c9-224d8c5585af
name: productId
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- description: Only delta IDs with changes or newly granted consents after this
timestamp are returned.
example: 2025-01-01T09:00:00
name: since
in: query
schema:
$ref: "#/components/schemas/LocalDateTime"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
type: string
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Delta Ids
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: Data Consumer
/api/data-transfer/v2/product/{productId}/data:
get:
description: "Retrieves data defined by productId. The needed query parameters\
\ are depending on the requested productId. Please consult documentation to\
\ find the necessary parameters. This endpoint simply forwards the payload\
\ from the source system to the consumer.Before any data is transferred, the\
\ producer must have accepted an active data request that includes the requested\
\ product."
operationId: dataTransferV2
tags:
- Data Transfer V2
parameters:
- description: productId for which the data is requested
example: 085e4b72-964d-4bd5-a3c9-224d8c5585af
name: productId
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
- description: Additional query parameters. The needed query parameters are
depending on the requested productId. Please consult documentation to find
the necessary parameters.
examples:
uid:
value:
uid: CHE123456789
name: queryParams
schema:
type: object
in: query
responses:
"200":
description: OK
content:
'*/*': {}
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Data Transfer
security:
- SecurityScheme: []
x-api-subset: Data Consumer
/api/products/v1:
get:
description: "Retrieves the list of all available data products. Accessible\
\ to users with the producer, consumer, admin, or provider role."
operationId: getDataProducts
tags:
- Data Products
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/DataProductDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Data Products
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Datenanbieter
- agridata.ch.Agridata_Support
x-api-subset:
- agridata.ch Web App
- Mobile App
/api/products/v1/data-providers:
get:
description: "Retrieves the list of all available data providers. Accessible\
\ to users with the producer, consumer, admin, or provider role."
operationId: getDataProviders
tags:
- Data Providers
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/DataProviderDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Data Providers
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Datenanbieter
- agridata.ch.Agridata_Support
x-api-subset: agridata.ch Web App
/api/products/v1/data-providers/{providerId}:
get:
description: Retrieves a specific data provider.
operationId: getDataProviderById
tags:
- Data Providers
parameters:
- name: providerId
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/DataProviderDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Data Provider By Id
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Datenanbieter
- agridata.ch.Agridata_Support
x-api-subset: agridata.ch Web App
/api/products/v1/data-providers/{providerId}/products:
get:
description: Retrieves all data products belonging to a specific data provider.
operationId: getDataProductsByProviderId
tags:
- Data Providers
parameters:
- name: providerId
in: path
required: true
schema:
$ref: "#/components/schemas/UUID"
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/DataProductDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Data Products By Provider Id
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Datenanbieter
- agridata.ch.Agridata_Support
x-api-subset: agridata.ch Web App
/api/test-data/execute:
post:
operationId: executeSqlScript
tags:
- Test Data
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
required: true
responses:
"201":
description: Created
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Execute
security:
- SecurityScheme:
- agridata.ch.Agridata_Admin
x-api-subset: agridata.ch Web App
/api/test-data/reset:
post:
operationId: resetTestData
tags:
- Test Data
responses:
"201":
description: Created
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Reset Test Data
security:
- SecurityScheme: []
x-api-subset: agridata.ch Web App
/api/uid-register/v1/search:
get:
description: Retrieves organisation details from the UID register for the UID
associated with the currently authenticated consumer. Only accessible to users
with the consumer role.
operationId: getByUidOfCurrentUser
tags:
- UID Register Search
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/UidRegisterOrganisationDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get By Uid Of Current User
security:
- SecurityScheme:
- agridata.ch.Agridata_Datenbezueger
x-api-subset: agridata.ch Web App
/api/uid-register/v1/search/{uid}:
get:
description: Retrieves organisation details from the UID register using the
specified UID. Accessible to users with the admin role.
operationId: getByUid
tags:
- UID Register Search
parameters:
- description: UID of the organisation without CHE prefix
example: 101708094
required: true
name: uid
in: path
schema:
type: integer
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/UidRegisterOrganisationDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get By Uid
security:
- SecurityScheme:
- agridata.ch.Agridata_Admin
x-api-subset: agridata.ch Web App
/api/user/v1/authorized-uids:
get:
description: Retrieves all UIDs authorized for the currently authenticated data
producer.
operationId: getAuthorizedUids
tags:
- Users
parameters:
- description: The agateLoginId of the producer (only relevant for admin users)
example: "1234567"
name: agate-login-id
in: query
schema:
type: string
- description: The kt-id-p identifier of the producer (only relevant for admin
users)
example: FLXXA0001
name: kt-id-p
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/UidDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Authorized Uids
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Support
- agridata.ch.Agridata_Admin
x-api-subset:
- agridata.ch Web App
- Mobile App
/api/user/v1/preferences:
put:
description: updates preferences for the currently authenticated user.
operationId: updateUserPreferences
tags:
- Users
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UserPreferencesDto"
required: true
responses:
"204":
description: No Content
"401":
description: Not Authorized
"403":
description: Not Allowed
"400":
description: Bad Request
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Update User Preferences
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Support
- agridata.ch.Agridata_Datenanbieter
x-api-subset: agridata.ch Web App
/api/user/v1/producers:
get:
description: Retrieves users mathing the given query parameters.
operationId: getProducers
tags:
- Users
parameters:
- name: page
in: query
schema:
type: integer
format: int32
description: page number
default: 0
minimum: 0
- name: searchTerm
in: query
schema:
type: string
description: string to search for in the resource
- name: size
in: query
schema:
type: integer
format: int32
description: page size
default: 20
maximum: 100
minimum: 1
- name: sortBy
in: query
schema:
type: object
description: List of field names to sort by. Default is ascending prefix
with - for descending
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/PageResponseDtoUserInfoDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Producers
security:
- SecurityScheme:
- agridata.ch.Agridata_Support
x-api-subset: agridata.ch Web App
/api/user/v1/uid/{uid}/authorized-burs:
get:
description: Retrieves all BURs authorized for the given UID. Only accessible
to admin users.
operationId: getAuthorizedBursByUid
tags:
- Users
parameters:
- name: uid
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/BurDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get Authorized Burs By Uid
security:
- SecurityScheme:
- agridata.ch.Agridata_Admin
x-api-subset: agridata.ch Web App
/api/user/v1/user-info:
get:
description: Retrieves user-info for the currently authenticated user.
operationId: getUserInfo
tags:
- Users
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/UserInfoDto"
"401":
description: Not Authorized
"403":
description: Not Allowed
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Get User Info
security:
- SecurityScheme:
- agridata.ch.Agridata_Einwilliger
- agridata.ch.Agridata_Datenbezueger
- agridata.ch.Agridata_Admin
- agridata.ch.Agridata_Support
- agridata.ch.Agridata_Datenanbieter
x-api-subset: agridata.ch Web App
/q/info:
get:
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
additionalProperties:
type: string
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Info
tags:
- Info Resource
/q/info/schema:
get:
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
"404":
description: The resource or element was not found
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
"500":
description: "Internal server error: unexpected error"
content:
application/json:
schema:
$ref: "#/components/schemas/ExceptionDto"
summary: Schema
tags:
- Info Resource
info:
title: agridata.ch API
version: 1.8.0-rc.7
description: |-
This API provides access to the agridata.ch data exchange platform, enabling Users to discover, request, approve, and manage data sharing agreements.
- **For Data Consumers**: Select this API subset to view only the endpoints relevant to you: [Data Consumer](/q/swagger-ui/?urls.primaryName=Data+Consumer)
- **For Data Providers**: Select this API subset to view only the endpoints relevant to you: [Data Providers](/q/swagger-ui/?urls.primaryName=Data+Provider)