Fetching Crosscheck Results

How to fetch results of a crosscheck that was configured in the dashboard

To fetch results from a crosscheck that was configured in the dashboard the following API can be used.

/omni/cross-doc-data-check/results

This API responds with the following format:

{
  "additionalProp1": [
    {
      "interviewId": "string",
      "comparisonName": "string",
      "comparisonId": "string",
      "result": "OK",
      "leftValueDetails": {
        "documentType": "string",
        "fieldName": "string",
        "value": {},
        "sourceNotFound": true
      },
      "rightValueDetails": {
        "documentType": "string",
        "fieldName": "string",
        "value": {},
        "sourceNotFound": true
      },
      "severity": "ultra_low"
    }
  ],
  "additionalProp2": [
    {
      "interviewId": "string",
      "comparisonName": "string",
      "comparisonId": "string",
      "result": "OK",
      "leftValueDetails": {
        "documentType": "string",
        "fieldName": "string",
        "value": {},
        "sourceNotFound": true
      },
      "rightValueDetails": {
        "documentType": "string",
        "fieldName": "string",
        "value": {},
        "sourceNotFound": true
      },
      "severity": "ultra_low"
    }
  ],
}

When reading the result, it is important to iterate through the dictionary and do a “contains” comparison with the name of the crosscheck. This is due to a technical implementation within Incode’s system that automatically appends a required metadata to the end of the name. Trying to read the crosscheck name as a key directly on the response JSON response will not work.

For example, if the crosscheck name is specified as FirstNameComparison within the crosscheck configuration on the Incode dashboard, then it is possible the returned field name from the API is FirstNameComparison #i1class . The system automatically appends the #i1class. The metadata can be different each time, but should be ignored. This is why it is important to retrieve the result of the crosscheck by looping through the top level keys of the JSON response and seeing which one contains FirstNameComparison

It is important to name crosschecks in such a way that there is no overlap when doing a “contains” match. For example, do not name a comparison FirstNameComp and another FirstNameComparison as it is possible to introduce a bug by reading the result from wrong field.