# Update Data Mapper Definition

Update a Data Mapper Definition. For more information what are the allowed Data Mapper values, go to creation endpoint description.

Endpoint: PUT /datamapperdefinitions/{id}
Version: 5
Security: apiKey

## Path parameters:

  - `id` (string, required)
    Unique ID of the Data Mapper Definition.
    Example: "6440dba32b30176c5917b1b7"

## Request fields (application/json):

  - `name` (string, required)
    Name of the Data Mapper Definition.
    Example: "Custom Data Mapper Definition"

  - `labels` (array)
    Labels to categorize the Data Mapper Definition.
    Example: ["Custom Data Mapper Label"]

  - `shareWithOrganization` (boolean)
    Toggle to enable that the Data Mapper Definition is shared with the whole organization.
    Example: "true"

  - `valueMappings` (array)
    List of value mappings.

  - `valueMappings.sourceValue` (string)
    The source value for a value mapping.
    Example: "en"

  - `valueMappings.targetValue` (string)
    The target value for a value mapping.
    Example: "INTERNATIONAL"

  - `valueMappings.targetAttribute` (string)
    The target attribute value (Business Partner or address) in the CDQ data model.
    Example: "address.version.characterSet"

  - `inputMapping` (object, required)
    Maps a Business Partner data from raw data to CDQ data model.

  - `inputMapping.businessPartnerAttributeMappings` (array)
    List of Business Partner Attribute Mappings.

  - `inputMapping.businessPartnerAttributeMappings.sourceConstant` (string)
    Assigns a fix value at path defined in targetAttributes.
    Example: "LOCAL"

  - `inputMapping.businessPartnerAttributeMappings.sourceAttributes` (array)
    List of source attributes.
    Example: ["Name"]

  - `inputMapping.businessPartnerAttributeMappings.targetAttributes` (array)
    List of target attributes.
    Example: ["businessPartner.names[0].value"]

  - `inputMapping.businessPartnerAttributeMappings.targetAttributeTypes` (array)
    List of target attribute types.
    Example: ["LOCAL"]

  - `inputMapping.businessPartnerAttributeMappings.countryScopes` (array)
    List of country scopes.
    Example: ["DE"]

  - `inputMapping.businessPartnerAttributeMappings.selectionType` (string)
    Defines how attribute values should be concatenated.
    Enum: "COMMA", "EMPTY", "HYPHEN", "SEMICOLON", "SPACE", "XOR"

  - `inputMapping.businessPartnerAttributeMappings.separationType` (string)
    Define how the source value should be separated.
    Enum: "LENGTH"

  - `inputMapping.businessPartnerAttributeMappings.isMandatoryAttribute` (boolean)
    Define if the attribute is mandatory or optional.
If true, the attribute is mandatory.
If false, the attribute is optional.
    Example: "true"

  - `inputMapping.businessPartnerAttributeMappings.valueMapping` (string)
    Maps a cons from raw data to CDQ data model.
    Example: "INTERNATIONAL"

  - `inputMapping.businessPartnerAttributeMappings.defaultValue` (string)
    Defines default values applied for fields, for which no value was provided.
    Example: "GB"

  - `inputMapping.businessPartnerAttributeMappings.transformations` (array)
    List of transformations.

  - `inputMapping.businessPartnerAttributeMappings.transformations.type` (string)
    Define the Transformation Type.
    Enum: "UPPER_CASE", "LOWER_CASE"

  - `inputMapping.businessPartnerAttributeMappings.transformations.parameters` (array)
    Depending on the Transformation Type different parameters can be given.

  - `inputMapping.businessPartnerAttributeMappings.transformations.parameters.key` (string)
    Transformation parameter key.
    Example: "transformationName"

  - `inputMapping.businessPartnerAttributeMappings.transformations.parameters.value` (string)
    Value of the parameter.
    Example: "lv_locality_transformation"

  - `inputMapping.addressesAttributeMappings` (array)
    Maps an address attribute from raw data to CDQ data model.

  - `outputMapping` (object)
    Maps a Business Partner data from raw data to CDQ data model.

  - `customTransformations` (array)
    [Private Content](# "cdq-badge private-content") 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 be always provided. Feature is experimental

  - `customTransformations.name` (string)
    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]"
     }
  ]
...
  "inputMapping": {
    "businessPartnerAttributeMappings": [
      {
        "sourceAttributes": [
          "businessPartner.record"
        ], // when all raw data should be provided then use $
        "targetAttributes": [
          "businessPartner.externalId"
        ],
        "transformations": [
          {
            "type" : "CUSTOM",
            "parameters": [
              {
                "key" : "transformationName",
                "value" : "lv_locality_transformation"
              }
            ]
          }
        ]
      },
      {
        "sourceAttributes": [
            "businessPartner.record"
        ],
        "targetAttributes": [
          "address.localities[0].value"
        ],
        "transformations": [
          {
            "type" : "CUSTOM",
            "parameters": [
              {
                "key" : "transformationName",
                "value" : "lv_locality_transformation"
              }
            ]
          }
        ]
      },
    {
      "sourceAttributes": [
          "businessPartner.record" or "$"
      ],
      "targetAttributes": [
          "address.thoroughfare[0].value",
          "address.thoroughfare[1].value"
      ],
      "transformations": [
        {
          "type" : "CUSTOM",
          "parameters": [
            {
              "key" : "transformationName",
              "value" : "lv_thoroughfare_transformation"
            }
          ]
        }
      ]
    }
    ]
  }

}
    Example: "lv_locality_transformation"

  - `customTransformations.code` (string)
    The code of the given script.
    Example: "{Script example in the description.}"

## Response 200 fields (application/json):

  - `id` (string)
    ID of related Data Mapper Definition that is used for mapping data of this Business Partner Storage.
    Example: "6440dba32b30176c5917b1b7"

  - `createdAt` (string)
    Date of creation (ISO 8601-compliant).
    Example: "2026-06-03T12:58:32Z"

  - `createdBy` (string)
    Creator of a resource.
    Example: "76248934691294444"

  - `modifiedAt` (string)
    Date of modification (ISO 8601-compliant).
    Example: "2026-06-03T12:58:32Z"

  - `modifiedBy` (string)
    User or Client UUID which modified the resource.
    Example: "76248934691294444"

  - `creatorUsername` (string)
    Username of the creator of the Data Mapper Definition.
    Example: "john.doe"

  - `creatorOrganization` (string)
    Organization of the creator of the Data Mapper Definition.
    Example: "cdq"

  - `shareWithOrganization` (boolean)
    Toggle to enable that the Data Mapper Definition is shared with the whole organization.
    Example: "true"

  - `labels` (array)
    List of labels.
    Example: ["Custom Storage Name"]

  - `name` (string)
    Name of the Data Mapper Definition.
    Example: "Custom name of Data Mapper"

  - `valueMappings` (array)
    List of Value Mappings.

  - `customTransformations` (array)
    [Private Content](# "cdq-badge private-content") 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 be always provided. Feature is experimental

  - `inputMapping` (object)
    Maps a Business Partner data from raw data to CDQ data model.

  - `outputMapping` (object)
    Maps a Business Partner data from raw data to CDQ data model.

  - `lastUpdatedAt` (string)
    Deprecated, please use modifiedAt instead.
    Example: "2026-06-03T12:58:32Z"


