---
title: "Create Data Product Draft"
method: POST
path: "/api/products/v2"
tags: ["Data Products"]
---

# Create Data Product Draft

`POST /api/products/v2`

Creates a new data product in draft status. Only accessible to users with the admin or provider role.

## Query parameters

- `actingRole` 'PROVIDER' | 'ADMIN'

## Request body

- DataProductUpdateDto — Data transfer object representing a data product
  - `name` DataProductNameDto
    - `de` string — German name of the data product
    - `fr` string — French name of the data product
    - `it` string — Italian name of the data product
  - `description` DataProductDescriptionDto
    - `de` string — German description of the data product
    - `fr` string — French description of the data product
    - `it` string — Italian description of the data product
  - `dataSourceSystemId` string, uuid
  - `restClientId` string, uuid
  - `restClientPathTemplate` string — Template for the path from which the data product will be fetched
  - `restClientRequestTemplate` string — Template for the path from which the data product will be fetched
  - `restClientMethodCode` 'POST' | 'GET'
  - `flowCode` 'UID_BASED_PRE_VALIDATION' | 'UID_BASED_POST_VALIDATION' | 'BUR_BASED_PRE_VALIDATION' | 'BUR_BASED_POST_VALIDATION' | 'UNBOUND_POST_VALIDATION'
  - `restClientChangeDetectionPathTemplate` string — Template for the path for retrieving updates to the data product
  - `links` LinkDto[] — List of relevant product links
    - `url` string
    - `displayText` string
  - `extendedDescription` DataProductExtendedDescriptionDto
    - `de` string — German extended description of the data product
    - `fr` string — French extended description of the data product
    - `it` string — Italian extended description of the data product

## Response `200`

OK

- DataProductDto
  - `id` string, uuid, required
  - `dataSourceSystemCode` string — Code of data source system from which this product originates
  - `dataSourceSystem` DataSourceSystemDto
    - `id` string, uuid, required
    - `code` string — Stable technical code of the source
    - `name` TranslationDto
      - `de` string
      - `fr` string
      - `it` string
    - `dataProvider` DataProviderDto, required
      - `id` string, uuid, required
      - `code` string — Stable technical code of the provider
      - `name` TranslationDto
        - `de` string
        - `fr` string
        - `it` string
      - `uid` string — UID of the data provider
  - `restClient` RestClientDto
    - `id` string, uuid
    - `code` string — Stable technical code of the rest client
    - `displayName` string — Human-readable name of the REST client, intended for display in user interfaces
    - `url` string — Base URL of the external API accessed by this REST client
  - `restClientPathTemplate` string — Template for the path where the data product is fetched from
  - `restClientRequestTemplate` string — Template of the request body for fetching the data product
  - `restClientMethodCode` 'POST' | 'GET'
  - `flowCode` 'UID_BASED_PRE_VALIDATION' | 'UID_BASED_POST_VALIDATION' | 'BUR_BASED_PRE_VALIDATION' | 'BUR_BASED_POST_VALIDATION' | 'UNBOUND_POST_VALIDATION'
  - `name` TranslationDto
    - `de` string
    - `fr` string
    - `it` string
  - `description` TranslationDto
    - `de` string
    - `fr` string
    - `it` string
  - `links` LinkDto[] — List of relevant product links
    - `url` string
    - `displayText` string
  - `extendedDescription` TranslationDto
    - `de` string
    - `fr` string
    - `it` string
  - `deprecatedSince` string, date-time
  - `stateCode` union, required — State of the data product
    - 'DRAFT' | 'ACTIVE'
    - object
  - `restClientChangeDetectionPathTemplate` string — Template for the path for retrieving updates to the data product

## Other responses

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

---

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