Data Requests

Create Data Request Draft

Changed on

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.

post/api/agreement/v1/data-requests

Request

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

Request body

dataConsumerCitystring

City of the data consumer

dataConsumerZipstring

Zip code of the data consumer

dataConsumerStreetstring

Street of the data consumer

dataConsumerCountrystring

2 letter valid ISO 3166-1 alpha-2 country code of the data consumer

contactPhoneNumberstring

Contact phone number for the data request

contactEmailAddressstring

Contact email address for the data request

targetGroupstring

Target group of the data request

productsstring[]

List of data products requested

Example request

{
  "title": {
    "de": "Anfrage zu Bodentypen und Bodenqualitätsdaten",
    "fr": "Demande sur les types de sols et les données de qualité du sol",
    "it": "Richiesta sui tipi di suolo e sui dati sulla qualità del suolo"
  },
  "description": {
    "de": "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.",
    "fr": "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.",
    "it": "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."
  },
  "purpose": {
    "de": "Bewertung der Bodenqualität",
    "fr": "Évaluation de la qualité du sol",
    "it": "Valutazione della qualità del suolo"
  },
  "dataConsumerDisplayName": {
    "de": "Bio Suisse",
    "fr": "Bio Suisse",
    "it": "Bio Suisse"
  },
  "dataConsumerCity": "Basel",
  "dataConsumerZip": "4052",
  "dataConsumerStreet": "Peter Merian-Str. 34",
  "dataConsumerCountry": "CH",
  "contactPhoneNumber": "+41 79 123 45 67",
  "contactEmailAddress": "example@labelorganisation.ch",
  "targetGroup": "von allen Bio Suisse Mitgliedern",
  "products": [
    "c661ea48-106d-4d7a-a5d1-a9a6db48dd8c"
  ],
  "advantages": [
    {
      "de": "Vermeiden von Mehreingaben",
      "fr": "Éviter les saisies multiples",
      "it": "Evitare inserimenti multipli"
    }
  ]
}

Response

OK

idstring uuid required
dataProviderIdstring uuid
dataSourceSystemIdstring uuid
humanFriendlyIdstring

Human friendly id of the data request

submissionDatestring date

Date and time when the data request was submitted

productsstring[]

List of data products requested

terminationPeriodUntilstring date
dataConsumerLegalNamestring

LegalName of the data consumer taken from the uid register

dataConsumerUidstring

Uid of the data consumer

dataConsumerCitystring

City of the data consumer

dataConsumerZipstring

Zip code of the data consumer

dataConsumerStreetstring

Street of the data consumer

dataConsumerCountrystring

2 letter country code of the data consumer

contactPhoneNumberstring

Contact phone number for the data request

contactEmailAddressstring

Contact email address for the data request

dataConsumerLogoBase64string

Base64-encoded logo of the data consumer

targetGroupstring
validRedirectUriRegexstring

Regex of valid redirect_uri. Must compile as regex successfully.

currentContractRevisionIdstring uuid
consumerSignatureType'INDIVIDUAL_SIGNATURE' | 'COLLECTIVE_SIGNATURE'
providerSignatureType'INDIVIDUAL_SIGNATURE' | 'COLLECTIVE_SIGNATURE'
burPresentboolean required

Whether this data request also has BUR based consent requests in addition to the purely UID based ones. Derived from the flow codes of the requested data products.

Example response

{
  "dataSourceSystem": {
    "code": "AGIS",
    "dataProvider": {
      "code": "BLW",
      "uid": "CHE123456789"
    }
  },
  "humanFriendlyId": "GL56",
  "submissionDate": "2025-06-16T11:04:51.823889",
  "title": {
    "de": "Anfrage zu Bodentypen und Bodenqualitätsdaten",
    "fr": "Demande sur les types de sols et les données de qualité du sol",
    "it": "Richiesta sui tipi di suolo e sui dati sulla qualità del suolo"
  },
  "description": {
    "de": "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.",
    "fr": "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.",
    "it": "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."
  },
  "purpose": {
    "de": "Bewertung der Bodenqualität",
    "fr": "Évaluation de la qualité du sol",
    "it": "Valutazione della qualità del suolo"
  },
  "terminationPeriodUntil": "2022-03-10",
  "dataConsumerLegalName": "Bio Suisse, Vereinigung Schweizer Biolandbau-Organisationen",
  "dataConsumerDisplayName": {
    "de": "Bio Suisse",
    "fr": "Bio Suisse",
    "it": "Bio Suisse"
  },
  "dataConsumerUid": "CHE101708094",
  "dataConsumerCity": "Basel",
  "dataConsumerZip": "4052",
  "dataConsumerStreet": "Peter Merian-Str. 34",
  "dataConsumerCountry": "CH",
  "contactPhoneNumber": "+41 79 123 45 67",
  "contactEmailAddress": "example@labelorganisation.ch",
  "dataConsumerLogoBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
  "validRedirectUriRegex": "^https:\\/\\/www\\.dummy-label-organisation\\/.*$",
  "advantages": [
    {
      "de": "Vermeiden von Mehreingaben",
      "fr": "Éviter les saisies multiples",
      "it": "Evitare inserimenti multipli"
    }
  ],
  "burPresent": true
}

Changes

    • warning

      added the new TERMINATED enum value to the response property for the response status

    • warning

      added the new TERMINATION_PENDING enum value to the response property for the response status

    • info

      added the optional property to the response with the status

    • warning

      added the new EXPORT_CAPACITY_EXHAUSTED enum value to the response property for the response status

    • warning

      added the new EXPORT_CAPACITY_EXHAUSTED enum value to the response property for the response status

    • warning

      added the new EXPORT_LIMIT_EXCEEDED enum value to the response property for the response status

    • warning

      added the new EXPORT_LIMIT_EXCEEDED enum value to the response property for the response status