Unify and manage your data

RDM Lookups API

Overview of the RDM Lookups API

The RDM Lookups API allows you to create lookup types that are consistent across industries and applications. You can also list lookup codes by tenant and URIs, scan the database, update and delete Lookup codes, get lookup codes by applying search filters or facet search, and scan the database with filters. Only ROLE_ADMIN_TENANT_{{tenant}} or ROLE_ADMIN_CUSTOMER_{{Customer}} or ROLE_RDM_EDIT has access to these APIs.

Lookup Code Description

{
	"lookupType": "lookupTypes/Country",
	"code": "US",
	"updatedBy": "Sergei.Ionin",
	"updateDate": 123456789,
	"version": 123456789,
	"enabled": true,
	"startDate": 0,
	"endDate": 123456789000,
	"parents": ["rdm/Continent/NA",...],
	"sourceMappings": [{
		"source": "AMS",
		"mappings": [{
			"code": "Am",
			"value": "America",
			"canonicalValue": false
		}, {
			"code": "0341",
			"value": "United States",
			"downStreamDefaultValue": true
		}]
	}, {
		"source": "ABCD",
		"mappings": [{
			"code": "1",
			"value": "United States",
			"canonicalValue": true
		}]
	}],
	"localization": [{
		"languageCode": "fr-ca",
		"value": "Etats-Unis d'Amerique",
		"description": "..."
	}, {
		"languageCode": "es-mx",
		"value": "Estados Unidos de America",
		"description": "..."
	}]
	}

Setting a Default Value

You can set a default value of LoV bounded fields. Use the downStreamDefaultValue property. If set to true, the code and value become the default values for that source. Only one value can be set to true per source.

Note: This is applicable only for reverse transcoding when there are several values/codes for the same source. For more information on reverse transcoding, see Transcode API.
Here is an example of setting the one default value:
"sourceMappings": [
        {
          "source": "Reltio",
          "values": [
            {
              "code": "US",
              "value": "USA",
              "enabled": true,
              "canonicalValue": true,
              "downStreamDefaultValue": true,
              "description": "its description"
            },
...
Example:
[
  {
    "uri": "rdm_tenant_name/Country/US",
    "value": {
      "tenantId": "rdm_tenant_name",
      "updatedBy": "anton.artemyev",
      "updateDate": 1488465334673,
      "version": 3,
      "type": "rdm/lookupTypes/Country",
      "code": "US",
      "enabled": true,
      "sourceMappings": [
        {
          "source": "Reltio",
          "values": [
            {
              "code": "US",
              "value": "USA",
              "enabled": true,
              "canonicalValue": true,
              "downStreamDefaultValue": true,
              "description": "some description"
            },
            {
              "code": "Am",
              "value": "America",
              "enabled": true,
              "canonicalValue": false,
              "downStreamDefaultValue": false
            }
          ]
        },
        {
          "source": "FB",
          "values": [
            {
              "code": "1",
              "value": "United States",
              "enabled": true,
              "canonicalValue": false,
              "downStreamDefaultValue": true
            }
          ]
        }
      ],
      "localizations": [
        {
          "languageCode": "es-mx",
          "value": "Estados Unidos de America",
          "description": "some description"
        },
        {
          "languageCode": "fr-ca",
          "value": "Etats-Unis d'Amerique",
          "description": "..."
        }
      ],
      "parents": [],
      "attributes": [
        {
          "name": "Continent",
          "value": "North America"
        },
        {
          "name": "Population",
          "value": "324947000"
        }
      ],
      "startDate": 0,
      "endDate": 0
    }
  }
]
Table 1. Description
FieldDescriptionCreate Lookup Value Required
uriFull URI of lookup code.No
valueYes
tenantIdRDM tenant name.Yes
updatedByThe user who last made the changes.No
updateDateDate of last update.No
versionCurrent version.No
typeType of Lookup code.Yes
codeLookup code.Yes
enabledNo
sourceMappingsList of codes and values from different sources.Yes
sourceYes
valuesList of codes and values from one source.Yes
codeLookup code in certain source.Yes
valueLookup value in certain source.Yes
enabledNo
canonicalValueSet to true if you want to make this source code and value canonical (but only one canonical may be made per one Lookup code).No
downStreamDefaultValueSet to true if you want to make this code and value for one source default (but only one value may be set true for one source).No
descriptionSome description.No
localizationNo
languageCodeCode of localization.Yes
valueName of this value on this localization.Yes
descriptionNo
parentsNo
attributesList of attribute values with the type of Lookup code.No
nameAttribute name.No
valueAttribute value.No
startDateNo
endDateNo

Data API

List lookup codes for tenant

Request:

GET https://{{rdm-service}}/lookups/rdm_tenant_name
Authorization: Bearer {{token}}

Response:

[
  {
    "tenantId": "rdm_tenant_name",
    "updatedBy": "anton.artemyev",
    "updateDate": 1488465334673,
    "version": 3,
    "type": "rdm/lookupTypes/Country",
    "code": "US",
    "enabled": true,
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "US",
            "value": "USA",
            "enabled": true,
            "canonicalValue": true,
            "downStreamDefaultValue": true
          },
          {
            "code": "Am",
            "value": "America",
            "enabled": true,
            "canonicalValue": false,
            "downStreamDefaultValue": false
          }
        ]
      },
      {
        "source": "FB",
        "values": [
          {
            "code": "1",
            "value": "United States",
            "enabled": true,
            "canonicalValue": false,
            "downStreamDefaultValue": true
          }
        ]
      }
    ],
    "localizations": [
      {
        "languageCode": "es-mx",
        "value": "Estados Unidos de America",
        "description": "some description"
      },
      {
        "languageCode": "fr-ca",
        "value": "Etats-Unis d'Amerique",
        "description": "..."
      }
    ],
    "parents": [],
    "attributes": [
      {
        "name": "Continent",
        "value": "North America"
      },
      {
        "name": "Population",
        "value": "324947000"
      }
    ],
    "startDate": 0,
    "endDate": 0
  },
  {
    "tenantId": "rdm_tenant_name",
    "updatedBy": "anton.artemyev",
    "updateDate": 1488465458384,
    "version": 1,
    "type": "rdm/lookupTypes/State",
    "code": "AR",
    "enabled": true,
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true,
            "canonicalValue": true,
            "downStreamDefaultValue": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
      "rdm/lookupTypes/Country/US"
    ],
    "startDate": 0,
    "endDate": 0
  }
]

