{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/trulioo/main/json-schema/trulioo-transaction-record-result-schema.json",
  "title": "TransactionRecordResult",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trulioo-transactions-api-openapi.yml#/components/schemas/TransactionRecordResult",
  "type": "object",
  "properties": {
    "TransactionID": {
      "type": "string"
    },
    "CountryCode": {
      "type": "string"
    },
    "ProductName": {
      "type": "string"
    },
    "Record": {
      "$ref": "#/$defs/Record"
    },
    "InputFields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InputField"
      }
    }
  },
  "$defs": {
    "AppendedField": {
      "type": "object",
      "properties": {
        "FieldName": {
          "type": "string"
        },
        "Data": {
          "type": "string"
        }
      }
    },
    "DatasourceField": {
      "type": "object",
      "properties": {
        "FieldName": {
          "type": "string"
        },
        "Status": {
          "type": "string"
        },
        "Data": {
          "type": "string"
        }
      }
    },
    "DatasourceResult": {
      "type": "object",
      "properties": {
        "DatasourceName": {
          "type": "string"
        },
        "DatasourceFields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DatasourceField"
          }
        },
        "Errors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RecordError"
          }
        },
        "AppendedFields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AppendedField"
          }
        }
      }
    },
    "InputField": {
      "type": "object",
      "properties": {
        "FieldName": {
          "type": "string"
        },
        "Value": {
          "type": "string"
        }
      }
    },
    "Record": {
      "type": "object",
      "properties": {
        "TransactionRecordID": {
          "type": "string"
        },
        "RecordStatus": {
          "type": "string",
          "enum": [
            "match",
            "nomatch",
            "partial",
            "error"
          ]
        },
        "DatasourceResults": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DatasourceResult"
          }
        },
        "Errors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RecordError"
          }
        },
        "Rule": {
          "$ref": "#/$defs/Rule"
        }
      }
    },
    "RecordError": {
      "type": "object",
      "properties": {
        "Code": {
          "type": "string"
        },
        "Message": {
          "type": "string"
        }
      }
    },
    "Rule": {
      "type": "object",
      "properties": {
        "RuleName": {
          "type": "string"
        },
        "Note": {
          "type": "string"
        }
      }
    }
  }
}