{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/entitylight/json-schema/entitylight-ofac-screening-schema.json",
  "title": "OfacScreening",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entitylight-openapi.json#/components/schemas/OfacScreening",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "name": {
      "type": "string",
      "description": "The name screened"
    },
    "type": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "person",
            "organization",
            "vessel",
            "aircraft"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "The type screened; null when all types were"
    },
    "birthDate": {
      "type": [
        "string",
        "null"
      ]
    },
    "country": {
      "type": [
        "string",
        "null"
      ]
    },
    "minScore": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "lists": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "SDN",
              "NONSDN",
              "UN",
              "FSF",
              "FCDO",
              "SECO",
              "DFAT",
              "SEMA",
              "BFS",
              "DNSL",
              "TOUA",
              "LFIU",
              "REPET",
              "MAS",
              "FINCEN",
              "DPL",
              "SAM",
              "LEIE",
              "INTERPOL",
              "PEP"
            ]
          },
          "name": {
            "type": "string"
          },
          "dataAsOf": {
            "description": "ISO 8601. When our copy of the list was last refreshed",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "code",
          "name",
          "dataAsOf"
        ],
        "additionalProperties": false
      },
      "description": "The lists searched"
    },
    "matchCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "matches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "score": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "0 to 100; 100 is an exact name match with nothing contradicting it"
          },
          "nameMatched": {
            "type": "object",
            "properties": {
              "searched": {
                "type": "string"
              },
              "listed": {
                "type": "string",
                "description": "The listed name or alias that matched"
              },
              "as": {
                "type": "string",
                "enum": [
                  "primary_name",
                  "alias",
                  "weak_alias"
                ]
              }
            },
            "required": [
              "searched",
              "listed",
              "as"
            ],
            "additionalProperties": false
          },
          "conflicts": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "birthDate",
                "country"
              ]
            },
            "description": "Fields you sent that contradict the listing, which lowered the score"
          },
          "party": {
            "type": "object",
            "properties": {
              "type": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "person",
                      "organization",
                      "vessel",
                      "aircraft"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "null when the list doesn't say whether the party is a person or an organization"
              },
              "name": {
                "type": "string",
                "description": "The name the party is listed under"
              },
              "lists": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "SDN",
                    "NONSDN",
                    "UN",
                    "FSF",
                    "FCDO",
                    "SECO",
                    "DFAT",
                    "SEMA",
                    "BFS",
                    "DNSL",
                    "TOUA",
                    "LFIU",
                    "REPET",
                    "MAS",
                    "FINCEN",
                    "DPL",
                    "SAM",
                    "LEIE",
                    "INTERPOL",
                    "PEP"
                  ]
                },
                "description": "Every searchable list the party is on"
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "sanction",
                    "debarment",
                    "pep",
                    "wanted"
                  ]
                }
              },
              "aliases": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "weakAliases": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Loose aliases the lists themselves flag as weak; a match on one alone is rarely the same party"
              },
              "birthDates": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "YYYY-MM-DD, or YYYY where only the year is listed"
              },
              "nationalities": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Two-letter country codes"
              },
              "countries": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Two-letter country codes"
              },
              "addresses": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "identifiers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "registration_number",
                        "id_number",
                        "passport_number",
                        "tax_id",
                        "lei",
                        "swift_bic",
                        "sam_uei",
                        "imo_number",
                        "mmsi",
                        "call_sign",
                        "serial_number"
                      ]
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "value"
                  ],
                  "additionalProperties": false
                }
              },
              "positions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Offices and roles, mostly for politically exposed persons"
              },
              "remarks": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Remarks printed on the lists"
              },
              "sourceLinks": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Pages the listing cites"
              }
            },
            "required": [
              "type",
              "name",
              "lists",
              "categories",
              "aliases",
              "weakAliases",
              "birthDates",
              "nationalities",
              "countries",
              "addresses",
              "identifiers",
              "positions",
              "remarks",
              "sourceLinks"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "score",
          "nameMatched",
          "conflicts",
          "party"
        ],
        "additionalProperties": false
      },
      "description": "Best score first. Empty means no listed party scored minScore or more"
    },
    "truncated": {
      "type": "boolean",
      "description": "The search hit its 100-match limit, so lower-scoring matches may be missing. Add a birth date or country, narrow sources, or raise minScore"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO 8601"
    }
  },
  "required": [
    "id",
    "name",
    "type",
    "birthDate",
    "country",
    "minScore",
    "lists",
    "matchCount",
    "matches",
    "truncated",
    "createdAt"
  ],
  "additionalProperties": false
}