{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/insuremo-com/json-schema/insuremo-com-party-schema.json",
  "title": "Party",
  "description": "Party",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/insuremo-com-party-openapi.yml#/components/schemas/Party",
  "type": "object",
  "properties": {
    "@pk": {
      "type": "integer",
      "format": "int64"
    },
    "@type": {
      "type": "string"
    },
    "BusinessObjectId": {
      "type": "integer",
      "format": "int64"
    },
    "IdValidThru": {
      "type": "string",
      "format": "date-time"
    },
    "IndiIdNo": {
      "type": "string"
    },
    "InsertBy": {
      "type": "integer",
      "format": "int64"
    },
    "InsertTime": {
      "type": "string",
      "format": "date-time"
    },
    "IsOrgParty": {
      "type": "string"
    },
    "MergedPartyId": {
      "type": "integer",
      "format": "int64"
    },
    "NationalityCode": {
      "type": "string"
    },
    "OldPrimaryKey": {
      "type": "integer",
      "format": "int64"
    },
    "OrgOrganizationCertiNumber": {
      "type": "string"
    },
    "OrgOrganizationCertiType": {
      "type": "string"
    },
    "PartyAccountList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartyAccount"
      }
    },
    "PartyAddressList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartyAddress"
      }
    },
    "PartyCode": {
      "type": "string"
    },
    "PartyContactList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PartyContact"
      }
    },
    "PartyId": {
      "type": "integer",
      "format": "int64"
    },
    "PartyName": {
      "type": "string"
    },
    "PartyType": {
      "type": "string",
      "x-mo-overwrite-x-mo-codetable": "PartyType",
      "x-mo-codetable": "PartyType"
    },
    "TempData": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    },
    "UpdateBy": {
      "type": "integer",
      "format": "int64"
    },
    "UpdateTime": {
      "type": "string",
      "format": "date-time"
    }
  },
  "x-mo-dd-driven": {
    "modelName": "Party",
    "module": "PTY",
    "objectCode": "Party"
  },
  "$defs": {
    "PartyAccount": {
      "type": "object",
      "description": "Party Account",
      "properties": {
        "@pk": {
          "type": "integer",
          "format": "int64"
        },
        "@type": {
          "type": "string"
        },
        "AccountHolderIdNo": {
          "type": "string"
        },
        "AccountHolderIdType": {
          "type": "string"
        },
        "AccountHolderName": {
          "type": "string"
        },
        "AccountId": {
          "type": "integer",
          "format": "int64"
        },
        "AccountNo": {
          "type": "string"
        },
        "AccountPurpose": {
          "type": "integer",
          "format": "int32"
        },
        "AccountStatus": {
          "type": "string"
        },
        "AccountType": {
          "type": "string"
        },
        "BankId": {
          "type": "integer",
          "format": "int32"
        },
        "BusinessObjectId": {
          "type": "integer",
          "format": "int64"
        },
        "InsertBy": {
          "type": "integer",
          "format": "int64"
        },
        "InsertTime": {
          "type": "string",
          "format": "date-time"
        },
        "IsPrimaryAccount": {
          "type": "string"
        },
        "OldPrimaryKey": {
          "type": "integer",
          "format": "int64"
        },
        "PartyId": {
          "type": "integer",
          "format": "int64"
        },
        "TempData": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "UpdateBy": {
          "type": "integer",
          "format": "int64"
        },
        "UpdateTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "x-mo-dd-driven": {
        "modelName": "PartyAccount",
        "module": "PTY",
        "objectCode": "PartyAccount"
      }
    },
    "PartyAddress": {
      "type": "object",
      "description": "Party Address",
      "properties": {
        "@pk": {
          "type": "integer",
          "format": "int64"
        },
        "@type": {
          "type": "string"
        },
        "AddressId": {
          "type": "integer",
          "format": "int64"
        },
        "AddressStatus": {
          "type": "integer",
          "format": "int32"
        },
        "AddressType": {
          "type": "integer",
          "format": "int32"
        },
        "BusinessObjectId": {
          "type": "integer",
          "format": "int64"
        },
        "CountryCode": {
          "type": "string"
        },
        "FullAddress": {
          "type": "string"
        },
        "InsertBy": {
          "type": "integer",
          "format": "int64"
        },
        "InsertTime": {
          "type": "string",
          "format": "date-time"
        },
        "IsPrimaryAddress": {
          "type": "string"
        },
        "OldPrimaryKey": {
          "type": "integer",
          "format": "int64"
        },
        "PartyId": {
          "type": "integer",
          "format": "int64"
        },
        "PostCode": {
          "type": "string"
        },
        "RegionCode": {
          "type": "string"
        },
        "RegionId": {
          "type": "integer",
          "format": "int64"
        },
        "TempData": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "UpdateBy": {
          "type": "integer",
          "format": "int64"
        },
        "UpdateTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "x-mo-dd-driven": {
        "modelName": "PartyAddress",
        "module": "PTY",
        "objectCode": "PartyAddress"
      }
    },
    "PartyContact": {
      "type": "object",
      "description": "Party Contact",
      "properties": {
        "@pk": {
          "type": "integer",
          "format": "int64"
        },
        "@type": {
          "type": "string"
        },
        "BusinessObjectId": {
          "type": "integer",
          "format": "int64"
        },
        "BusinessTel": {
          "type": "string"
        },
        "ContactId": {
          "type": "integer",
          "format": "int64"
        },
        "ContactStatus": {
          "type": "integer",
          "format": "int32"
        },
        "Email": {
          "type": "string"
        },
        "Fax": {
          "type": "string"
        },
        "HandPhone": {
          "type": "string"
        },
        "HomeTel": {
          "type": "string"
        },
        "InsertBy": {
          "type": "integer",
          "format": "int64"
        },
        "InsertTime": {
          "type": "string",
          "format": "date-time"
        },
        "IsPrimaryContact": {
          "type": "string"
        },
        "Mobile": {
          "type": "string"
        },
        "OldPrimaryKey": {
          "type": "integer",
          "format": "int64"
        },
        "PartyId": {
          "type": "integer",
          "format": "int64"
        },
        "TempData": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "UpdateBy": {
          "type": "integer",
          "format": "int64"
        },
        "UpdateTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "x-mo-dd-driven": {
        "modelName": "PartyContact",
        "module": "PTY",
        "objectCode": "PartyContact"
      }
    }
  }
}