List lookup codes for tenants by type

Request:

GET https://{{rdm_uri}}/lookups/rdm_tenant_name/State
Authorization: Bearer {{token}}

Response:

[
  {
    "tenantId": "rdm_tenant_name",
    "updatedBy": "anton.artemyev",
    "updateDate": 1488465458384,
    "version": 1,
    "type": "rdm/lookupTypes/State",
    "code": "AR",
    "enabled": true,
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true,
            "canonicalValue": true,
            "downStreamDefaultValue": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
      "rdm/lookupTypes/Country/US"
    ],
    "attributes": [
      {
        "name": "Population",
        "value": "3000942"
      }
    ],
    "startDate": 0,
    "endDate": 0
  }
]

By URIs

Request:

POST https://{{rdm_uri}}/lookups/rdm_tenant_name/_byUris
Authorization: Bearer {{token}}
 
{
    "uris" : [
        "rdm_tenant_name/State/AR",
        "rdm_tenant_name/State/CA",
        "rdm_tenant_name/State/KA",
        ...
    ]
}

Response:

[
  {
    "tenantId": "rdm_tenant_name",
    "updatedBy": "anton.artemyev",
    "updateDate": 1488465458384,
    "version": 1,
    "type": "rdm/lookupTypes/State",
    "code": "AR",
    "enabled": true,
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true,
            "canonicalValue": true,
            "downStreamDefaultValue": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
      "rdm/lookupTypes/Country/US"
    ],
    "attributes": [
      {
        "name": "Population",
        "value": "3000942"
      }
    ],
    "startDate": 0,
    "endDate": 0
  },
  ...
]

DB Scan

Request:

POST https://{{rdm_uri}}/lookups/rdm_tenant_name/_dbscan?limit=100
Authorization: Bearer {{token}}
 
