--- openapi: 3.1.0 components: schemas: AgisAddressInformationType: type: object properties: addressLine1: type: string addressLine3: type: string street: type: string houseNumber: type: string town: type: string swissZipCode: type: integer format: int32 maximum: 9999 minimum: 1000 foreignZipCode: type: string AgisAnimalDataType: type: object required: - animalStock properties: animalStock: type: array items: $ref: "#/components/schemas/AgisAnimalStock" AgisAnimalStock: type: object required: - surveyKtIdB - animalCategory properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string animalCategory: type: string atdData: $ref: "#/components/schemas/AgisAtdDataType" selfreportedData: type: array items: $ref: "#/components/schemas/AgisSelfReportedDataType" BTSRAUS: type: integer format: int32 AgisAnimalSummeringDataType: type: object required: - animalStock properties: animalStock: type: array items: $ref: "#/components/schemas/AgisAnimalSummeringStock" AgisAnimalSummeringStock: type: object required: - animalCategory properties: creationDate: $ref: "#/components/schemas/LocalDate" animalCategory: type: string atdData: $ref: "#/components/schemas/AgisAtdSummeringDataType" selfreportedData: type: array items: $ref: "#/components/schemas/AgisSelfReportedSummeringDataType" AgisApicultureDataType: type: object required: - farmApicultureData properties: farmApicultureData: type: array items: $ref: "#/components/schemas/AgisFarmApicultureData" AgisAquacultureDataType: type: object required: - aquaticAnimalData properties: aquaticAnimalData: type: array items: $ref: "#/components/schemas/AgisAquaticAnimalData" AgisAquaticAnimalData: type: object required: - surveyKtIdB properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string aquaticAnimalTypes: $ref: "#/components/schemas/AgisAquaticAnimalTypes" breedingTypes: $ref: "#/components/schemas/AgisBreedingTypes" productionForms: $ref: "#/components/schemas/AgisProductionForms" waterSupplyTypes: $ref: "#/components/schemas/AgisWaterSupplyTypes" waterDrainTypes: $ref: "#/components/schemas/AgisWaterDrainTypes" AgisAquaticAnimalPerCategory: type: object required: - aquaticAnimalType properties: aquaticAnimalType: type: string productionQuantity: type: integer format: int32 AgisAquaticAnimalTypes: type: object required: - aquaticAnimalPerCategory properties: aquaticAnimalPerCategory: type: array items: $ref: "#/components/schemas/AgisAquaticAnimalPerCategory" AgisAtdDataFinalType: type: object required: - surveyFarmDetails properties: quantityTotal: type: number livestockUnitTotal: type: number surveyFarmDetails: $ref: "#/components/schemas/AgisSurveyFarmDetails" summeringInlandDetails: $ref: "#/components/schemas/AgisSummeringInlandDetails" summeringAbroadDetails: $ref: "#/components/schemas/AgisSummeringAbroadDetails" AgisAtdDataType: type: object required: - atdDataFinal properties: atdDataFinal: $ref: "#/components/schemas/AgisAtdDataFinalType" AgisAtdSummeringDataFinalType: type: object properties: quantityTotal: type: number livestockUnit: type: number normedLivestockUnit: type: number averageAnimalDurationSum: type: integer format: int32 AgisAtdSummeringDataType: type: object required: - atdDataFinal properties: atdDataFinal: $ref: "#/components/schemas/AgisAtdSummeringDataFinalType" AgisBiodiversitySurface: type: object required: - surveyKtIdB - cultivationType - areaNet properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string surfaceId: type: string cultureId: type: string locality: type: string municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 agriculturalZone: type: string cultivationType: type: string cultivationTypeAttribute: type: string areaGross: type: integer format: int32 areaNet: type: integer format: int32 biodiversityCategory: type: string biodiversityCommitmentStart: type: integer format: int32 natureProtectionSurface: type: boolean natureProtectionCommitmentStart: type: integer format: int32 cultivated: type: boolean contributionAuthorization: type: boolean AgisBiodiversitySurfaceDataType: type: object required: - biodiversitySurface properties: biodiversitySurface: type: array items: $ref: "#/components/schemas/AgisBiodiversitySurface" AgisBreedingTypes: type: object required: - breedingType properties: breedingType: type: array items: type: string AgisCantonFlAbbreviationType: type: string enum: - ZH - BE - LU - UR - SZ - OW - NW - GL - ZG - FR - SO - BS - BL - SH - AR - AI - SG - GR - AG - TG - TI - VD - VS - NE - GE - JU - FL AgisCountrysideQualityDataType: type: object required: - countrysideQualityProject properties: countrysideQualityProject: type: array items: $ref: "#/components/schemas/AgisCountrysideQualityProject" AgisCountrysideQualityProject: type: object required: - surveyKtIdB - projectName - projectElements properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string surfaceId: type: string locality: type: string municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 projectName: type: string projectElements: type: array items: $ref: "#/components/schemas/AgisProjectElementsType" AgisDataRequestTypeType: type: object properties: aggregatedResults: type: boolean finalData: type: boolean AgisFarmApicultureData: type: object required: - surveyKtIdB - colonyCount properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string colonyCount: type: integer format: int32 AgisFarmCharacteristicsType: type: object required: - ZATypology - surface - livestockUnit - structure - summeringStructure - surveyNorm - bioContribution - achieveOeln - directPayment - individualCultureContribution - summeringContribution - insituContribution - cerealsContribution - validSince properties: ZATypology: type: string surface: type: integer format: int32 livestockUnit: type: number minimum: 0 structure: type: boolean summeringStructure: type: boolean surveyNorm: type: boolean bioContribution: type: boolean achieveOeln: type: boolean directPayment: type: boolean individualCultureContribution: type: boolean summeringContribution: type: boolean insituContribution: type: boolean cerealsContribution: type: boolean validSince: $ref: "#/components/schemas/OffsetDateTime" AgisFarmDetailsType: type: object required: - farmType properties: farmType: type: string localMunicipality: $ref: "#/components/schemas/AgisMunicipalityType" coordinatesEast: type: integer format: int32 maximum: 2844000 minimum: 2460000 coordinatesNorth: type: integer format: int32 maximum: 1306000 minimum: 1063000 altitude: type: integer format: int32 minimum: 0 agriculturalZone: type: string agriculturalArea: type: string EGID: type: integer format: int32 EGAID: type: integer format: int32 AgisFarmGeneralData: type: object required: - code - quantity properties: creationDate: $ref: "#/components/schemas/LocalDate" code: type: string quantity: type: integer format: int32 AgisFarmGeneralDataDeclaration: type: object required: - code properties: creationDate: $ref: "#/components/schemas/LocalDate" code: type: string relevant: type: boolean AgisFarmPersonDetailsType: type: object required: - farmDetails - personDetails - farmCharacteristics properties: farmDetails: $ref: "#/components/schemas/AgisFarmDetailsType" personDetails: $ref: "#/components/schemas/AgisPersonDetailsType" farmCharacteristics: $ref: "#/components/schemas/AgisFarmCharacteristicsType" AgisGeneralDataType: type: object properties: farmGeneralData: type: array items: $ref: "#/components/schemas/AgisFarmGeneralData" farmGeneralDataDeclaration: type: array items: $ref: "#/components/schemas/AgisFarmGeneralDataDeclaration" AgisGeneralSurfaceDataType: type: object required: - surface properties: surface: type: array items: $ref: "#/components/schemas/AgisSurface" AgisGrapeSurface: type: object required: - surveyKtIdB - cultivationType properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string surfaceId: type: string cultureId: type: string locality: type: string municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 agriculturalZone: type: string cultivationType: type: string slopeGrape30To50Area: type: integer format: int32 slopeGrape50PlusArea: type: integer format: int32 slopeGrapeTerrace: type: integer format: int32 bioContribution: type: boolean contributionAuthorization: type: boolean AgisGrapeSurfaceDataType: type: object required: - grapeSurface properties: grapeSurface: type: array items: $ref: "#/components/schemas/AgisGrapeSurface" AgisMunicipalityType: type: object properties: municipalityName: type: string maxLength: 40 municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 cantonFlAbbreviation: $ref: "#/components/schemas/AgisCantonFlAbbreviationType" AgisNetworkContribution: type: object required: - organization properties: organization: type: string organizationName: type: string federalAmountUsed: type: boolean contributionAmount: type: number AgisNetworkSurface: type: object required: - surveyKtIdB - cultivationType - areaNet properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string surfaceId: type: string cultureId: type: string locality: type: string municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 agriculturalZone: type: string cultivationType: type: string cultivationTypeAttribute: type: string areaGross: type: integer format: int32 areaNet: type: integer format: int32 networkCommitmentStart: type: integer format: int32 networkContribution: type: array items: $ref: "#/components/schemas/AgisNetworkContribution" contributionAuthorization: type: boolean AgisNetworkSurfaceDataType: type: object required: - networkSurface properties: networkSurface: type: array items: $ref: "#/components/schemas/AgisNetworkSurface" AgisPersonDetailsType: type: object required: - legalForm properties: legalForm: type: string dateOfBirth: $ref: "#/components/schemas/LocalDate" foundationYear: type: integer format: int32 languageOfCorrespondance: type: string postalAddress: $ref: "#/components/schemas/AgisPersonMailAddressType" residenceMunicipality: $ref: "#/components/schemas/AgisMunicipalityType" EGAID: type: integer format: int32 AgisPersonMailAddressInfoType: type: object properties: firstName: type: string lastName: type: string AgisPersonMailAddressType: type: object properties: person: $ref: "#/components/schemas/AgisPersonMailAddressInfoType" addressInformation: $ref: "#/components/schemas/AgisAddressInformationType" AgisProductionForms: type: object required: - productionForm properties: productionForm: type: array items: type: string AgisProjectElementsType: type: object required: - measureId - quantity - contributionAmount properties: measureId: type: string category: type: string quantity: type: number contributionAmount: type: number contributionAuthorization: type: boolean AgisSelfReportedDataType: type: object properties: declarationDayQuantity: type: integer format: int32 averageQuantity: type: integer format: int32 keepingType: type: string summeringQuantity: type: integer format: int32 summeringDuration: type: integer format: int32 AgisSelfReportedSummeringDataType: type: object properties: quantity: type: integer format: int32 summeringDuration: type: integer format: int32 AgisSlopeSurface: type: object required: - surveyKtIdB - cultivationType properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string surfaceId: type: string cultureId: type: string locality: type: string municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 agriculturalZone: type: string cultivationType: type: string slope18To35Area: type: integer format: int32 slope35To50Area: type: integer format: int32 slope50PlusArea: type: integer format: int32 cultivated: type: boolean contributionAuthorization: type: boolean AgisSlopeSurfaceDataType: type: object required: - slopeSurface properties: slopeSurface: type: array items: $ref: "#/components/schemas/AgisSlopeSurface" AgisStructuralDataRootType: type: object properties: generalData: $ref: "#/components/schemas/AgisGeneralDataType" animalData: $ref: "#/components/schemas/AgisAnimalDataType" animalSummeringData: $ref: "#/components/schemas/AgisAnimalSummeringDataType" generalSurfaceData: $ref: "#/components/schemas/AgisGeneralSurfaceDataType" slopeSurfaceData: $ref: "#/components/schemas/AgisSlopeSurfaceDataType" grapeSurfaceData: $ref: "#/components/schemas/AgisGrapeSurfaceDataType" biodiversitySurfaceData: $ref: "#/components/schemas/AgisBiodiversitySurfaceDataType" networkSurfaceData: $ref: "#/components/schemas/AgisNetworkSurfaceDataType" countrysideQualityData: $ref: "#/components/schemas/AgisCountrysideQualityDataType" aquacultureData: $ref: "#/components/schemas/AgisAquacultureDataType" apicultureData: $ref: "#/components/schemas/AgisApicultureDataType" AgisStructuralDataType: type: object required: - ktIdB - ktIdP - farmPersonDetails properties: ktIdB: type: string maxLength: 20 ber: type: string pattern: "^[A-B][1-9][0-9]{7}$" ktIdP: type: string maxLength: 20 uid: type: string pattern: "^CHE[1-9][0-9]{8}$" farmPersonDetails: $ref: "#/components/schemas/AgisFarmPersonDetailsType" structuralDataRoot: $ref: "#/components/schemas/AgisStructuralDataRootType" AgisStructureResponseType: type: object required: - cantonFlAbbreviation - surveyYear - dataRequestType - structuralData properties: cantonFlAbbreviation: $ref: "#/components/schemas/AgisCantonFlAbbreviationType" surveyYear: type: integer format: int32 dataRequestType: $ref: "#/components/schemas/AgisDataRequestTypeType" structuralData: type: array items: $ref: "#/components/schemas/AgisStructuralDataType" AgisSummeringAbroadDetails: type: object properties: livestockUnit: type: number AgisSummeringInlandDetails: type: object properties: livestockUnit: type: number normedLivestockUnit: type: number AgisSurface: type: object required: - surveyKtIdB - cultivationType - areaNet properties: creationDate: $ref: "#/components/schemas/LocalDate" surveyKtIdB: type: string ber: type: string surfaceId: type: string cultureId: type: string locality: type: string municipalityId: type: integer format: int32 maximum: 9999 minimum: 1 agriculturalZone: type: string cultivationType: type: string cultivationTypeAttribute: type: string areaGross: type: integer format: int32 areaNet: type: integer format: int32 cultivated: type: boolean natureProtectionSurface: type: boolean psSoilMildTreatment: type: boolean psmArableFarming: type: boolean psmVegetablesBerries: type: boolean psmPerennialCulture: type: boolean psmBioAids: type: boolean psmHerbicide: type: boolean bio: type: boolean culturalLandscapeContribution: type: boolean individualCultureContribution: type: boolean AgisSurveyFarmDetails: type: object properties: declarationDayQuantity: type: integer format: int32 quantity: type: number livestockUnit: type: number AgisWaterDrainTypes: type: object required: - waterDrainType properties: waterDrainType: type: array items: type: string AgisWaterSupplyTypes: type: object required: - waterSupplyType properties: waterSupplyType: type: array items: type: string BurDto: type: object description: Data transfer object representing a bur properties: bur: type: string farmTypeCode: $ref: "#/components/schemas/FarmTypeEnum" subBurs: type: array items: $ref: "#/components/schemas/BurDto" ConsentRequestConsumerViewDto: 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" type: string examples: - PENDING description: Current state of the consent request ConsentRequestDetailViewDto: 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" type: string examples: - PENDING description: Current state of the consent request 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 burs: type: array items: $ref: "#/components/schemas/BurDto" description: BURs that belong to the consent request dataRequest: type: object required: - 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 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: object required: - id - dataSourceProductId description: List of data products requested properties: id: $ref: "#/components/schemas/UUID" type: string examples: - 3fa85f64-5717-4562-b3fc-2c963f66afb7 description: Unique identifier of the product dataSourceSystemCode: $ref: "#/components/schemas/DataSourceSystemEnum" type: string examples: - AGIS description: From which data source system 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 dataSourceProductId: type: string examples: - animalData description: The identifier of the product in the data source system 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: integer examples: - 106506215 description: Uid of the data consumer maximum: 16 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 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" type: string examples: - PENDING description: Current state of the consent request 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: - 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 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: object required: - id - dataSourceProductId description: List of data products requested properties: id: $ref: "#/components/schemas/UUID" type: string examples: - 3fa85f64-5717-4562-b3fc-2c963f66afb7 description: Unique identifier of the product dataSourceSystemCode: $ref: "#/components/schemas/DataSourceSystemEnum" type: string examples: - AGIS description: From which data source system 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 dataSourceProductId: type: string examples: - animalData description: The identifier of the product in the data source system 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: integer examples: - 106506215 description: Uid of the data consumer maximum: 16 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 ConsentRequestStateEnum: type: string enum: - GRANTED - OPENED - DECLINED description: Possible states of a consent request DataProductDto: type: object required: - id - dataSourceProductId properties: id: $ref: "#/components/schemas/UUID" type: string examples: - 3fa85f64-5717-4562-b3fc-2c963f66afb7 description: Unique identifier of the product dataSourceSystemCode: $ref: "#/components/schemas/DataSourceSystemEnum" type: string examples: - AGIS description: From which data source system 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 dataSourceProductId: type: string examples: - animalData description: The identifier of the product in the data source system 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: - 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 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: object required: - id - dataSourceProductId description: List of data products requested properties: id: $ref: "#/components/schemas/UUID" type: string examples: - 3fa85f64-5717-4562-b3fc-2c963f66afb7 description: Unique identifier of the product dataSourceSystemCode: $ref: "#/components/schemas/DataSourceSystemEnum" type: string examples: - AGIS description: From which data source system 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 dataSourceProductId: type: string examples: - animalData description: The identifier of the product in the data source system 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: integer examples: - 106506215 description: Uid of the data consumer maximum: 16 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 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 DataSourceSystemEnum: type: string enum: - AGIS ExceptionDto: type: object properties: message: type: string requestId: type: string type: $ref: "#/components/schemas/ExceptionEnum" debugMessage: type: string ExceptionEnum: type: string enum: - GENERIC - UID_MISSING FarmTypeEnum: type: string enum: - GANZJAHRESBETRIEB - PRODUKTIONSSTAETTE - GEMEINSCHAFTSWEIDEBETRIEB - SOEMMERUNGSBETRIEB - BETRIEBSGEMEINSCHAFT - VIEHHANDESUNTERNEHMEN - 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 - UNKNOWN LocalDate: type: string format: date examples: - 2022-03-10 LocalDateTime: type: string format: date-time examples: - 2022-03-10T12:15:50 OffsetDateTime: type: string format: date-time examples: - 2022-03-10T12:15:50-04:00 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 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: integer address: $ref: "#/components/schemas/UidRegisterAddressDto" securitySchemes: SecurityScheme: type: openIdConnect description: Authentication openIdConnectUrl: http://localhost:6999/realms/agate/.well-known/openid-configuration tags: - 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: Data Products description: Enables retrieval of available data products that can be requested and used by participants in the data sharing process. - 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: Participants description: "Provides access to UIDs and BURs authorized for specific data producers,\ \ based on their ktIdP or UID." - name: Test Data - name: UID Register Search description: Provides access to organisation details retrieved from the official UID register. paths: /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: CHE123456789 name: dataProducerUid in: query schema: type: string pattern: "^CHE[A-Za-z0-9*]{1,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 /api/agreement/v1/consent-requests/{id}: get: description: Retrieves a specific consent request by its ID. Accessible to admin users or to the consumer who owns the associated data request. 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/ConsentRequestDetailViewDto" "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_Datenbezueger - agridata.ch.Agridata_Admin /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 /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 post: description: Creates a new data request in draft status. Only accessible to users with the consumer role. 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 /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 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 /api/agreement/v1/data-requests/{id}/consent-requests: get: description: Retrieves all consent requests associated with a specific data request. Accessible to admin users or the consumer who owns the data request. operationId: getConsentRequestsOfDataRequest tags: - Data Requests parameters: - name: id in: path required: true schema: $ref: "#/components/schemas/UUID" 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 security: - SecurityScheme: - agridata.ch.Agridata_Datenbezueger - agridata.ch.Agridata_Admin /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 /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 /api/data-transfer/v1/data: get: description: Retrieves data defined by productId of organisation identified bi uid or bur local unit. operationId: dataTransfer tags: - Data Transfer parameters: - description: Optional filter to retrieve data of a producer identified by a id of a local bur unit example: A123456 name: bur in: query schema: type: string - description: productId for which the data is requested example: 085e4b72-964d-4bd5-a3c9-224d8c5585a name: productId in: query schema: $ref: "#/components/schemas/UUID" required: true - description: year of the survey for which the data is requested example: 2024 name: surveyYear in: query schema: type: integer format: int32 required: true - description: Optional filter to retrieve data of a producer identified by the uid example: CHE123456789 name: uid in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AgisStructureResponseType" "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 /api/participant/v1/authorized-uids: get: description: Retrieves all UIDs authorized for the currently authenticated data producer. operationId: getAuthorizedUids tags: - Participants 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 /api/participant/v1/ktIdP/{ktIdP}/authorized-uids: get: description: Retrieves all UIDs authorized for the specified ktIdP. Only accessible to admin users. operationId: getAuthorizedUidsByKtIdP tags: - Participants parameters: - name: ktIdP in: path required: true 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 By Kt Id P security: - SecurityScheme: - agridata.ch.Agridata_Admin /api/participant/v1/uid/{uid}/authorized-burs: get: description: Retrieves all BURs authorized for the given UID. Only accessible to admin users. operationId: getAuthorizedBursByUid tags: - Participants 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 /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 /api/test-data/reset: post: operationId: resetTestData tags: - Test Data responses: "200": description: OK "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: [] /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 /api/uid-register/v1/search/{uid}: get: description: Retrieves organisation details from the UID register using the specified UID. Accessible to users with the consumer or admin role. operationId: getByUid tags: - UID Register Search parameters: - description: UID of the organisation example: 106506215 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_Datenbezueger - agridata.ch.Agridata_Admin /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.0.0-rc.53 description: "This API provides access to the agridata.ch data exchange platform,\ \ enabling participants to discover, request, approve, and manage data sharing\ \ agreements."