Unify and manage your data

Transcode Hierarchical Lookups

Learn more about how to use the Transcode API to resolve parent lookup values and dependent child lookup values in a single request.

The Transcode for hierarchical lookups resolves parent lookup values and their dependent child lookup values in a single request. The request groups the child values with their parent values, and the response returns the resolved values in the same structure.

RDM resolves each child value against its parent lookup values. When the request contains values from multiple sources, the RDM tenant configuration property transcodeHierarchyOnSource determines which resolved parents RDM uses for validation. For more information, see Lookups and canonical values.

To return the resolved values in a specific language, set the Accept-Language header in the request.

HTTP method and endpoint

Use the following HTTP method and endpoint path to submit the request:

POST https://{{rdm-service}}/transcode/rdm_tenant_name

The following table describes the endpoint path parameter.

ParameterTypeRequiredDescription
rdm_tenant_nameStringYesName of the RDM tenant that processes the request. RDM resolves the lookup values against the reference data configured in this tenant.

Request headers

The following request headers must be included.

HeaderValueRequired
AuthorizationBearer <token>Yes
Content-Typeapplication/jsonYes
Accept-LanguageLanguage code, such as es-ESNo

Request body

The request body is a JSON array. Each object in the array pairs a set of parent lookup values with the dependent child lookup values that RDM resolves under those parents.

The following table describes the request body parameters.

ParameterTypeRequiredDescriptionAccepted values / Default
valuesObjectYesMap of the parent lookup values to resolve. Each key is a parent lookup type URI, and the value mapped to that key is an array of one or more parent lookup values to resolve for that lookup type.Parent lookup type URI as the key. For example, rdm/lookupTypes/Country.
typeStringNoLookup type URI of the individual parent value. The value matches the lookup type URI used as the key in the values map.Example: rdm/lookupTypes/Country
valueStringYesParent source value to resolve to its canonical value.Example: India
sourceStringYesSource system that supplied the parent value.Example: SAP. If omitted, RDM treats value as a canonical value or canonical code.
dependentValues
dependentValuesArrayNoChild lookup values that RDM resolves in the context of the resolved parent values. Include this field only when the request has child values to resolve. Omit it for a parent-only request.No default
valuesObjectYes, when dependentValues is includedMap of the child lookup values to resolve. Each key is a child lookup type URI, and the value mapped to that key is an array of one or more child lookup values to resolve for that lookup type.Child lookup type URI as the key. For example, rdm/lookupTypes/State.
typeStringNoLookup type URI of the individual child value. The value matches the lookup type URI used as the key in the child values map.Example: rdm/lookupTypes/State
valueStringYesChild source value to resolve to its canonical value, evaluated under the resolved parent values.Example: Kerala
sourceStringNoSource system that supplied the child value.Example: OKTA. If omitted, RDM treats value as a canonical value or canonical code.

Example request

The following example shows how a complete request is structured, including the headers and a JSON body.

The example contains two Country values and two dependent City values. Source A provides France and Paris; Source B provides Japan and Paris. In the lookup data for this example, Paris is a valid child of France, but not of Japan. The result depends on whether transcodeHierarchyOnSource is true or false in the RDM tenant configuration.

POST https://{{rdm-service}}/transcode/rdm_tenant_name
[
  {
    "values": {
      "rdm/lookupTypes/Country": [
        {
          "value": "France",
          "source": "SourceA"
        },
        {
          "value": "Japan",
          "source": "SourceB"
        }
      ]
    },
    "dependentValues": [
      {
        "values": {
          "rdm/lookupTypes/City": [
            {
              "value": "Paris",
              "source": "SourceA"
            },
            {
              "value": "Paris",
              "source": "SourceB"
            }
          ]
        }
      }
    ]
  }
]

Response body

The response returns the resolved parent and child values in the same nested structure as the request. The following table describes the fields returned for each resolved value.

ParameterTypeDescription
valuesObjectMap of the resolved parent values, grouped under the parent lookup type URI.
codeStringCanonical code of the resolved value. RDM returns this field when the value resolves successfully.
valueStringCanonical value of the resolved value. If the value does not resolve, RDM returns the original input value instead.
sourceStringSource system URI of the value that was submitted.
successBooleanWhether the value resolved successfully. The value is true when resolution succeeds and false when it fails.
errorStringMessage describing why the value did not resolve. RDM returns this field only when resolution fails.
dependentValues
dependentValuesArrayResolved child values, returned in the same nested structure as the request.
valuesObjectMap of the resolved child values, grouped under the child lookup type URI.
typeStringLookup type URI of the resolved value.

Example response

When transcodeHierarchyOnSource is false or not set, RDM checks both Paris values against France and Japan together. Both child values resolve because Paris is a valid child of France.
[
  {
    "values": {
      "rdm/lookupTypes/Country": [
        {
          "code": "FR",
          "value": "France",
          "source": "rdm/sources/SourceA",
          "success": true
        },
        {
          "code": "JP",
          "value": "Japan",
          "source": "rdm/sources/SourceB",
          "success": true
        }
      ]
    },
    "dependentValues": [
      {
        "values": {
          "rdm/lookupTypes/City": [
            {
              "code": "PARIS",
              "value": "Paris",
              "source": "rdm/sources/SourceA",
              "success": true
            },
            {
              "code": "PARIS",
              "value": "Paris",
              "source": "rdm/sources/SourceB",
              "success": true
            }
          ]
        }
      }
    ]
  }
]
When transcodeHierarchyOnSource is true RDM checks each Paris value against the country from its source. Paris from Source A resolves under France. Paris from Source B fails validation under Japan.
[
  {
    "values": {
      "rdm/lookupTypes/Country": [
        {
          "code": "FR",
          "value": "France",
          "source": "rdm/sources/SourceA",
          "success": true
        },
        {
          "code": "JP",
          "value": "Japan",
          "source": "rdm/sources/SourceB",
          "success": true
        }
      ]
    },
    "dependentValues": [
      {
        "values": {
          "rdm/lookupTypes/City": [
            {
              "type": "rdm/lookupTypes/City",
              "code": "PARIS",
              "value": "Paris",
              "source": "rdm/sources/SourceA",
              "success": true
            },
            {
              "type": "rdm/lookupTypes/City",
              "value": "Paris",
              "source": "rdm/sources/SourceB",
              "error": "1003: RDM canonical value mapping not found for value [Paris] and source [SourceB] in tenant [rdm_tenant_name]",
              "success": false
            }
          ]
        }
      }
    ]
  }
]

The following table lists the possible error responses returned by this API.

Error codeDescriptionRecommended action
1001The source in the request is not configured in the RDM tenant.Confirm the source exists in the RDM tenant and that source matches a configured source URI or source name, then resend the request.
1002The lookup type in the request is not configured in the RDM tenant.Confirm the lookup type exists in the RDM tenant and that type matches the configured lookup type URI, then resend the request.
1003The lookup value has no matching canonical mapping, or a dependent value does not match the applicable resolved parent values. Confirm that the value has a canonical mapping for its source. If the value is a child, confirm that its configured parent matches a parent value that resolved in the request. When transcodeHierarchyOnSource is true, check whether the parent value from the child's source resolved, then resend the request.