ClwSVmoNcH5wcm9kLTE1NTQyMnIuCxIKT2Z5UkRWYWx1ZSIeYldQUkNMeHNERXhjbnJyL1NwZWNpYWx0eS8xMTg3DKIBFERBVEFfYldQUkNMeHNERXhjbnJyGAAgAA

Response:

[
  "scrollId": "CokBEoIBag9wfEFfQmlnVGVuYW50NTAwaxgAIAA",
  "values": [
  {
    "tenantId": "rdm_tenant_name",
    "updatedBy": "anton.artemyev",
    "updateDate": 1488465458384,
    "version": 1,
    "type": "rdm/lookupTypes/State",
    "code": "AR",
    "enabled": true,
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true,
            "canonicalValue": true,
            "downStreamDefaultValue": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
      "rdm/lookupTypes/Country/US"
    ],
    "attributes": [
      {
        "name": "Population",
        "value": "3000942"
      }
    ],
    "startDate": 0,
    "endDate": 0
  }
 ]
]	

Create Lookup Code

Request (for one type):

POST https://{{rdm-service}}/lookups/rdm_tenant_name/State
Authorization: Bearer {{token}}
[
  {
    "tenantId": "rdm_tenant_name",
    "enabled": true,
    "code": "AR",
    "type": "rdm/lookupTypes/State",
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
        "rdm/lookupTypes/Country/US"
    ],
    "attributes": [
      {
        "name": "Population",
        "value": "3000942"
      }
    ]
  },
    ...(max 100 codes in one request)...
]

Request (Different Types):

POST https://{{rdm-service}}/lookups/rdm_tenant_name
Authorization: Bearer {{token}}
[
  {
    "tenantId": "rdm_tenant_name",
    "enabled": true,
    "code": "AR",
    "type": "rdm/lookupTypes/State",
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
        "rdm/lookupTypes/Country/US"
    ],
    "attributes": [
      {
        "name": "Population",
        "value": "3000942"
      }
    ]
  },
    ...(max 100 codes in one request)...
]

Response:

  [
  {
    "uri": "rdm_tenant_name/State/AR",
    "value": {
      "tenantId": "rdm_tenant_name",
      "updatedBy": "anton.artemyev",
      "updateDate": 1488465740166,
      "version": 3,
      "type": "rdm/lookupTypes/State",
      "code": "AR",
      "enabled": true,
      "sourceMappings": [
        {
          "source": "Reltio",
          "values": [
            {
              "code": "AR",
              "value": "Arkansas",
              "enabled": true,
              "canonicalValue": true,
              "downStreamDefaultValue": true
            }
          ]
        }
      ],
      "localizations": [],
      "parents": [
        "rdm/lookupTypes/Country/US"
      ],
      "attributes": [
        {
          "name": "Population",
          "value": "3000942"
        }
      ],
      "startDate": 0,
      "endDate": 0
    }
  }
],
...

Get Lookup Code

Request:

GET https://{{rdm-service}}/lookups/rdm_tenant_name/State/AR
Authorization: Bearer {{token}}

Response:

{
  "tenantId": "rdm_tenant_name",
  "updatedBy": "anton.artemyev",
  "updateDate": 1488465740166,
  "version": 3,
  "type": "rdm/lookupTypes/State",
  "code": "AR",
  "enabled": true,
  "sourceMappings": [
    {
      "source": "Reltio",
      "values": [
        {
          "code": "AR",
          "value": "Arkansas",
          "enabled": true,
          "canonicalValue": true,
          "downStreamDefaultValue": true
        }
      ]
    }
  ],
  "localizations": [],
  "parents": [
    "rdm/lookupTypes/Country/US"
  ],
  "attributes": [
    {
      "name": "Population",
      "value": "3000942"
    }
  ],
  "startDate": 0,
  "endDate": 0
}

Search Filters

Max 1000 results (GAE limitation)

