{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/idenfy/main/json-schema/idenfy-aml-monitoring-request-schema.json",
  "title": "AmlMonitoringRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/idenfy-aml-monitorings-api-openapi.yml#/components/schemas/AmlMonitoringRequest",
  "type": "object",
  "properties": {
    "isSubscribed": {
      "type": "boolean",
      "description": "Should the expiration of this AML monitoring be automatically extended or not."
    },
    "amlCheck": {
      "$ref": "#/$defs/AmlMonitoringAmlCheckRequest"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32,
        "pattern": "^[^,]+$"
      },
      "default": [],
      "description": "List of case-sensitive strings. Each tag can not be longer than 32 characters.",
      "maxItems": 5
    }
  },
  "required": [
    "amlCheck",
    "isSubscribed"
  ],
  "$defs": {
    "AmlMonitoringAmlCheckRequest": {
      "oneOf": [
        {
          "$ref": "#/$defs/AmlMonitoringPersonAmlCheckRequest"
        },
        {
          "$ref": "#/$defs/AmlMonitoringCompanyAmlCheckRequest"
        }
      ]
    },
    "AmlMonitoringCompanyAmlCheckRequest": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string",
          "minLength": 1,
          "description": "A unique string identifying a client on your side.",
          "maxLength": 100
        },
        "userType": {
          "$ref": "#/$defs/UserMonitoringTypeEnum"
        },
        "input": {
          "$ref": "#/$defs/CompanyAmlCheckInputRequest"
        }
      },
      "required": [
        "clientId",
        "input",
        "userType"
      ]
    },
    "AmlMonitoringPersonAmlCheckRequest": {
      "type": "object",
      "properties": {
        "clientId": {
          "type": "string",
          "minLength": 1,
          "description": "A unique string identifying a client on your side.",
          "maxLength": 100
        },
        "userType": {
          "$ref": "#/$defs/UserMonitoringTypeEnum"
        },
        "input": {
          "$ref": "#/$defs/PersonAmlCheckInputRequest"
        }
      },
      "required": [
        "clientId",
        "input",
        "userType"
      ]
    },
    "CompanyAmlCheckInputRequest": {
      "type": "object",
      "properties": {
        "companyName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "country": {
          "allOf": [
            {
              "$ref": "#/$defs/CountryEnum"
            }
          ],
          "nullable": true
        }
      },
      "required": [
        "companyName"
      ]
    },
    "CountryEnum": {
      "enum": [
        "AF",
        "AX",
        "AL",
        "DZ",
        "AS",
        "AD",
        "AO",
        "AI",
        "AQ",
        "AG",
        "AR",
        "AM",
        "AW",
        "AU",
        "AT",
        "AZ",
        "BS",
        "BH",
        "BD",
        "BB",
        "BY",
        "BE",
        "BZ",
        "BJ",
        "BM",
        "BT",
        "BO",
        "BQ",
        "BA",
        "BW",
        "BV",
        "BR",
        "IO",
        "BN",
        "BG",
        "BF",
        "BI",
        "CV",
        "KH",
        "CM",
        "CA",
        "KY",
        "CF",
        "TD",
        "CL",
        "CN",
        "CX",
        "CC",
        "CO",
        "KM",
        "CG",
        "CK",
        "CR",
        "CI",
        "HR",
        "CU",
        "CW",
        "CY",
        "CZ",
        "CD",
        "DK",
        "DJ",
        "DM",
        "DO",
        "EC",
        "EG",
        "SV",
        "GQ",
        "ER",
        "EE",
        "SZ",
        "ET",
        "FK",
        "FO",
        "FJ",
        "FI",
        "FR",
        "GF",
        "PF",
        "TF",
        "GA",
        "GM",
        "GE",
        "DE",
        "GH",
        "GI",
        "GR",
        "GL",
        "GD",
        "GP",
        "GU",
        "GT",
        "GG",
        "GN",
        "GW",
        "GY",
        "HT",
        "HM",
        "HN",
        "HK",
        "HU",
        "IS",
        "IN",
        "ID",
        "IR",
        "IQ",
        "IE",
        "IM",
        "IL",
        "IT",
        "JM",
        "JP",
        "JE",
        "JO",
        "KZ",
        "KE",
        "KI",
        "XK",
        "KW",
        "KG",
        "LA",
        "LV",
        "LB",
        "LS",
        "LR",
        "LY",
        "LI",
        "LT",
        "LU",
        "MO",
        "MG",
        "MW",
        "MY",
        "MV",
        "ML",
        "MT",
        "MH",
        "MQ",
        "MR",
        "MU",
        "YT",
        "MX",
        "FM",
        "MD",
        "MC",
        "MN",
        "ME",
        "MS",
        "MA",
        "MZ",
        "MM",
        "NA",
        "NR",
        "NP",
        "NL",
        "NC",
        "NZ",
        "NI",
        "NE",
        "NG",
        "NU",
        "NF",
        "KP",
        "MK",
        "MP",
        "NO",
        "OM",
        "PK",
        "PW",
        "PS",
        "PA",
        "PG",
        "PY",
        "PE",
        "PH",
        "PN",
        "PL",
        "PT",
        "PR",
        "QA",
        "RE",
        "RO",
        "RU",
        "RW",
        "BL",
        "SH",
        "KN",
        "LC",
        "MF",
        "PM",
        "VC",
        "WS",
        "SM",
        "ST",
        "SA",
        "SN",
        "RS",
        "SC",
        "SL",
        "SG",
        "SX",
        "SK",
        "SI",
        "SB",
        "SO",
        "ZA",
        "GS",
        "KR",
        "SS",
        "ES",
        "LK",
        "SD",
        "SR",
        "SJ",
        "SE",
        "CH",
        "SY",
        "TW",
        "TJ",
        "TZ",
        "TH",
        "TL",
        "TG",
        "TK",
        "TO",
        "TT",
        "TN",
        "TR",
        "TM",
        "TC",
        "TV",
        "UG",
        "UA",
        "AE",
        "GB",
        "UM",
        "US",
        "UY",
        "UZ",
        "VU",
        "VA",
        "VE",
        "VN",
        "VG",
        "VI",
        "WF",
        "EH",
        "YE",
        "ZM",
        "ZW"
      ],
      "type": "string"
    },
    "MainSexEnum": {
      "enum": [
        "MALE",
        "FEMALE"
      ],
      "type": "string"
    },
    "PersonAmlCheckInputRequest": {
      "type": "object",
      "properties": {
        "fullName": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "nationality": {
          "allOf": [
            {
              "$ref": "#/$defs/CountryEnum"
            }
          ],
          "nullable": true
        },
        "dateOfBirth": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "sex": {
          "allOf": [
            {
              "$ref": "#/$defs/MainSexEnum"
            }
          ],
          "nullable": true
        }
      },
      "required": [
        "fullName"
      ]
    },
    "UserMonitoringTypeEnum": {
      "enum": [
        "COMPANY",
        "PERSON"
      ],
      "type": "string"
    }
  }
}