{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fraud-detector/json-schema/amazon-fraud-detector-get-event-prediction-result-schema.json",
  "title": "GetEventPredictionResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fraud-detector-predictions-api-openapi.yml#/components/schemas/GetEventPredictionResult",
  "type": "object",
  "properties": {
    "modelScores": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ModelScores"
      },
      "description": "The model scores. Amazon Fraud Detector generates model scores between 0 and 1000, where 0 is low fraud risk and 1000 is high fraud risk. Model scores are directly related to the false positive rate (FPR). For example, a score of 600 corresponds to an estimated 10% false positive rate whereas a score of 900 corresponds to an estimated 2% false positive rate."
    },
    "ruleResults": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RuleResult"
      },
      "description": "The results from the rules."
    },
    "externalModelOutputs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExternalModelOutputs"
      },
      "description": "The model scores for Amazon SageMaker models."
    }
  },
  "$defs": {
    "ExternalModelOutputs": {
      "type": "object",
      "properties": {
        "externalModel": {
          "$ref": "#/$defs/ExternalModelSummary"
        },
        "outputs": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The fraud prediction scores from Amazon SageMaker model."
        }
      }
    },
    "ExternalModelSummary": {
      "type": "object",
      "properties": {
        "modelEndpoint": {
          "type": "string",
          "description": "The endpoint of the Amazon SageMaker model."
        },
        "modelSource": {
          "type": "string",
          "enum": [
            "SAGEMAKER"
          ],
          "description": "The source of the model."
        }
      }
    },
    "ModelScores": {
      "type": "object",
      "properties": {
        "modelVersion": {
          "$ref": "#/$defs/ModelVersion"
        },
        "scores": {
          "type": "object",
          "additionalProperties": {
            "type": "number"
          },
          "description": "The model's fraud prediction scores."
        }
      }
    },
    "ModelVersion": {
      "type": "object",
      "properties": {
        "modelId": {
          "type": "string",
          "description": "The model ID."
        },
        "modelType": {
          "type": "string",
          "enum": [
            "ONLINE_FRAUD_INSIGHTS",
            "TRANSACTION_FRAUD_INSIGHTS",
            "ACCOUNT_TAKEOVER_INSIGHTS"
          ],
          "description": "The model type."
        },
        "modelVersionNumber": {
          "type": "string",
          "description": "The model version number."
        },
        "arn": {
          "type": "string",
          "description": "The model version ARN."
        }
      },
      "required": [
        "modelId",
        "modelType",
        "modelVersionNumber"
      ]
    },
    "RuleResult": {
      "type": "object",
      "properties": {
        "ruleId": {
          "type": "string",
          "description": "The rule ID that was matched, based on the rule execution mode."
        },
        "outcomes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The outcomes of the matched rule, based on the rule execution mode."
        }
      }
    }
  }
}