openapi: 3.0.0
info:
  version: '1'
  title: Transformation API
  description: This API possibility to transform string with python code.
servers:
  - description: Production
    url: https://api.cdq.com/transformation/rest
    x-cdq-soap-url: https://api.corporate-data-league.ch/transformation/soap/v1
security:
  - apiKey: []
tags:
  - name: Transformations
    description: Transformations
  - name: Data Transformation Definitions
    description: Data Transformation Definitions
  - name: Data Transformation Schemas
    description: Data Transformation Schemas
paths:
  /datatransformationdefinitions:
    post:
      tags:
        - Data Transformation Definitions
      summary: Create Data Transformation Definition
      description: Create Data Transformation Definition with provided mappings.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataTransformationDefinitionCreate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinition'
    get:
      tags:
        - Data Transformation Definitions
      summary: List Data Transformation Definitions
      description: List Data Transformation Definitions.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/startAfterQuery'
        - name: imports
          description: Filter for imports.
          in: query
          required: false
          schema:
            type: string
            example: SAP.ODM
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinitionPage'
  /datatransformationschemas:
    post:
      tags:
        - Data Transformation Schemas
      summary: Create Data Transformation Schema
      description: Create Data Transformation Schema with provided json schema.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataTransformationSchemaCreate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationSchema'
    get:
      tags:
        - Data Transformation Schemas
      summary: List Data Transformation Schemas
      description: List Data Transformation Schemas.
      parameters:
        - $ref: '#/components/parameters/limitQuery'
        - $ref: '#/components/parameters/startAfterQuery'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationSchemaPage'
  /datatransformationschemas/{id}:
    get:
      tags:
        - Data Transformation Schemas
      summary: Read Data Transformation Schema
      description: Read Data Transformation Schema.
      parameters:
        - $ref: '#/components/parameters/dataTransformationSchemaIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationSchema'
    put:
      tags:
        - Data Transformation Schemas
      summary: Update Data Transformation Schema
      description: Update Data Transformation Schema.
      parameters:
        - $ref: '#/components/parameters/dataTransformationSchemaIdPathParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataTransformationSchemaCreate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationSchema'
    delete:
      tags:
        - Data Transformation Schemas
      summary: Delete Data Transformation Schema
      description: Delete Data Transformation Schema.
      parameters:
        - $ref: '#/components/parameters/dataTransformationSchemaIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationSchemaDelete'
  /datatransformationdefinitions/{id}/reverse:
    get:
      tags:
        - Data Transformation Definitions
      summary: Reverse Data Transformation Definition
      description: Reverse Data Transformation Definition.
      parameters:
        - $ref: '#/components/parameters/dataTransformationDefinitionIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinition'
  /datatransformationdefinitions/{id}:
    get:
      tags:
        - Data Transformation Definitions
      summary: Read Data Transformation Definition
      description: Read Data Transformation Definition.
      parameters:
        - $ref: '#/components/parameters/dataTransformationDefinitionIdPathParam'
        - name: featuresOn
          description: Features to be activated.
          in: query
          required: false
          schema:
            type: array
            description: Features to be activated.
            items:
              $ref: '#/components/schemas/TransformationDefinitionFeatureParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinition'
    put:
      tags:
        - Data Transformation Definitions
      summary: Update Data Transformation Definition
      description: Update Data Transformation Definition.
      parameters:
        - $ref: '#/components/parameters/dataTransformationDefinitionIdPathParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataTransformationDefinitionCreate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinition'
    delete:
      tags:
        - Data Transformation Definitions
      summary: Delete Data Transformation Definition
      description: Delete Data Transformation Definition.
      parameters:
        - $ref: '#/components/parameters/dataTransformationDefinitionIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinitionDelete'
  /datatransformationdefinitions/{id}/versions/{version}:
    get:
      tags:
        - Data Transformation Definitions
      summary: Read specific version of Data Transformation Definition
      description: Read specific version of Data Transformation Definition.
      parameters:
        - $ref: '#/components/parameters/dataTransformationDefinitionIdPathParam'
        - name: version
          description: Version number of the Data Transformation Definition.
          in: path
          required: true
          schema:
            type: integer
            example: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataTransformationDefinitionVersion'
  /datatransformationdefinitions/{id}/transform:
    post:
      tags:
        - Transformations
      summary: Transform JSON
      description: Transform JSON string using data transformation definition ID.
      parameters:
        - $ref: '#/components/parameters/dataTransformationDefinitionIdPathParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformWithDefinitionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformWithDefinitionResult'
  /datatransformationdefinitions/transform:
    post:
      tags:
        - Transformations
      summary: Transform JSON with Data Transformation Definition
      description: Transform JSON string using provided data transformation definition.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformWithProvidedDefinitionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransformWithDefinitionResult'
