This API provides services to upload, manipulate and download businesspartner data in the CDL Cloud.
Data Exchange API (5)
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/
https://api.corporate-data-league.ch/data-exchange/soap/v5/
https://api.corporate-data-league.ch/data-exchange/
Request
Create a Data Mapper Definition which is used to map data (i.e. in the format from the database) to the CDQ data model.
Data mapper definition consists of:
inputMapping- definition how to mapbusinessPartner.recordto CDQ data modeloutputMapping- definition how to map CDQ data model to the target model
Business partner can be mapped via businessPartnerAttributeMappings. The following values of attribute mapping rules:
- as targetAttributes for inputMapping
- as sourceAttributes for outputMapping (please remember they are case sensitive)
can be mapped to Business Partner attributes:
- businessPartner.dataSource
- businessPartner.externalId
- businessPartner.disclosed - special attribute. When defined in a mapping, takes over the decision for disclosing records in data source this Data Mapper Definition is assigned to. When source attribute is mapped from record, the mapping takes the value. If the attribute is missing, disclosed is set to false.
- businessPartner.names[0-10].value
- businessPartner.names[0-10].shortName
- businessPartner.names[0-10].language
- businessPartner.names[0-10].type
- businessPartner.names
- businessPartner.legalForm.name
- businessPartner.legalForm.categories[0-4].technicalKey
- businessPartner.categories
- businessPartner.identifiers[0-49].value
- businessPartner.identifiers[0-49].type
- businessPartner.identifiers[0-49].issuingBody.name
- businessPartner.identifiers[0-49].issuingBody - mapped to issuingBody.technicalKey
- businessPartner.identifiers[0-49].status
- businessPartner.identifiers
- businessPartner.externalContext.identifiers[0-49].value
- businessPartner.externalContext.identifiers[0-49].type
- businessPartner.externalContext.identifiers
The index of typed concepts: names and identifiers, is not a final position of concept in the CDQ data model - this is a grouping indicator for a set of concept properties.
In Names mapping, in case none of names is typed LOCAL and exists any name with empty type or not filled type.technicalKey, it becomes name of type LOCAL.
Addresses can be mapped via addressesAttributeMappings. Address receives id property coming from an index of the collection of AttributeMappingRules. The following values of attribute mapping rules
- as targetAttributes for inputMapping
- as sourceAttributes for outputMapping
can be mapped to address attributes:
- address.externalId
- address.version.language
- address.version.characterSet
- address.careOf.value
- address.identifyingName.value
- address.country.value
- address.country.shortName
- address.administrativeAreas
- address.administrativeAreas[0-4].value
- address.administrativeAreas[0-4].shortName
- address.administrativeAreas[0-4].type
- address.postCodes
- address.postCodes[0-4].value
- address.postCodes[0-4].type
- address.localities
- address.localities[0-4].value
- address.localities[0-4].shortName
- address.localities[0-4].type
- address.thoroughfares
- address.thoroughfares[0-4].value
- address.thoroughfares[0-4].shortName
- address.thoroughfares[0-4].number
- address.thoroughfares[0-4].type
- address.premises
- address.premises[0-4].value
- address.premises[0-4].shortName
- address.premises[0-4].number
- address.premises[0-4].type
- address.postalDeliveryPoints
- address.postalDeliveryPoints[0-4].value
- address.postalDeliveryPoints[0-4].shortName
- address.postalDeliveryPoints[0-4].number
- address.postalDeliveryPoints[0-4].type
- address.geographicCoordinates.latitude
- address.geographicCoordinates.longitude
- address.contexts
- address.contexts[0-4]
Request to create a new Data Mapper Definition.
Labels to categorize the Data Mapper Definition.
Toggle to enable that the Data Mapper Definition is shared with the whole organization.
Maps a Business Partner data from raw data to CDQ data model.
Maps a Business Partner data from raw data to CDQ data model.
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_dataTo 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
- Mock server
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions
- Production SOAP
https://api.corporate-data-league.ch/data-exchange/soap/v5/public/datamapperdefinitions
- Production
https://api.corporate-data-league.ch/data-exchange/public/datamapperdefinitions
curl -i -X POST \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions \
-H 'Content-Type: application/json' \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
-d '{
"name": "CustomDataMapperDefinition",
"labels": [
"CustomDataMapperLabel"
],
"shareWithOrganization": true,
"valueMappings": [
{
"sourceValue": "en",
"targetValue": "INTERNATIONAL",
"targetAttribute": "address.version.characterSet"
}
],
"inputMapping": {
"businessPartnerAttributeMappings": [
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
{}
]
}
]
}
],
"addressesAttributeMappings": [
[
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
null
]
}
]
}
]
]
},
"outputMapping": {
"businessPartnerAttributeMappings": [
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
{}
]
}
]
}
],
"addressesAttributeMappings": [
[
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
null
]
}
]
}
]
]
}
}'OK
ID of related Data Mapper Definition that is used for mapping data of this Business Partner Storage.
Date of modification (ISO 8601-compliant).
User or Client UUID which modified the resource.
Toggle to enable that the Data Mapper Definition is shared with the whole organization.
List of labels.
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_dataTo 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
Maps a Business Partner data from raw data to CDQ data model.
Maps a Business Partner data from raw data to CDQ data model.
{ "id": "6440dba32b30176c5917b1b7", "createdAt": "2020-08-31T16:47+00:00", "createdBy": "76248934691294444", "lastUpdatedAt": "2020-08-31T16:47+00:00", "modifiedAt": "2020-08-31T16:47+00:00", "modifiedBy": "76248934691294444", "creatorUsername": "john.doe", "creatorOrganization": "cdq", "shareWithOrganization": "true", "labels": [ "Custom Storage Name" ], "name": "Custom name of Data Mapper", "valueMappings": [ { … } ], "customTransformations": [ { … } ], "inputMapping": { "businessPartnerAttributeMappings": [ … ], "addressesAttributeMappings": [ … ] }, "outputMapping": { "businessPartnerAttributeMappings": [ … ], "addressesAttributeMappings": [ … ] } }
- Mock server
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions
- Production SOAP
https://api.corporate-data-league.ch/data-exchange/soap/v5/public/datamapperdefinitions
- Production
https://api.corporate-data-league.ch/data-exchange/public/datamapperdefinitions
curl -i -X GET \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'{ "numberOfPages": "10", "page": "1", "pageSize": "100", "total": "67", "values": [ { … } ] }
- Mock server
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions/{id}
- Production SOAP
https://api.corporate-data-league.ch/data-exchange/soap/v5/public/datamapperdefinitions/{id}
- Production
https://api.corporate-data-league.ch/data-exchange/public/datamapperdefinitions/{id}
curl -i -X GET \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions/6440dba32b30176c5917b1b7 \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'OK
ID of related Data Mapper Definition that is used for mapping data of this Business Partner Storage.
Date of modification (ISO 8601-compliant).
User or Client UUID which modified the resource.
Toggle to enable that the Data Mapper Definition is shared with the whole organization.
List of labels.
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_dataTo 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
Maps a Business Partner data from raw data to CDQ data model.
Maps a Business Partner data from raw data to CDQ data model.
{ "id": "6440dba32b30176c5917b1b7", "createdAt": "2020-08-31T16:47+00:00", "createdBy": "76248934691294444", "lastUpdatedAt": "2020-08-31T16:47+00:00", "modifiedAt": "2020-08-31T16:47+00:00", "modifiedBy": "76248934691294444", "creatorUsername": "john.doe", "creatorOrganization": "cdq", "shareWithOrganization": "true", "labels": [ "Custom Storage Name" ], "name": "Custom name of Data Mapper", "valueMappings": [ { … } ], "customTransformations": [ { … } ], "inputMapping": { "businessPartnerAttributeMappings": [ … ], "addressesAttributeMappings": [ … ] }, "outputMapping": { "businessPartnerAttributeMappings": [ … ], "addressesAttributeMappings": [ … ] } }
Request
Update a Data Mapper Definition. For more information what are the allowed Data Mapper values, go to creation endpoint description.
Request to create a new Data Mapper Definition.
Labels to categorize the Data Mapper Definition.
Toggle to enable that the Data Mapper Definition is shared with the whole organization.
Maps a Business Partner data from raw data to CDQ data model.
Maps a Business Partner data from raw data to CDQ data model.
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_dataTo 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
- Mock server
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions/{id}
- Production SOAP
https://api.corporate-data-league.ch/data-exchange/soap/v5/public/datamapperdefinitions/{id}
- Production
https://api.corporate-data-league.ch/data-exchange/public/datamapperdefinitions/{id}
curl -i -X PUT \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions/6440dba32b30176c5917b1b7 \
-H 'Content-Type: application/json' \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3' \
-d '{
"name": "CustomDataMapperDefinition",
"labels": [
"CustomDataMapperLabel"
],
"shareWithOrganization": true,
"valueMappings": [
{
"sourceValue": "en",
"targetValue": "INTERNATIONAL",
"targetAttribute": "address.version.characterSet"
}
],
"inputMapping": {
"businessPartnerAttributeMappings": [
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
{}
]
}
]
}
],
"addressesAttributeMappings": [
[
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
null
]
}
]
}
]
]
},
"outputMapping": {
"businessPartnerAttributeMappings": [
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
{}
]
}
]
}
],
"addressesAttributeMappings": [
[
{
"sourceConstant": "LOCAL",
"sourceAttributes": [
"Name"
],
"targetAttributes": [
"businessPartner.names[0].value"
],
"targetAttributeTypes": [
"LOCAL"
],
"countryScopes": [
"DE"
],
"selectionType": "COMMA",
"separationType": "LENGTH",
"isMandatoryAttribute": "true",
"valueMapping": "INTERNATIONAL",
"defaultValue": "GB",
"transformations": [
{
"type": "UPPER_CASE",
"parameters": [
null
]
}
]
}
]
]
}
}'OK
ID of related Data Mapper Definition that is used for mapping data of this Business Partner Storage.
Date of modification (ISO 8601-compliant).
User or Client UUID which modified the resource.
Toggle to enable that the Data Mapper Definition is shared with the whole organization.
List of labels.
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_dataTo 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
Maps a Business Partner data from raw data to CDQ data model.
Maps a Business Partner data from raw data to CDQ data model.
{ "id": "6440dba32b30176c5917b1b7", "createdAt": "2020-08-31T16:47+00:00", "createdBy": "76248934691294444", "lastUpdatedAt": "2020-08-31T16:47+00:00", "modifiedAt": "2020-08-31T16:47+00:00", "modifiedBy": "76248934691294444", "creatorUsername": "john.doe", "creatorOrganization": "cdq", "shareWithOrganization": "true", "labels": [ "Custom Storage Name" ], "name": "Custom name of Data Mapper", "valueMappings": [ { … } ], "customTransformations": [ { … } ], "inputMapping": { "businessPartnerAttributeMappings": [ … ], "addressesAttributeMappings": [ … ] }, "outputMapping": { "businessPartnerAttributeMappings": [ … ], "addressesAttributeMappings": [ … ] } }
- Mock server
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions/{id}
- Production SOAP
https://api.corporate-data-league.ch/data-exchange/soap/v5/public/datamapperdefinitions/{id}
- Production
https://api.corporate-data-league.ch/data-exchange/public/datamapperdefinitions/{id}
curl -i -X DELETE \
-u <username>:<password> \
https://idp.cdq.com/_mock/apis/data-exchange-api/api-v5/public/datamapperdefinitions/6440dba32b30176c5917b1b7 \
-H 'X-Credential-Username: 87b1bdb1-ba87-4522-b363-c5a0e6e917b3'