Request
GET https://{{rdm-service}}/lookups/rdm_tenant_name?filter=equals(type,'State')&sort=code&order=asc
Authorization: Bearer {{token}}
Table 2. Search Filter Properties
Filter PropertiesDescription
typeLookup type name
codeLookup code
valueCanonical value
enabledEnabled/disabled flag
updateDatelast lookup update date
updatedByThe user who last made the changes.
versionCurrent version
startDateLookup code start date
endDateLookup code end date
localizationlocalized value
sourceMappings.sourceSource system in mappings
sourceMappings.values.codeSource code in mappings
sourceMappings.values.valueSource value in mappings
localizations.languageCodeLanguage code in localizations
localizations.valueLocalized value in localizations
attributes.nameAttribute name
attributes.valueAttribute value

Sorting

Same properties as for search filter.

Ordering
Table 3. Ordering
OrderDescription
ascA to Z, 0 to 9
descZ to A, 9 to 0
Table 4. Filter Operators
Filter OperatorsDescription
equals(property, value)exact match condition ignoring case
fullText(property, value)combines results into the overall result. Any entity whose title field contains at least one of the specified terms will match the query. The more terms that match, the more relevant the entity
startsWith(property, stricted value)prefix condition; returns entities that have condition property starting with condition value
contains(property, tokenized value)

prefix condition; returns entities that have condition property starting with condition value

lt(property, value)'less than' condition
lte(property, value)'less than or equals' condition
gt(property, value)'greater than' condition
gte(property, value)'greater than' or equals condition
missing(property) returns entities with fields that have no values for 'property' or 'property' value is empty
exists(property)

returns entities having some value for 'property'

inSameAttributeValue (subquery on sourceMappings/localizations/attributes)Returns the entities that have all values matching to subquery in one single sourceMappings, localizations, or attributes value.
Note: The subquery supports all operands except inSameAttributeValue. All these operands must have sub attributes of one sourceMappings/localizations/attributes value.

For example, sub attribute from type and sourceMappings.source cannot be used inside one inSameAttributeValue query.

Example:

filter=inSameAttributeValue(equals(sourceMappings.source,”Salesforce”) AND equals(sourceMappings.values.value, “United States”))

Filter by localized values

Filter operators for localization property take language from Accept-Language HTTP header and apply this operators to values from localizations of lookups for specified language.

The following query is used to get lookups:

filter=equals(localizations.languageCode,'en-us') OR contains(localizations.value,'United'))
filter=inSameAttributeValue(equals(localizations.languageCode,'en-us') AND equals(localizations.value,'USA')))

Scan with Filter

Request:
POST https://{{rdm_uri}}/lookups/rdm_tenant_name/_scan?limit=100&filter=equals(type,'State')&sort=code&order=asc
Authorization: Bearer {{token}}
 
{{scroll_id}}
Response:
[
  "scrollId": "CokBEoIBag9wfEFfQmlnVGVuYW50NTAwaxgAIAA",
  "values": [
  {
    "tenantId": "rdm_tenant_name",
    "updatedBy": "anton.artemyev",
    "updateDate": 1488465458384,
    "version": 1,
    "type": "rdm/lookupTypes/State",
    "code": "AR",
    "enabled": true,
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true,
            "canonicalValue": true,
            "downStreamDefaultValue": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
      "rdm/lookupTypes/Country/US"
    ],
    "attributes": [
      {
        "name": "Population",
        "value": "3000942"
      }
    ],
    "startDate": 0,
    "endDate": 0
  }
 ]
]

Facet Search

Facet search calculates the number of searched records for lookups.

Request
GET https://{{rdm_uri}}/unmapped/rdm_tenant_name/_facets?facet=source&filter=equals(type,'State')
Authorization: Bearer {{token}}
Table 5. Parameters
NameRequiredDescription
facetNoComma-separated list of facets to return. If this parameter is not specified, then all the facets will be returned.

The available facets are - source and type.

filterNo

Support all filter functions and operators as described above.

maxNoThe number of terms to return. The default value is 0.
Response
{
  "source": {
    "Reltio": 1624,
    "Salesforce": 379,
    "Global": 621,
  },
  "type": {
    "rdm/lookupTypes/Country": 253,
    "rdm/lookupTypes/State": 987
  }
}

Update Lookup Code

Request:

PUT https://{{rdm-service}}/lookups/rdm_tenant_name/State/AR
Authorization: Bearer {{token}}
{
    "tenantId": "rdm_tenant_name",
    "enabled": true,
    "code": "AR",
    "type": "rdm/lookupTypes/State",
    "sourceMappings": [
      {
        "source": "Reltio",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true
          }
        ]
      },
      {
        "source": "FB",
        "values": [
          {
            "code": "AR",
            "value": "Arkansas",
            "enabled": true
          }
        ]
      }
    ],
    "localizations": [],
    "parents": [
        "rdm/lookupTypes/Country/US"
    ]
  }			

Response:

{
  "tenantId": "rdm_tenant_name",
  "updatedBy": "anton.artemyev",
  "updateDate": 1488466088624,
  "version": 6,
  "type": "rdm/lookupTypes/State",
  "code": "AR",
  "enabled": true,
  "sourceMappings": [
    {
      "source": "Reltio",
      "values": [
        {
          "code": "AR",
          "value": "Arkansas",
          "enabled": true,
          "canonicalValue": true,
          "downStreamDefaultValue": true
        }
      ]
    },
    {
      "source": "FB",
      "values": [
        {
          "code": "AR",
          "value": "Arkansas",
          "enabled": true,
          "canonicalValue": false,
          "downStreamDefaultValue": true
        }
      ]
    }
  ],
  "localizations": [],
  "parents": [
    "rdm/lookupTypes/Country/US"
  ],
  "startDate": 0,
  "endDate": 0
}

Partial Update Lookup Code

Use this feature to create or update a single mapping for a particular source raw value to canonical value. When the system runs the API, a new mapping is created, if the mapping is not already available. If mapping for the source value is already existing, then the system updates the mapping.
Note: This process doesn't have impact on the other mappings.

If a lookup with the provided type and canonical code do not exist in the RDM tenant, then the system creates a new lookup.

If a lookup with the provided type and canonical code exist in the RDM tenant, then the system overrides the lookup as follows:
  • The system overrides these simple properties: enabled, startDate, endDate, and parents.
  • The system updates the source mappings based on the following rules:
    • If one of the source mappings from a request payload has canonicalValue=true, then the system uses this as canonical value. Otherwise, the system does not change the canonical value in lookup.
    • If one of the source mappings inside of the specific source from a request payload has downstreamDefaultValue=true, then the system uses this as downstream value for the source system. Otherwise, the system does not change the downstream values.
    • If source system does not exist, then it is created with mappings from request payload.
    • If source system exists and the mapping with provided source code does not exist then it is created.
    • If source system exists and the mapping with provided source code already exists, then it is updated except, canonicalValue property.
  • The system updates the Localizations based on the following rules:
    • If localization with the provided languageCode does not exist, then the system creates it.
    • If localization with the provided languageCode exists, then the system updates it.
  • The system updates the custom attributes based on the following rules:
    • If attribute with the provided name does not exist, then the system creates it.
    • If attribute with the provided name exists, then the system updates it.
For example, RDM tenant has the following lookup:
{
    "tenantId": "yOnoqtljOIXiIy8",
    "type": "rdm/lookupTypes/Country",
    "code": "US",
    "enabled": false,
    "startDate": 0,
    "endDate": 0,
    "sourceMappings":
    [
        {
            "source": "Reltio",
            "values":
            [
                {
                    "code": "US",
                    "value": "USA",
                    "enabled": true,
                    "canonicalValue": true,
                    "downStreamDefaultValue": true,
                    "description": "To Be Done"
                }
            ]
        },
        {
            "source": "AHA",
            "values":
            [
                {
                    "code": "010102",
                    "value": "USA",
                    "enabled": true,
                    "canonicalValue": false,
                    "downStreamDefaultValue": true
                }
            ]
        }
    ],
    "localizations":
    [
        {
            "languageCode": "fr-ca",
            "value": "Etats-Unis d'Amerique",
            "description": "..."
        },
        {
            "languageCode": "cs",
            "value": "Spojené státy americké"
        }
    ],
    "parents":
    [
        "rdm/lookupTypes/Continent/Unknown"
    ],
    "attributes":
    [
        {
            "name": "Continent",
            "value": "Unknown"
        }
    ]
}
And you send the request payload with the following changes:
  • Update fields: enabled, startDate, endDate, and parents.
  • Update source Reltio:
    • Update mapping for source code US.
    • Insert new mapping for source code Am.
  • Create new mapping for source SFDC.
  • Changes in Localizations:
    • Update localization for language fr-ca.
    • Insert new localization for language es-mx.
  • Changes in custom attributes:

    • Update attribute for name Continent.
    • Insert new attribute with name Population.

