{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-fraud-detector/json-schema/amazon-fraud-detector-create-variable-request-schema.json",
  "title": "CreateVariableRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-fraud-detector-variable-api-openapi.yml#/components/schemas/CreateVariableRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the variable."
    },
    "dataType": {
      "type": "string",
      "enum": [
        "STRING",
        "INTEGER",
        "FLOAT",
        "BOOLEAN",
        "DATETIME"
      ],
      "description": "The data type of the variable."
    },
    "dataSource": {
      "type": "string",
      "enum": [
        "EVENT",
        "MODEL_SCORE",
        "EXTERNAL_MODEL_SCORE"
      ],
      "description": "The source of the data."
    },
    "defaultValue": {
      "type": "string",
      "description": "The default value for the variable when no value is received."
    },
    "description": {
      "type": "string",
      "description": "The description."
    },
    "variableType": {
      "type": "string",
      "description": "The variable type. For more information see Variable types. Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT"
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A collection of key and value pairs."
    }
  },
  "required": [
    "name",
    "dataType",
    "dataSource",
    "defaultValue"
  ],
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "A tag key."
        },
        "value": {
          "type": "string",
          "description": "A value assigned to a tag key."
        }
      },
      "required": [
        "key",
        "value"
      ]
    }
  }
}