components:
  parameters:
    dataTransformationDefinitionIdPathParam:
      name: id
      description: ID of the data transformation definition.
      in: path
      required: true
      schema:
        type: string
        example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
    dataTransformationSchemaIdPathParam:
      name: id
      description: ID of the data transformation schema.
      in: path
      required: true
      schema:
        type: string
        example: 66432427ba96dd27add2ea34
    configurationId:
      in: path
      name: configurationId
      description: ID of the configuration.
      required: true
      schema:
        type: string
        example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
    configurationVersion:
      in: path
      name: version
      required: true
      description: Version number of the configuration.
      schema:
        type: integer
        example: 1
    limitQuery:
      name: limit
      description: Number of items.
      in: query
      required: false
      schema:
        type: integer
        description: Number of items per page.
        example: '100'
        default: 50
    startAfterQuery:
      name: startAfter
      description: Start after the given ID.
      in: query
      required: false
      example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
      schema:
        $ref: '#/components/schemas/StartAfter'
  schemas:
    TransformWithDefinitionRequest:
      type: object
      description: >-
        Request to transform JSON string with provided data transformation
        definition.
      properties:
        inputJson:
          type: array
          description: List of JSON objects to transform.
          items:
            $ref: '#/components/schemas/JsonObject'
        reverse:
          $ref: '#/components/schemas/TransformReverseToggle'
        validationSchemaId:
          $ref: '#/components/schemas/JsonValidationSchemaId'
    TransformReverseToggle:
      type: boolean
      default: false
      description: Set to 'true' if you want to apply the reverse mapping
      example: 'true'
    JsonValidationSchemaId:
      type: string
      description: ID of Json validation schema
      example: 66432427ba96dd27add2ea34
    TransformWithProvidedDefinitionRequest:
      type: object
      description: >-
        Request to transform JSON string with provided data transformation
        definition.
      allOf:
        - $ref: '#/components/schemas/TransformWithDefinitionRequest'
        - type: object
          description: >-
            Request to transform JSON string with provided data transformation
            definition.
          properties:
            dataTransformationDefinition:
              $ref: '#/components/schemas/DataTransformationDefinitionCreate'
    TransformWithDefinitionResult:
      type: object
      description: Result of the transformation.
      properties:
        resultJson:
          type: array
          description: List of transformed JSON objects.
          items:
            $ref: '#/components/schemas/JsonObject'
    JsonObject:
      type: object
      description: JSON object
      additionalProperties: true
    DataTransformationDefinitionPage:
      type: object
      description: Page of data transformation definitions.
      properties:
        startAfter:
          $ref: '#/components/schemas/StartAfter'
        nextStartAfter:
          $ref: '#/components/schemas/NextStartAfter'
        total:
          $ref: '#/components/schemas/PageTotal'
        values:
          type: array
          description: List of data transformation definitions.
          items:
            $ref: '#/components/schemas/DataTransformationDefinitionSearchResult'
    DataTransformationDefinitionSearchResult:
      type: object
      description: Data transformation definition page item.
      properties:
        id:
          $ref: '#/components/schemas/DataTransformationDefinitionId'
        type:
          $ref: '#/components/schemas/DataTransformationDefinitionType'
        name:
          $ref: '#/components/schemas/DataTransformationDefinitionName'
        createdBy:
          $ref: '#/components/schemas/CreatedBy'
        createdAt:
          $ref: '#/components/schemas/CreatedAt'
        modifiedBy:
          $ref: '#/components/schemas/ModifiedBy'
        modifiedAt:
          $ref: '#/components/schemas/ModifiedAt'
    DataTransformationSchemaPage:
      type: object
      description: Page of data transformation validation schemas.
      properties:
        startAfter:
          $ref: '#/components/schemas/StartAfter'
        nextStartAfter:
          $ref: '#/components/schemas/NextStartAfter'
        total:
          $ref: '#/components/schemas/PageTotal'
        values:
          type: array
          description: List of data transformation validation schemas.
          items:
            $ref: '#/components/schemas/DataTransformationSchemaSearchResult'
    DataTransformationSchemaSearchResult:
      type: object
      description: Data transformation schema page item.
      properties:
        id:
          $ref: '#/components/schemas/DataTransformationSchemaId'
        name:
          $ref: '#/components/schemas/DataTransformationSchemaName'
        createdBy:
          $ref: '#/components/schemas/CreatedBy'
        createdAt:
          $ref: '#/components/schemas/CreatedAt'
        modifiedBy:
          $ref: '#/components/schemas/ModifiedBy'
        modifiedAt:
          $ref: '#/components/schemas/ModifiedAt'
    DataTransformationDefinition:
      type: object
      description: Contains data transformation definition.
      allOf:
        - $ref: '#/components/schemas/DataTransformationDefinitionCreate'
        - type: object
          description: Contains data transformation definition.
          properties:
            id:
              $ref: '#/components/schemas/DataTransformationDefinitionId'
            workspaceId:
              $ref: '#/components/schemas/WorkspaceId'
            version:
              $ref: '#/components/schemas/VersionNumber'
            createdBy:
              $ref: '#/components/schemas/CreatedBy'
            createdAt:
              $ref: '#/components/schemas/CreatedAt'
            modifiedBy:
              $ref: '#/components/schemas/ModifiedBy'
            modifiedAt:
              $ref: '#/components/schemas/ModifiedAt'
    DataTransformationDefinitionInternal:
      type: object
      description: Contains data transformation definition.
      allOf:
        - $ref: '#/components/schemas/DataTransformationDefinition'
        - $ref: >-
            #/components/schemas/DataTransformationDefinitionCustomTransformation
    DataTransformationSchema:
      type: object
      description: Contains data transformation validation schema.
      allOf:
        - $ref: '#/components/schemas/DataTransformationSchemaCreate'
        - type: object
          description: Contains data transformation validation schema.
          properties:
            id:
              $ref: '#/components/schemas/DataTransformationSchemaId'
            createdBy:
              $ref: '#/components/schemas/CreatedBy'
            createdAt:
              $ref: '#/components/schemas/CreatedAt'
            modifiedBy:
              $ref: '#/components/schemas/ModifiedBy'
            modifiedAt:
              $ref: '#/components/schemas/ModifiedAt'
    DataTransformationSchemaId:
      type: string
      description: ID of the json validation schema.
      example: 66432427ba96dd27add2ea34
    ImportDataTransformationDefinition:
      type: object
      description: Import data transformation definition.
      properties:
        id:
          $ref: '#/components/schemas/DataTransformationDefinitionId'
    DataTransformationDefinitionId:
      type: string
      description: Unique identifier for a data transformation definition.
      example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
    DataTransformationDefinitionDelete:
      type: object
      description: Data transformation definition delete response.
      properties:
        id:
          type: string
          description: ID of the deleted object.
          example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
    DataTransformationSchemaDelete:
      type: object
      description: Data transformation schema delete response.
      properties:
        id:
          $ref: '#/components/schemas/DataTransformationSchemaId'
    DataTransformationDefinitionCreate:
      type: object
      description: Create data transformation definition.
      properties:
        imports:
          type: array
          description: List of imported data transformation definitions.
          items:
            $ref: '#/components/schemas/ImportDataTransformationDefinition'
        name:
          $ref: '#/components/schemas/DataTransformationDefinitionName'
        type:
          $ref: '#/components/schemas/DataTransformationDefinitionType'
        mappings:
          type: array
          description: List of attribute mappings.
          items:
            $ref: '#/components/schemas/AttributeMappingRule'
        reverseMappings:
          type: array
          description: List of reverse attribute mappings.
          items:
            $ref: '#/components/schemas/AttributeMappingRule'
        valueMappings:
          type: array
          description: List of value mappings.
          items:
            $ref: '#/components/schemas/ValueMapping'
        values:
          type: array
          description: List of values.
          items:
            $ref: '#/components/schemas/Value'
    DataTransformationDefinitionCustomTransformation:
      type: object
      description: Python transformation code.
      properties:
        customTransformations:
          type: array
          description: >
            Define custom transformation in python code. The input of the
            transformation is the full raw data the output just the result
            string.

            The simplest transformation looks as follows:

            ```

            def transform(raw_data):
                return raw_data
            ```

            To make some operation on json following code should be applied:

            ```

            import json


            def transform(raw_data):
                json_result = json.loads(raw_data)
                return json_result["address"]
            ```

            The method def transform(raw_data) should always be provided.
            Feature is experimental and limited to CDQ organizations.

            Updating given DTD via public endpoint will remove all custom
            transformations defined in that DTD.


            Enable this transformation by setting transformation type in
            `targetTransformations` to `CUSTOM_TRANSFORMATION`.
          items:
            $ref: '#/components/schemas/CustomTransformation'
    DataTransformationDefinitionInternalCreate:
      type: object
      description: Create data transformation definition.
      allOf:
        - $ref: '#/components/schemas/DataTransformationDefinitionCreate'
        - $ref: >-
            #/components/schemas/DataTransformationDefinitionCustomTransformation
    DataTransformationSchemaCreate:
      type: object
      description: Create data transformation schema.
      properties:
        jsonSchema:
          type: object
          additionalProperties: true
          description: Validation schema in json format.
        name:
          $ref: '#/components/schemas/DataTransformationSchemaName'
    DataTransformationSchemaName:
      type: string
      description: Name of the json schema validation.
      example: My schema
    AttributeMappingRule:
      type: object
      description: Attribute mapping rule.
      properties:
        sourceAttributes:
          type: array
          description: List of source attributes.
          items:
            type: string
            description: Source attribute.
            example: businessPartner.record
        sourceSelections:
          type: array
          description: List of source selections.
          items:
            $ref: '#/components/schemas/SourceSelection'
        targetAttributes:
          type: array
          description: List of target attributes.
          items:
            type: string
            description: Target attribute.
            example: businessPartner.externalId
        targetTransformations:
          type: array
          description: List of target transformations.
          items:
            $ref: '#/components/schemas/TargetTransformation'
        ignoredValues:
          type: array
          description: Values to be ignored during transformation.
          items:
            $ref: '#/components/schemas/IgnoredValue'
    IgnoredValue:
      type: string
      description: Value to be ignored during transformation.
      example: ignored value
    SourceSelection:
      type: object
      description: Source selection.
      required:
        - selectionType
      properties:
        selectionType:
          $ref: '#/components/schemas/SelectionTypeParam'
        value:
          type: string
          description: >-
            String which is used as a delimiter when joining multiple source
            values in CONCATENATION selection type.
          example: ','
    SelectionTypeParam:
      type: string
      description: Selection type.
      example: CONCATENATION
      enum:
        - CONCATENATION
        - XOR
      x-enumDescritions:
        CONCATENATION: Concatenation.
        XOR: XOR.
    TargetTransformation:
      type: object
      description: Target transformation.
      allOf:
        - $ref: '#/components/schemas/ConstantMapping'
        - $ref: '#/components/schemas/CustomTargetTransformation'
        - $ref: '#/components/schemas/DefaultIfEmptyTransformation'
        - type: object
          description: Target transformation.
          required:
            - transformationType
          properties:
            transformationType:
              $ref: '#/components/schemas/TransformationTypeParam'
    TransformationTypeParam:
      type: string
      description: Transformation type.
      example: CAPITALIZE
      enum:
        - CAPITALIZE
        - CONSTANT_MAPPING
        - CONDITIONAL_CONSTANT_MAPPING
        - WORD_LENGTH_SPLIT
        - TO_UPPERCASE
        - MULTIPLE_SOURCE_AND_TARGET_ATTRIBUTE_SUPPORT
        - DEFAULT_IF_EMPTY
        - SPLIT
      x-enumDescriptions:
        CAPITALIZE: Capitalize.
        CONSTANT_MAPPING: Constant mapping.
        CONDITIONAL_CONSTANT_MAPPING: Conditional constant mapping.
        WORD_LENGTH_SPLIT: Word length split.
        TO_UPPERCASE: To uppercase.
        MULTIPLE_SOURCE_AND_TARGET_ATTRIBUTE_SUPPORT: Multiple source and target attribute support.
        DEFAULT_IF_EMPTY: Default if empty.
        SPLIT: Split.
    DefaultIfEmptyTransformation:
      type: object
      description: Default if empty transformation.
      properties:
        defaultValue:
          type: string
          description: Default value.
          example: default
    ConstantMapping:
      type: object
      description: Constant mapping.
      properties:
        constantValue:
          type: string
          description: Constant value.
          example: constant
        targetAttributes:
          type: array
          description: List of target attributes.
          items:
            type: string
            description: Target attribute.
            example: businessPartner.externalId
    CustomTargetTransformation:
      type: object
      description: Custom target transformation.
      properties:
        transformationName:
          type: string
          description: Name of the transformation.
          example: CAPITALIZE
    CustomTransformation:
      type: object
      description: Custom transformation.
      properties:
        name:
          type: string
          description: >
            Name of the script. This name should be used to define in which
            mapping this transformation should be used.

            ```

            {
              "customTransformations": [
                {
                  "name": "lv_locality_transformation"
                  "code": "def transform(raw_data):\r\n                json_result = json.loads(raw_data)\r\n                return json_result[\"address\"].split(",")[0]"
                },
                {
                          "name": "lv_thoroughfare_transformation"
                          "code": "def transform(raw_data):\r\n                json_result = json.loads(raw_data)\r\n                return json_result[\"address\"].split(",")[1]"
                 }
              ]
            ...
              "mappings": [
                {
                  "sourceAttributes": [
                    "businessPartner.record"
                  ], // when all raw data should be provided then use $
                  "targetAttributes": [
                    "businessPartner.externalId"
                  ],
                  "targetTransformations": [
                    {
                      "transformationType" : "CUSTOM",
                      "parameters": [
                        {
                          "key" : "transformationName",
                          "value" : "lv_locality_transformation"
                        }
                      ]
                    }
                  ]
                },
                {
                  "sourceAttributes": [
                      "businessPartner.record"
                  ],
                  "targetAttributes": [
                    "address.localities[0].value"
                  ],
                  "targetTransformations": [
                    {
                      "transformationType" : "CUSTOM",
                      "parameters": [
                        {
                          "key" : "transformationName",
                          "value" : "lv_locality_transformation"
                        }
                      ]
                    }
                  ]
                },
              {
                "sourceAttributes": [
                    "businessPartner.record" or "$"
                ],
                "targetAttributes": [
                    "address.thoroughfare[0].value",
                    "address.thoroughfare[1].value"
                ],
                "targetTransformations": [
                  {
                    "transformationType" : "CUSTOM",
                    "parameters": [
                      {
                        "key" : "transformationName",
                        "value" : "lv_thoroughfare_transformation"
                      }
                    ]
                  }
                ]
              }

            }

            ```
          example: Code above.
        code:
          type: string
          description: The code of the given script.
          example: Code above.
    ValueMapping:
      type: object
      description: Value mapping.
      properties:
        sourceConditions:
          type: array
          description: List of source conditions.
          items:
            $ref: '#/components/schemas/SourceCondition'
        sourceValue:
          type: string
          description: The source value for a value mapping.
          example: AE1
        targetValue:
          type: string
          description: The target value for a value mapping.
          example: AE
        targetAttribute:
          type: string
          description: >-
            The target attribute (business partner or address for a value
            mapping).
          example: $.identifications[*].country.code
        sourceAttribute:
          type: string
          description: >-
            The source attribute (business partner or address for a value
            mapping).
          example: $.identifications[*].country.code
        disabled:
          $ref: '#/components/schemas/DisabledToggle'
    DisabledToggle:
      type: boolean
      description: Toggles if an element of a transformation definition is disabled or not.
      example: 'false'
    Value:
      type: object
      description: Value.
      properties:
        sourceValue:
          $ref: '#/components/schemas/SourceValue'
        sourceAttribute:
          $ref: '#/components/schemas/SourceAttribute'
    SourceValue:
      type: string
      description: The source value for a value mapping
      example: AE1
    SourceAttribute:
      type: string
      description: The source value for a value mapping
      example: identifications[*].indentificationType.code
    SourceCondition:
      type: object
      description: Source condition.
      properties:
        sourceValue:
          $ref: '#/components/schemas/SourceConditionValue'
        sourceAttribute:
          $ref: '#/components/schemas/SourceConditionAttribute'
        sourceRegex:
          $ref: '#/components/schemas/SourceConditionRegex'
    SourceConditionValue:
      type: string
      description: Value that source attribute must be equal to meet condition.
      example: AU
    SourceConditionAttribute:
      type: string
      description: Attribute that holds the source value eventually.
      example: $.identifications[*].country.code
    SourceConditionRegex:
      type: string
      description: Regex that source attribute must match to meet condition.
      example: ^GR\..{1,}
    TransformationResultItem:
      type: object
      description: Transformation result item.
      properties:
        key:
          type: string
          description: Key of the transformation result item.
          example: key
        value:
          type: string
          description: Value of the transformation result item.
          example: value
    MessageTransformationUrl:
      type: string
      description: URL of the original message to be transformed.
      example: referencedata/rest/businesspartners/lookup
    MessageTransformationConfigurationId:
      type: string
      description: ID of the message transformation which should be applied.
      example: /sap-odm/v2
    MessageType:
      type: string
      description: >
        * REQUEST: Request or inbound message * RESPONSE: Response or outbound
        message
      example: REQUEST
    DataTransformationConfigurationSearchResult:
      type: object
      description: Data transformation configuration search result.
      properties:
        id:
          $ref: '#/components/schemas/ConfigurationId'
        name:
          $ref: '#/components/schemas/ConfigurationName'
        createdAt:
          $ref: '#/components/schemas/CreatedAt'
        modifiedAt:
          $ref: '#/components/schemas/ModifiedAt'
        createdBy:
          $ref: '#/components/schemas/CreatedBy'
    VersionNumber:
      type: integer
      description: Version number of the resource.
      example: 1
    RelatedConfigurationId:
      type: string
      description: ID of the related configuration.
      example: a0200062daa56952a8640005
    RelatedConfigurationOwner:
      type: object
      description: Configuration which relates to the root configuration.
      properties:
        service:
          $ref: '#/components/schemas/RelatedConfigurationOwnerService'
        path:
          $ref: '#/components/schemas/RelatedConfigurationOwnerPath'
    RelatedConfigurationOwnerService:
      type: string
      description: Name of the service which is the owner of the configuration.
      example: reference-data-api
    RelatedConfigurationOwnerPath:
      type: string
      description: Endpoint used to read the related configuration.
      example: /public/configurations/businesspartnerlookup
    TransactionId:
      type: string
      description: >-
        ID of the transaction, pass it in later requests to make them part of
        the transaction.
      example: 8e37da1e-ee9d-4ee0-b03d-24a1f89988f2
    TransactionFeaturesOn:
      description: >-
        Features to be activated. Do not use CREATE_TRANSACTION and
        COMMIT_TRANSACTION at the same time.
      type: array
      items:
        $ref: '#/components/schemas/TransactionFeatureParam'
    TransactionFeatureParam:
      type: string
      description: Feature used to control a transaction process.
      example: CREATE_TRANSACTION
      enum:
        - CREATE_TRANSACTION
        - COMMIT_TRANSACTION
      x-enumDescriptions:
        CREATE_TRANSACTION: >-
          Creates a new transaction and makes the current request a part of it.
          By default turned off.
        COMMIT_TRANSACTION: Commit transaction. By default turned off.
    TransformationConfigurationModel:
      type: object
      description: Transformation configuration model.
      properties:
        businessPartner:
          $ref: '#/components/schemas/TransformationConfigurationBusinessPartner'
        businessPartnerUpdates:
          $ref: >-
            #/components/schemas/TransformationConfigurationBusinessPartnerUpdates
    TransformationConfigurationBusinessPartner:
      type: object
      description: Data transformation definition ID.
      properties:
        dataTransformationDefinitionId:
          $ref: '#/components/schemas/ConfigurationId'
    TransformationConfigurationBusinessPartnerUpdates:
      type: object
      description: Data transformation definition ID.
      properties:
        dataTransformationDefinitionId:
          $ref: '#/components/schemas/ConfigurationId'
    TransformationDefinitionFeatureParam:
      type: string
      description: Feature for transformation definitions.
      example: RESOLVE_IMPORTS
      enum:
        - RESOLVE_IMPORTS
      x-enumDescriptions:
        RESOLVE_IMPORTS: Merge definitions from import
    DataTransformationDefinitionName:
      type: string
      description: Name of the Data Transformation Definition.
      example: My DTD
    DataTransformationDefinitionType:
      type: object
      description: Type of the Data Transformation Definition
      properties:
        name:
          $ref: '#/components/schemas/DataTransformationDefinitionTypeName'
        technicalKey:
          $ref: >-
            #/components/schemas/DataTransformationDefinitionTypeTechnicalKeyParam
    DataTransformationDefinitionTypeName:
      type: string
      description: Name of the Data Transformation Definition Type
      example: BUSINESS_PARTNER
    DataTransformationDefinitionTypeTechnicalKeyParam:
      type: string
      description: Technical key of the Data Transformation Definition Type
      example: BUSINESS_PARTNER
      enum:
        - BUSINESS_PARTNER
        - MESSAGE_DETAILS
      x-enumDescriptions:
        BUSINESS_PARTNER: Data transformation definitions applied to business partner
        MESSAGE_DETAILS: Data transformation definitions applied to message details
    DataTransformationDefinitionVersion:
      type: object
      description: Specific version of Data Transformation Definition.
      allOf:
        - $ref: '#/components/schemas/DataTransformationDefinitionCreate'
        - type: object
          description: Contains specific version Data Transformation Definition.
          properties:
            id:
              type: string
              description: Unique identifier of Data Transformation Definition version.
              example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
            dataTransformationDefinitionId:
              type: string
              description: Unique identifier for a Data Transformation Definition.
              example: 17def3cf51b6-abf0-4f8e-9a20-cd83bab2
            version:
              $ref: '#/components/schemas/DataTransformationDefinitionVersionNumber'
            workspaceId:
              $ref: '#/components/schemas/WorkspaceId'
            createdBy:
              $ref: '#/components/schemas/CreatedBy'
            createdAt:
              $ref: '#/components/schemas/CreatedAt'
    DataTransformationDefinitionVersionNumber:
      type: integer
      description: Version number of the configuration.
      example: 1
    Status:
      type: object
      description: Details about status or error of a service.
      properties:
        code:
          $ref: '#/components/schemas/HttpStatusCode'
        technicalKey:
          $ref: '#/components/schemas/HttpStatusTechnicalKey'
        details:
          type: array
          description: List of details about the status or error.
          items:
            $ref: '#/components/schemas/StatusDetails'
        path:
          $ref: '#/components/schemas/HttpPath'
        timestamp:
          $ref: '#/components/schemas/StatusTimestamp'
    StatusDetails:
      type: object
      description: Details about this status or error.
      required:
        - id
        - message
      properties:
        id:
          $ref: '#/components/schemas/StatusDetailsMessageId'
        message:
          $ref: '#/components/schemas/StatusDetailsMessage'
        technicalKey:
          $ref: '#/components/schemas/StatusDetailsTechnicalKey'
        jsonPath:
          $ref: '#/components/schemas/JsonPath'
        jsonRecord:
          $ref: '#/components/schemas/schemas-JsonObject'
    StartAfter:
      type: string
      description: The ID which is used to read the page.
      example: '5712566172571652'
    NextStartAfter:
      type: string
      description: Provides a value to be used as a startAfter in next page request.
      example: '5712566172571652'
    PageTotal:
      description: Total number of items which can be paged.
      example: '67'
      type: integer
    ConfigurationId:
      type: string
      description: Uniquely identifies a configuration.
      example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
    ConfigurationName:
      type: string
      description: Display name for a configuration.
      example: Client configuration.
    CreatedAt:
      type: string
      description: Date of creation (ISO 8601-compliant).
      example: '2025-08-29T09:47:35Z'
    ModifiedAt:
      type: string
      description: Date of modification (ISO 8601-compliant).
      example: '2025-08-29T09:47:35Z'
    CreatedBy:
      type: string
      description: Creator of a resource.
      example: '76248934691294444'
    WorkspaceId:
      type: string
      description: Uniquely identifying ID of the workspace.
      example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4
    HttpStatusCode:
      type: integer
      description: RFC 7231 status code for this error.
      example: '400'
    HttpStatusTechnicalKey:
      type: string
      description: Technical key describing the status or error
      example: OK
    StatusDetailsMessageId:
      type: integer
      description: 9-digit code which is uniquely identifying a message
      example: 200000004
    StatusDetailsMessage:
      type: string
      description: Human-readable message which may also be presented in user interface.
      example: Business Partner Name is mandatory.
    StatusDetailsTechnicalKey:
      type: string
      description: Technical key to uniquely identify a message.
      example: JOB_FINISHED
    JsonPath:
      type: string
      description: JSONPath as specified by the IETF standard
      example: $.businessPartner.names[0].value
    schemas-JsonObject:
      type: string
      description: Object provided in plain JSON format.
      example: '{ "key" : "value"}'
      additionalProperties: true
    HttpPath:
      type: string
      description: Requested path which caused this error.
      example: /v2/businesspartners/lookup
    StatusTimestamp:
      type: string
      description: ISO 8601 representation of the timestamp.
      example: '2025-08-29T09:47:35Z'
    PageSize:
      type: integer
      description: Number of items per page.
      example: '100'
      default: 10
      minimum: 1
      maximum: 1000
    Page:
      type: integer
      description: Current page number.
      example: '1'
      default: 0
      minimum: 0
    ModifiedBy:
      type: string
      description: User or Client UUID which modified the resource.
      example: '76248934691294444'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