The result look up in RDM tenant is as follows:

[
    {
        "tenantId": "yOnoqtljOIXiIy8",
        "type": "rdm/lookupTypes/Country",
        "code": "US",
        "enabled": true,
        "startDate": 1577836800000,
        "endDate": 3471292800000,
        "sourceMappings":
        [
            {
                "source": "Reltio",
                "values":
                [
                    {
                        "code": "US",
                        "value": "USA",
                        "enabled": true,
                        "canonicalValue": false,
                        "downStreamDefaultValue": false,
                        "description": "Used as a canonical and downstream default value"
                    },
                    {
                        "code": "Am",
                        "value": "America",
                        "enabled": true,
                        "canonicalValue": true,
                        "downStreamDefaultValue": true
                    }
                ]
            },
            {
                "source": "SFDC",
                "values":
                [
                    {
                        "code": "1",
                        "value": "United States",
                        "enabled": true,
                        "canonicalValue": false,
                        "downStreamDefaultValue": true
                    }
                ]
            }
        ],
        "localizations":
        [
            {
                "languageCode": "es-mx",
                "value": "Estados Unidos de America",
                "description": "Translation to Spanish (Mexico)"
            },
            {
                "languageCode": "fr-ca",
                "value": "États-Unis d'Amérique",
                "description": "Translation to French (Canada)"
            }
        ],
        "parents":
        [
            "rdm/lookupTypes/Continent/NorthAmerica"
        ],
        "attributes":
        [
            {
                "name": "Continent",
                "value": "North America"
            },
            {
                "name": "Population",
                "value": 324947000
            }
        ]
    }
]
If you send request to the one of the following endpoints:
POST https://{rdm-service-url}/lookups/{rdm-tenant-id}
POST https://{rdm-service-url}/lookups/{rdm-tenant-id}/{type}
PUT   https://{rdm-service-url}/lookups/{rdm-tenant-id}/{type}/{code}
The result lookup in the RDM tenant is as follows:
{
    "tenantId": "yOnoqtljOIXiIy8",
    "type": "rdm/lookupTypes/Country",
    "code": "US",
    "enabled": true,
    "startDate": 1577836800000,
    "endDate": 3471292800000,
    "sourceMappings":
    [
        {
            "source": "Reltio",
            "values":
            [
                {
                    "code": "US",
                    "value": "USA",
                    "enabled": true,
                    "canonicalValue": false,
                    "downStreamDefaultValue": false,
                    "description": "Used as a canonical and downstream default value"
                },
                {
                    "code": "Am",
                    "value": "America",
                    "enabled": true,
                    "canonicalValue": true,
                    "downStreamDefaultValue": true
                }
            ]
        },
        {
            "source": "AHA",
            "values":
            [
                {
                    "code": "010102",
                    "value": "USA",
                    "enabled": true,
                    "canonicalValue": false,
                    "downStreamDefaultValue": true
                }
            ]
        },
        {
            "source": "SFDC",
            "values":
            [
                {
                    "code": "1",
                    "value": "United States",
                    "enabled": true,
                    "canonicalValue": false,
                    "downStreamDefaultValue": true
                }
            ]
        }
    ],
    "localizations":
    [
        {
            "languageCode": "fr-ca",
            "value": "États-Unis d'Amérique",
            "description": "Translation to French (Canada)"
        },
        {
            "languageCode": "cs",
            "value": "Spojené státy americké"
        },
        {
            "languageCode": "es-mx",
            "value": "Estados Unidos de America",
            "description": "Translation to Spanish (Mexico)"
        }
    ],
    "parents":
    [
        "rdm/lookupTypes/Continent/NorthAmerica"
    ],
    "attributes":
    [
        {
            "name": "Continent",
            "value": "North America"
        },
        {
            "name": "Population",
            "value": 324947000
        }
    ]
}
If you send the request to the one of the following endpoints:
POST https://{rdm-service-url}/changeRequests/{rdm-tenant-id}/{dcr-id}/lookups
POST https://{rdm-service-url}/changeRequests/{rdm-tenant-id}/{dcr-id}/lookups/{type}
PUT   https://{rdm-service-url}/changeRequests/{rdm-tenant-id}/{dcr-id}/lookups/{type}/{code}
If lookup does not exist in the RDM tenant, the result Data Change Request is as follows:
{
    "tenantId": "yOnoqtljOIXiIy8",
    "changes":
    {
        "yOnoqtljOIXiIy8/Country/US":
        [
            {
                "id": "f956e48b-08fd-48d9-92a0-040090eeaca6",
                "type": "CREATE_LOOKUP",
                "newValue":
                {
                    "tenantId": "yOnoqtljOIXiIy8",
                    "type": "rdm/lookupTypes/Country",
                    "code": "US",
                    "enabled": true,
                    "startDate": 1577836800000,
                    "endDate": 3471292800000,
                    "sourceMappings":
                    [
                        {
                            "source": "Reltio",
                            "values":
                            [
                                {
                                    "code": "US",
                                    "value": "USA",
                                    "enabled": true,
                                    "canonicalValue": false,
                                    "downStreamDefaultValue": false,
                                    "description": "Used as a canonical and downstream default value"
                                },
                                {
                                    "code": "Am",
                                    "value": "America",
                                    "enabled": true,
                                    "canonicalValue": true,
                                    "downStreamDefaultValue": true
                                }
                            ]
                        },
                        {
                            "source": "SFDC",
                            "values":
                            [
                                {
                                    "code": "1",
                                    "value": "United States",
                                    "enabled": true,
                                    "canonicalValue": false,
                                    "downStreamDefaultValue": true
                                }
                            ]
                        }
                    ],
                    "localizations":
                    [
                        {
                            "languageCode": "es-mx",
                            "value": "Estados Unidos de America",
                            "description": "Translation to Spanish (Mexico)"
                        },
                        {
                            "languageCode": "fr-ca",
                            "value": "États-Unis d'Amérique",
                            "description": "Translation to French (Canada)"
                        }
                    ],
                    "parents":
                    [
                        "rdm/lookupTypes/Continent/NorthAmerica"
                    ],
                    "attributes":
                    [
                        {
                            "name": "Continent",
                            "value": "North America"
                        },
                        {
                            "name": "Population",
                            "value": 324947000
                        }
                    ]
                }
            }
        ]
    }
}
If lookup exists in the RDM tenant, the result Data Change Request is as follows:
{
    "tenantId": "yOnoqtljOIXiIy8",
    "id": "772e5b0f-2cf3-4377-89c5-335e706f0a0f",
    "state": "AWAITING_REVIEW",
    "createdBy": "user",
    "createDate": 1600773974316,
    "updatedBy": "user",
    "updateDate": 1600773974316,
    "version": 1,
    "changes":
    {
        "yOnoqtljOIXiIy8/Country/US":
        [
            {
                "id": "e3fd294d-24f3-4fb3-84b7-707bd09b55d4",
                "type": "UPDATE_FIELD",
                "path": "enabled",
                "newValue": true,
                "oldValue": false
            },
            {
                "id": "a9768367-bde1-4436-a797-d367bfa48d9e",
                "type": "UPDATE_FIELD",
                "path": "startDate",
                "newValue": 1577836800000,
                "oldValue": 0
            },
            {
                "id": "600712a6-62dd-48e1-b190-3245bbfa97e4",
                "type": "UPDATE_FIELD",
                "path": "endDate",
                "newValue": 3471292800000,
                "oldValue": 0
            },
            {
                "id": "befe4e7e-773d-491f-a751-1905f69b7d7f",
                "type": "UPDATE_PARENTS",
                "path": "parents",
                "newValue":
                [
                    "rdm/lookupTypes/Continent/NorthAmerica"
                ],
                "oldValue":
                [
                    "rdm/lookupTypes/Continent/Unknown"
                ]
            },
            {
                "id": "2599791c-f777-418c-8e64-5e32efc39a84",
                "type": "UPDATE_MAPPING",
                "path": "source/Reltio/mapping/US",
                "newValue":
                {
                    "code": "US",
                    "value": "USA",
                    "enabled": true,
                    "canonicalValue": false,
                    "downStreamDefaultValue": false,
                    "description": "Used as a canonical and downstream default value"
                },
                "oldValue":
                {
                    "code": "US",
                    "value": "USA",
                    "enabled": true,
                    "canonicalValue": true,
                    "downStreamDefaultValue": true,
                    "description": "To Be Done"
                }
            },
            {
                "id": "545e4306-4ebb-4992-8edf-0471f0681208",
                "type": "INSERT_MAPPING",
                "path": "source/Reltio/mapping/Am",
                "newValue":
                {
                    "code": "Am",
                    "value": "America",
                    "enabled": true,
                    "canonicalValue": true,
                    "downStreamDefaultValue": true
                }
            },
            {
                "id": "c0a1f388-1a98-421a-89af-8e793911f30b",
                "type": "INSERT_MAPPING",
                "path": "source/SFDC/mapping/1",
                "newValue":
                {
                    "code": "1",
                    "value": "United States",
                    "enabled": true,
                    "canonicalValue": false,
                    "downStreamDefaultValue": true
                }
            },
            {
                "id": "08412049-3922-47eb-9e18-4a8ad26f839d",
                "type": "UPDATE_LOCALIZATION",
                "path": "localizations/fr-ca",
                "newValue":
                {
                    "languageCode": "fr-ca",
                    "value": "États-Unis d'Amérique",
                    "description": "Translation to French (Canada)"
                },
                "oldValue":
                {
                    "languageCode": "fr-ca",
                    "value": "Etats-Unis d'Amerique",
                    "description": "..."
                }
            },
            {
                "id": "337f3857-2c29-495b-b5df-6be1bfae36d7",
                "type": "INSERT_LOCALIZATION",
                "path": "localizations/es-mx",
                "newValue":
                {
                    "languageCode": "es-mx",
                    "value": "Estados Unidos de America",
                    "description": "Translation to Spanish (Mexico)"
                }
            },
            {
                "id": "164aa3c3-c46c-458d-975c-5dc9dfcddab3",
                "type": "UPDATE_ATTRIBUTE",
                "path": "attributes/Continent",
                "dataType": "string",
                "newValue":
                {
                    "name": "Continent",
                    "value": "North America"
                },
                "oldValue":
                {
                    "name": "Continent",
                    "value": "Unknown"
                }
            },
            {
                "id": "0071c45b-e6f3-4b44-a900-559331958bde",
                "type": "INSERT_ATTRIBUTE",
                "path": "attributes/Population",
                "dataType": "number",
                "newValue":
                {
                    "name": "Population",
                    "value": 324947000
                }
            }
        ]
    }
}

