{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ariregister-rik-ee/json-schema/ariregister-rik-ee-beneficial-owners-response-schema.json",
  "title": "BeneficialOwnersResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ariregister-rik-ee-openapi.yml#/components/schemas/BeneficialOwnersResponse",
  "properties": {
    "beneficiariesTotal": {
      "type": "integer",
      "format": "int64",
      "title": "Beneficiariestotal",
      "description": "Beneficiaries in response."
    },
    "hiddenBeneficiariesNumber": {
      "type": "integer",
      "format": "int64",
      "title": "Hiddenbeneficiariesnumber",
      "description": "Number of hidden beneficial owners"
    },
    "filedNoBeneficiaryNotice": {
      "type": "boolean",
      "title": "Filednobeneficiarynotice",
      "description": "Has a discrepancy notice of no beneficiaries been filed."
    },
    "mustSubmitBeneficialOwners": {
      "type": "boolean",
      "title": "Mustsubmitbeneficialowners",
      "description": "Whether the entity is required to submit beneficial owner information."
    },
    "beneficiary": {
      "items": {
        "$ref": "#/$defs/Beneficiary"
      },
      "type": "array",
      "title": "Beneficiary",
      "description": "Beneficiaries in response"
    }
  },
  "type": "object",
  "required": [
    "beneficiariesTotal",
    "hiddenBeneficiariesNumber",
    "filedNoBeneficiaryNotice",
    "mustSubmitBeneficialOwners",
    "beneficiary"
  ],
  "$defs": {
    "Beneficiary": {
      "properties": {
        "person": {
          "$ref": "#/$defs/PersonInfo",
          "description": "Person information"
        },
        "country": {
          "type": "string",
          "title": "Country",
          "description": "Country of the address"
        },
        "countryAsText": {
          "type": "string",
          "title": "Countryastext",
          "description": "Address country as text"
        },
        "authorityMethod": {
          "type": "string",
          "title": "Authoritymethod",
          "description": "Authority method"
        },
        "authorityMethodAsText": {
          "type": "string",
          "title": "Authoritymethodastext",
          "description": "Authority method as text"
        },
        "terminationType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Terminationtype",
          "description": "Termination Type"
        },
        "terminationTypeAsText": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Terminationtypeastext",
          "description": "Termination type as text"
        },
        "beneficiaryDiscrepancyFiled": {
          "type": "boolean",
          "title": "Beneficiarydiscrepancyfiled",
          "description": "Whether a discrepancy notice has been filed for the beneficiary."
        },
        "recordId": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "format": "int64",
          "title": "Recordid",
          "description": "ID"
        },
        "startDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Startdate",
          "description": "Start date"
        },
        "endDate": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Enddate",
          "description": "Ending date"
        }
      },
      "type": "object",
      "required": [
        "person",
        "country",
        "countryAsText",
        "authorityMethod",
        "authorityMethodAsText",
        "beneficiaryDiscrepancyFiled"
      ],
      "title": "Beneficiary"
    },
    "PersonInfo": {
      "properties": {
        "type": {
          "type": "string",
          "title": "Type",
          "description": "Person Type"
        },
        "firstName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Firstname",
          "description": "First name"
        },
        "surnameLegalEntityName": {
          "type": "string",
          "title": "Surnamelegalentityname",
          "description": "Family name or business name"
        },
        "identityCode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Identitycode",
          "description": "ID code or registry code"
        },
        "foreignCode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Foreigncode",
          "description": "Foreign ID code"
        },
        "foreignCodeCountry": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Foreigncodecountry",
          "description": "Country of Foreign ID code"
        },
        "foreignCodeCountryAsText": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Foreigncodecountryastext",
          "description": "Country of foreign ID code as text"
        },
        "birthday": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Birthday",
          "description": "Date of birth"
        }
      },
      "type": "object",
      "required": [
        "type",
        "surnameLegalEntityName"
      ],
      "title": "PersonInfo"
    }
  }
}