PUT /organizations/elements/{keyOrId}/transformations/{objectName}

PUT /organizations/elements/{keyOrId}/transformations/{objectName}

Replace a default organization-level transformation of an adapter for a specific common resource. Replacing fields removes existing transformations, but not the common resources.

Path Parameters

keyOrId
The adapter key, usually a lowercase version of the adapter name, or the adapter id, which is a numeric identifier of the adapter.
objectName
The name of the common resource.

Request Body Parameters

level
The level of the specified account, either organization, account, or instance.
Optional
objectName
An object containing the field names and data types of the common resource.
Optional
vendorName
The API provider's name of the resource that is mapped to the common resource.
Required
fields
An object containing the field names and data types of the common resource.
Required
level
The level at which the mapping exists, either organization, account, or instance.
With an account-level API request, you can use only accountor instance.
Optional
fields.type
The data type of the field.
Required
fields.path
The name of the field.
Required
fields.vendorPath
The API provider's field name that the path is mapped to.
Required
fields.level
The level at which the mapping exists, either organization, account, or instance.
With an account-level API request, you can use only accountor instance.
Required
configuration
An object containing the configuration of the common resource.
Optional
configuration.properties
An object containing the configuration properties of the common resource.
Optional
configuration.type
The type of configuration. passThrough is the configuration for removing unmapped fields while inherit is a legacy configuration.
Optional
configuration.properties.key
Configuration properties of the transformation.
For passThrough, properties are:
"properties":{  
  "fromVendor":false,
  "toVendor":false
  }
For inherit, use only false or no value.
Optional

Example Request

curl -X PUT \ 
  https://api-us.integrate.sugarapps.com/elements/api-v2/organizations/elements/sfdc/transformations/myContacts \ 
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'Content-Type:application/json' \ 
  -d '{  
  "vendorName":"Contact",
  "fields":[  
    {  
      "type":"string",
      "path":"salutation",
      "vendorPath":"Salutation"
    }
  ],
  "configuration":[  
    {  
      "type":"passThrough",
      "properties":{  
        "fromVendor":false,
        "toVendor":false
      }
    }
  ]
}'

Example Response

{  
  "myContacts":{  
    "level":"organization",
    "objectName":"myContacts",
    "vendorName":"Contact",
    "startDate":"2018-03-07 16:50:32.223761",
    "fields":[  
      {  
        "type":"string",
        "path":"salutation",
        "vendorPath":"Salutation",
        "level":"account"
      }
    ],
    "configuration":[  
      {  
        "type":"passThrough",
        "properties":{  
          "fromVendor":false,
          "toVendor":false
        }
      },
      {  
        "type":"inherit"
      }
    ],
    "isLegacy":false
  }
}