Delete Lookups by URIs

Use this to delete lookups by their URIs (maximum number of URIs that can be deleted is 1000). The response contains an array of results for each URI, where the "success" status indicates that the lookups are either deleted successfully or do not exist. In case of an error, an error object is returned.

Request:

POST https://{{rdm_uri}}/lookups/rdm_tenant_name/_delete
Authorization: Bearer {{token}}
 
{
    "uris" : [
        "rdm_tenant_name/State/AR",
        "rdm_tenant_name/State/CA",
        "rdm_tenant_name/State/KA",
        ...
    ]
}

Response:

[
    {
        "uri": "rdm_tenant_name/State/AR",
        "value": {
            "status" : "success"
        }
    },
    {
        "uri": "rdm_tenant_name/State/CA",
        "value": {
            "status" : "success"
        }
    },
    {
        "uri": "rdm_tenant_name/State/KA",
        "value": {
            "status" : "success"
        }
    },
    ...
]

Delete Lookup Code

Use this to delete a lookup by its type and code. The response returns the "success" status if the lookup is deleted successfully or it does not exist. In case of an error, an error object is returned.

Request:

DELETE https://{{rdm-service}}/lookups/rdm_tenant_name/State/AR
Authorization: Bearer {{token}}

Response:

{ 
"status" : "success"
}