{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"$id": "http://fintrac-canafe.gc.ca/reporting-ingest/api/eftr/v1/schema#",
	"title": "Electronic Funds Transfer Report Schema",
	"type": "object",
	"additionalProperties": false,
	"properties": {
		"reportDetails": {
			"type": "object",
			"minItems": 1,
			"additionalProperties": false,
			"properties": {
				"reportTypeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"submitTypeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"activitySectorCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"reportingEntityNumber": {
					"$ref": "#/definitions/reNumber"
				},
				"submittingReportingEntityNumber": {
					"$ref": "#/definitions/reNumber"
				},
				"reportingEntityReportReference": {
					"$ref": "#/definitions/externalReportReference"
				},
				"twentyFourHourRule": {
					"$ref": "#/definitions/twentyFourHourRule"
				},
				"reportingEntityContactId": {
					"type": "number"
				},
				"eftDirectionCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"ministerialDirectiveCode": {
					"$ref": "#/definitions/string10"
				}
			},
			"required": [
				"reportTypeCode",
				"submitTypeCode",
				"reportingEntityNumber",
				"submittingReportingEntityNumber",
				"reportingEntityReportReference",
				"twentyFourHourRule",
				"eftDirectionCode",
				"reportingEntityContactId"
			]
		},
		"definitions": {
			"$ref": "#/definitions/personEntityData"
		},
		"transactions": {
			"type": "array",
			"minItems": 1,
			"items": {
				"type": "object",
				"additionalProperties": false,
				"properties": {
					"electronicFundsTransactionDetails": {
						"type": "object",
						"additionalProperties": false,
						"properties": {
							"eftTypeCode": {
								"$ref": "#/definitions/optionTypeCode"
							},
							"thresholdIndicator": {
								"type": "boolean"
							},
							"regulatoryExceptionIndicator": {
								"type": "boolean"
							},
							"dateTimeOfTransaction": {
								"$ref": "#/definitions/zonedDateTime"
							},
							"reportingEntityTransactionReference": {
								"$ref": "#/definitions/externalTransactionReference"
							},
							"initiatorAndReceiverIndicator": {
								"type": "boolean"
							},
							"fundsReceivedOrInitiatedWithinInstitutionCode": {
								"$ref": "#/definitions/optionTypeCode"
							},
							"requesterClientStatusCode": {
								"$ref": "#/definitions/optionTypeCode"
							},
							"beneficiaryClientStatusCode": {
								"$ref": "#/definitions/optionTypeCode"
							},
							"fundsOriginatingOutsideCanadaIndicator": {
								"type": "boolean"
							},
							"additionalPartiesSendingIndicator": {
								"type": "boolean"
							},
							"additionalPartiesEffectingSwiftIndicator": {
								"type": "boolean"
							},
							"additionalPaymentInformations": {
								"type": "array",
								"items": {
									"$ref": "#/definitions/additionalPaymentInformation"
								}
							}
						},
						"required": [
							"additionalPaymentInformations"
						]
					},
					"initiator": {
						"type": "object",
						"additionalProperties": false,
						"properties": {
							"typeCode": {
								"enum": [
									0,
									1,
									2,
									7,
									8
								]
							},
							"refId": {
								"$ref": "#/definitions/refId"
							},
							"details": {
								"type": "object",
								"additionalProperties": false,
								"properties": {
									"reportingEntityLocation": {
										"$ref": "#/definitions/reportingEntityLocation"
									},
									"bicOrBeiCode": {
										"$ref": "#/definitions/string50"
									},
									"eftActivityIdentificationNumber": {
										"$ref": "#/definitions/string50"
									}
								}
							}
						},
						"required": [
							"typeCode",
							"details"
						]
					},
					"startingActions": {
						"type": "array",
						"minItems": 1,
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"details": {
									"type": "object",
									"additionalProperties": false,
									"properties": {
										"amount": {
											"$ref": "#/definitions/currencyAmount"
										},
										"currencyCode": {
											"$ref": "#/definitions/alpha3"
										},
										"exchangeRate": {
											"$ref": "#/definitions/exchangeRate"
										},
										"sourceOfFundsObtainedIndicator": {
											"type": "boolean"
										},
										"howFundsObtained": {
											"$ref": "#/definitions/string200"
										}
									}
								},
								"sourcesOfFunds": {
									"type": "array",
									"items": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"typeCode": {
												"enum": [
													1,
													2
												]
											},
											"refId": {
												"$ref": "#/definitions/refId"
											},
											"details": {
												"type": "object",
												"additionalProperties": false,
												"properties": {
													"accountNumber": {
														"$ref": "#/definitions/string100"
													},
													"policyNumber": {
														"$ref": "#/definitions/string100"
													},
													"identifyingNumber": {
														"$ref": "#/definitions/string100"
													}
												}
											}
										},
										"required": [
											"typeCode",
											"refId"
										]
									}
								},
								"requesters": {
									"type": "array",
									"items": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"typeCode": {
												"enum": [
													3,
													4
												]
											},
											"refId": {
												"$ref": "#/definitions/refId"
											},
											"details": {
												"type": "object",
												"additionalProperties": false,
												"properties": {
													"clientNumber": {
														"$ref": "#/definitions/string100"
													},
													"emailAddress": {
														"$ref": "#/definitions/string200"
													},
													"typeOfDeviceCode": {
														"$ref": "#/definitions/optionTypeCode"
													},
													"typeOfDeviceOther": {
														"$ref": "#/definitions/string200"
													},
													"username": {
														"$ref": "#/definitions/string100"
													},
													"deviceIdentifierNumber": {
														"$ref": "#/definitions/string200"
													},
													"internetProtocolAddress": {
														"$ref": "#/definitions/string200"
													},
													"dateTimeOfOnlineSession": {
														"$ref": "#/definitions/zonedDateTime"
													},
													"accounts": {
														"type": "array",
														"items": {
															"$ref": "#/definitions/account"
														}
													},
													"otherAccountHoldersIndicator": {
														"type": "boolean"
													},
													"onBehalfOfIndicator": {
														"type": "boolean"
													}
												},
												"required": [
													"accounts"
												]
											},
											"otherAccountHolders": {
												"type": "array",
												"items": {
													"type": "object",
													"additionalProperties": false,
													"properties": {
														"typeCode": {
															"enum": [
																3,
																4
															]
														},
														"refId": {
															"$ref": "#/definitions/refId"
														},
														"details": {
															"type": "object",
															"additionalProperties": false,
															"properties": {
																"clientNumber": {
																	"$ref": "#/definitions/string100"
																},
																"emailAddress": {
																	"$ref": "#/definitions/string200"
																},
																"relationshipOfRequesterCode": {
																	"$ref": "#/definitions/optionTypeCode"
																},
																"relationshipOfRequesterOther": {
																	"$ref": "#/definitions/string200"
																}
															}
														}
													},
													"required": [
														"typeCode",
														"refId"
													]
												}
											},
											"onBehalfOfs": {
												"type": "array",
												"items": {
													"type": "object",
													"additionalProperties": false,
													"properties": {
														"typeCode": {
															"enum": [
																3,
																4,
																9,
																10
															]
														},
														"refId": {
															"$ref": "#/definitions/refId"
														},
														"details": {
															"type": "object",
															"additionalProperties": false,
															"properties": {
																"clientNumber": {
																	"$ref": "#/definitions/string100"
																},
																"emailAddress": {
																	"$ref": "#/definitions/string200"
																},
																"relationshipOfRequesterCode": {
																	"$ref": "#/definitions/optionTypeCode"
																},
																"relationshipOfRequesterOther": {
																	"$ref": "#/definitions/string200"
																}
															}
														}
													},
													"required": [
														"typeCode",
														"refId"
													]
												}
											}
										},
										"required": [
											"typeCode",
											"refId",
											"otherAccountHolders",
											"onBehalfOfs"
										]
									}
								}
							},
							"required": [
								"sourcesOfFunds",
								"requesters"
							]
						}
					},
					"senders": {
						"type": "array",
						"minItems": 0,
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"typeCode": {
									"enum": [
										7,
										8
									]
								},
								"refId": {
									"$ref": "#/definitions/refId"
								},
								"details": {
									"type": "object",
									"additionalProperties": false,
									"properties": {
										"bicOrBeiCode": {
											"$ref": "#/definitions/string50"
										},
										"eftActivityIdentificationNumber": {
											"$ref": "#/definitions/string50"
										},
										"relationshipWithInitiatorCode": {
											"$ref": "#/definitions/optionTypeCode"
										},
										"relationshipWithInitiatorOther": {
											"$ref": "#/definitions/string200"
										},
										"relationshipWithReceiverCode": {
											"$ref": "#/definitions/optionTypeCode"
										},
										"relationshipWithReceiverOther": {
											"$ref": "#/definitions/string200"
										}
									}
								}
							}
						}
					},
					"involvements": {
						"type": "array",
						"minItems": 0,
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"typeCode": {
									"enum": [
										7,
										8
									]
								},
								"refId": {
									"$ref": "#/definitions/refId"
								},
								"details": {
									"type": "object",
									"additionalProperties": false,
									"properties": {
										"bicOrBeiCode": {
											"$ref": "#/definitions/string50"
										},
										"eftActivityIdentificationNumber": {
											"$ref": "#/definitions/string50"
										},
										"relationshipWithInitiatorCode": {
											"$ref": "#/definitions/optionTypeCode"
										},
										"relationshipWithInitiatorOther": {
											"$ref": "#/definitions/string200"
										},
										"relationshipWithSenderCode": {
											"$ref": "#/definitions/optionTypeCode"
										},
										"relationshipWithSenderOther": {
											"$ref": "#/definitions/string200"
										},
										"relationshipWithReceiverCode": {
											"$ref": "#/definitions/optionTypeCode"
										},
										"relationshipWithReceiverOther": {
											"$ref": "#/definitions/string200"
										}
									}
								}
							},
							"required": [
								"typeCode",
								"refId"
							]
						}
					},
					"completingActions": {
						"type": "array",
						"minItems": 1,
						"items": {
							"type": "object",
							"additionalProperties": false,
							"properties": {
								"details": {
									"type": "object",
									"additionalProperties": false,
									"properties": {
										"dispositionCode": {
											"$ref": "#/definitions/optionTypeCode"
										},
										"dispositionOther": {
											"$ref": "#/definitions/string200"
										},
										"amount": {
											"$ref": "#/definitions/currencyAmount"
										},
										"currencyCode": {
											"$ref": "#/definitions/alpha3"
										},
										"virtualCurrencyTypeCode": {
											"$ref": "#/definitions/string20"
										},
										"virtualCurrencyTypeOther": {
											"$ref": "#/definitions/string200"
										},
										"exchangeRate": {
											"$ref": "#/definitions/exchangeRate"
										},
										"valueInCanadianDollars": {
											"$ref": "#/definitions/currencyAmount"
										},
										"involvementsIndicator": {
											"type": "boolean"
										}
									}
								},
								"beneficiaries": {
									"type": "array",
									"items": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"typeCode": {
												"enum": [
													3,
													4
												]
											},
											"refId": {
												"$ref": "#/definitions/refId"
											},
											"details": {
												"type": "object",
												"additionalProperties": false,
												"properties": {
													"clientNumber": {
														"$ref": "#/definitions/string100"
													},
													"username": {
														"$ref": "#/definitions/string100"
													},
													"emailAddress": {
														"$ref": "#/definitions/string200"
													},
													"accounts": {
														"type": "array",
														"items": {
															"$ref": "#/definitions/account"
														}
													},
													"onBehalfOfIndicator": {
														"type": "boolean"
													}
												},
												"required": [
													"accounts"
												]
											},
											"onBehalfOfs": {
												"type": "array",
												"items": {
													"type": "object",
													"additionalProperties": false,
													"properties": {
														"typeCode": {
															"enum": [
																3,
																4,
																9,
																10
															]
														},
														"refId": {
															"$ref": "#/definitions/refId"
														},
														"details": {
															"type": "object",
															"additionalProperties": false,
															"properties": {
																"clientNumber": {
																	"$ref": "#/definitions/string100"
																},
																"emailAddress": {
																	"$ref": "#/definitions/string200"
																},
																"relationshipWithBeneficiaryCode": {
																	"$ref": "#/definitions/optionTypeCode"
																},
																"relationshipWithBeneficiaryOther": {
																	"$ref": "#/definitions/string200"
																}
															}
														}
													},
													"required": [
														"typeCode",
														"refId"
													]
												}
											}
										},
										"required": [
											"typeCode",
											"refId",
											"onBehalfOfs"
										]
									}
								},
								"involvements": {
									"type": "array",
									"items": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"typeCode": {
												"enum": [
													1,
													2
												]
											},
											"refId": {
												"$ref": "#/definitions/refId"
											},
											"details": {
												"type": "object",
												"additionalProperties": false,
												"properties": {
													"accountNumber": {
														"$ref": "#/definitions/string100"
													},
													"policyNumber": {
														"$ref": "#/definitions/string100"
													},
													"identifyingNumber": {
														"$ref": "#/definitions/string100"
													}
												}
											}
										},
										"required": [
											"typeCode",
											"refId"
										]
									}
								}
							},
							"required": [
								"beneficiaries",
								"involvements"
							]
						}
					},
					"receiver": {
						"type": "object",
						"additionalProperties": false,
						"properties": {
							"typeCode": {
								"enum": [
									0,
									1,
									2,
									7,
									8
								]
							},
							"refId": {
								"$ref": "#/definitions/refId"
							},
							"details": {
								"type": "object",
								"additionalProperties": false,
								"properties": {
									"reportingEntityLocation": {
										"$ref": "#/definitions/reportingEntityLocation"
									},
									"bicOrBeiCode": {
										"$ref": "#/definitions/string50"
									},
									"eftActivityIdentificationNumber": {
										"$ref": "#/definitions/string50"
									}
								}
							}
						},
						"required": [
							"typeCode",
							"details"
						]
					}
				},
				"required": [
					"electronicFundsTransactionDetails",
					"initiator",
					"startingActions",
					"senders",
					"involvements",
					"completingActions",
					"receiver"
				]
			}
		}
	},
	"required": [
		"reportDetails",
		"definitions",
		"transactions"
	],
	"definitions": {
		"personEntityData": {
			"type": "array",
			"items": {
				"allOf": [
					{
						"type": "object",
						"properties": {
							"typeCode": {
								"enum": [
									1,
									2,
									3,
									4,
									7,
									8,
									9,
									10
								]
							}
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 1
								}
							}
						},
						"then": {
							"$ref": "#/definitions/personName"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 2
								}
							}
						},
						"then": {
							"$ref": "#/definitions/entityName"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 3
								}
							}
						},
						"then": {
							"$ref": "#/definitions/personDetails"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 4
								}
							}
						},
						"then": {
							"$ref": "#/definitions/entityDetails"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 7
								}
							}
						},
						"then": {
							"$ref": "#/definitions/personNameAddress"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 8
								}
							}
						},
						"then": {
							"$ref": "#/definitions/entityNameAddress"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 9
								}
							}
						},
						"then": {
							"$ref": "#/definitions/personBasicDetails"
						}
					},
					{
						"if": {
							"properties": {
								"typeCode": {
									"const": 10
								}
							}
						},
						"then": {
							"$ref": "#/definitions/entityBasicDetails"
						}
					}
				]
			}
		},
		"personName": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						1
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"givenName": {
					"$ref": "#/definitions/string100"
				},
				"surname": {
					"$ref": "#/definitions/string100"
				},
				"otherNameInitial": {
					"$ref": "#/definitions/string100"
				}
			},
			"required": [
				"typeCode",
				"refId"
			]
		},
		"entityName": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						2
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"nameOfEntity": {
					"$ref": "#/definitions/string100"
				}
			},
			"required": [
				"typeCode",
				"refId"
			]
		},
		"personDetails": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						3
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"givenName": {
					"$ref": "#/definitions/string100"
				},
				"surname": {
					"$ref": "#/definitions/string100"
				},
				"otherNameInitial": {
					"$ref": "#/definitions/string100"
				},
				"alias": {
					"$ref": "#/definitions/string100"
				},
				"addressTypeCode": {
					"enum": [
						1,
						2
					]
				},
				"address": {
					"allOf": [
						{
							"type": "object",
							"properties": {
								"typeCode": {
									"enum": [
										1,
										2
									]
								}
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 1
									}
								}
							},
							"then": {
								"$ref": "#/definitions/structuredAddress"
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 2
									}
								}
							},
							"then": {
								"$ref": "#/definitions/unstructuredAddress"
							}
						}
					]
				},
				"telephoneNumber": {
					"$ref": "#/definitions/string20"
				},
				"extensionNumber": {
					"$ref": "#/definitions/string10"
				},
				"dateOfBirth": {
					"$ref": "#/definitions/localDate"
				},
				"countryOfResidenceCode": {
					"$ref": "#/definitions/alpha2"
				},
				"occupation": {
					"$ref": "#/definitions/string200"
				},
				"nameOfEmployer": {
					"$ref": "#/definitions/string100"
				},
				"identifications": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/identificationWithJurisdiction"
					}
				}
			},
			"required": [
				"typeCode",
				"refId",
				"identifications"
			]
		},
		"entityDetails": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						4
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"nameOfEntity": {
					"$ref": "#/definitions/string100"
				},
				"addressTypeCode": {
					"enum": [
						1,
						2
					]
				},
				"address": {
					"allOf": [
						{
							"type": "object",
							"properties": {
								"typeCode": {
									"enum": [
										1,
										2
									]
								}
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 1
									}
								}
							},
							"then": {
								"$ref": "#/definitions/structuredAddress"
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 2
									}
								}
							},
							"then": {
								"$ref": "#/definitions/unstructuredAddress"
							}
						}
					]
				},
				"telephoneNumber": {
					"$ref": "#/definitions/string20"
				},
				"extensionNumber": {
					"$ref": "#/definitions/string10"
				},
				"natureOfPrincipalBusiness": {
					"$ref": "#/definitions/string200"
				},
				"registrationIncorporationIndicator": {
					"type": "boolean"
				},
				"registrationsIncorporations": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/registrationIncorporation"
					}
				},
				"identifications": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/identificationWithJurisdiction"
					}
				},
				"authorizedPersons": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/authorizedPerson"
					}
				}
			},
			"required": [
				"typeCode",
				"refId",
				"registrationsIncorporations",
				"identifications",
				"authorizedPersons"
			]
		},
		"personNameAddress": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						7
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"givenName": {
					"$ref": "#/definitions/string100"
				},
				"surname": {
					"$ref": "#/definitions/string100"
				},
				"otherNameInitial": {
					"$ref": "#/definitions/string100"
				},
				"addressTypeCode": {
					"enum": [
						1,
						2
					]
				},
				"address": {
					"allOf": [
						{
							"type": "object",
							"properties": {
								"typeCode": {
									"enum": [
										1,
										2
									]
								}
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 1
									}
								}
							},
							"then": {
								"$ref": "#/definitions/structuredAddress"
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 2
									}
								}
							},
							"then": {
								"$ref": "#/definitions/unstructuredAddress"
							}
						}
					]
				}
			},
			"required": [
				"typeCode",
				"refId"
			]
		},
		"entityNameAddress": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						8
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"nameOfEntity": {
					"$ref": "#/definitions/string100"
				},
				"addressTypeCode": {
					"enum": [
						1,
						2
					]
				},
				"address": {
					"allOf": [
						{
							"type": "object",
							"properties": {
								"typeCode": {
									"enum": [
										1,
										2
									]
								}
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 1
									}
								}
							},
							"then": {
								"$ref": "#/definitions/structuredAddress"
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 2
									}
								}
							},
							"then": {
								"$ref": "#/definitions/unstructuredAddress"
							}
						}
					]
				}
			},
			"required": [
				"typeCode",
				"refId"
			]
		},
		"personBasicDetails": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						9
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"givenName": {
					"$ref": "#/definitions/string100"
				},
				"surname": {
					"$ref": "#/definitions/string100"
				},
				"otherNameInitial": {
					"$ref": "#/definitions/string100"
				},
				"addressTypeCode": {
					"enum": [
						1,
						2
					]
				},
				"address": {
					"allOf": [
						{
							"type": "object",
							"properties": {
								"typeCode": {
									"enum": [
										1,
										2
									]
								}
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 1
									}
								}
							},
							"then": {
								"$ref": "#/definitions/structuredAddress"
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 2
									}
								}
							},
							"then": {
								"$ref": "#/definitions/unstructuredAddress"
							}
						}
					]
				},
				"dateOfBirth": {
					"$ref": "#/definitions/localDate"
				},
				"occupation": {
					"$ref": "#/definitions/string200"
				},
				"identifications": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/identification"
					}
				}
			},
			"required": [
				"typeCode",
				"refId",
				"identifications"
			]
		},
		"entityBasicDetails": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						10
					]
				},
				"refId": {
					"$ref": "#/definitions/refId"
				},
				"nameOfEntity": {
					"$ref": "#/definitions/string100"
				},
				"addressTypeCode": {
					"enum": [
						1,
						2
					]
				},
				"address": {
					"allOf": [
						{
							"type": "object",
							"properties": {
								"typeCode": {
									"enum": [
										1,
										2
									]
								}
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 1
									}
								}
							},
							"then": {
								"$ref": "#/definitions/structuredAddress"
							}
						},
						{
							"if": {
								"properties": {
									"typeCode": {
										"const": 2
									}
								}
							},
							"then": {
								"$ref": "#/definitions/unstructuredAddress"
							}
						}
					]
				},
				"natureOfPrincipalBusiness": {
					"$ref": "#/definitions/string200"
				},
				"registrationIncorporationIndicator": {
					"type": "boolean"
				},
				"registrationsIncorporations": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/registrationIncorporation"
					}
				},
				"identifications": {
					"type": "array",
					"items": {
						"$ref": "#/definitions/identification"
					}
				}
			},
			"required": [
				"typeCode",
				"refId",
				"registrationsIncorporations",
				"identifications"
			]
		},
		"authorizedPerson": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"surname": {
					"$ref": "#/definitions/string100"
				},
				"givenName": {
					"$ref": "#/definitions/string100"
				},
				"otherNameInitial": {
					"$ref": "#/definitions/string100"
				}
			}
		},
		"structuredAddress": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						1
					]
				},
				"unitNumber": {
					"$ref": "#/definitions/string10"
				},
				"buildingNumber": {
					"$ref": "#/definitions/string10"
				},
				"streetAddress": {
					"$ref": "#/definitions/string100"
				},
				"city": {
					"$ref": "#/definitions/string100"
				},
				"district": {
					"$ref": "#/definitions/string100"
				},
				"provinceStateCode": {
					"$ref": "#/definitions/alpha2"
				},
				"provinceStateName": {
					"$ref": "#/definitions/string100"
				},
				"subProvinceSubLocality": {
					"$ref": "#/definitions/string100"
				},
				"postalZipCode": {
					"$ref": "#/definitions/string20"
				},
				"countryCode": {
					"$ref": "#/definitions/alpha2"
				}
			},
			"required": [
				"typeCode"
			]
		},
		"unstructuredAddress": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"enum": [
						2
					]
				},
				"countryCode": {
					"$ref": "#/definitions/alpha2"
				},
				"unstructured": {
					"$ref": "#/definitions/string500"
				}
			},
			"required": [
				"typeCode",
				"unstructured"
			]
		},
		"twentyFourHourRule": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"aggregationTypeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"periodStart": {
					"$ref": "#/definitions/zonedDateTime"
				},
				"periodEnd": {
					"$ref": "#/definitions/zonedDateTime"
				}
			}
		},
		"identification": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"identifierTypeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"identifierTypeOther": {
					"$ref": "#/definitions/string200"
				},
				"number": {
					"$ref": "#/definitions/string100"
				}
			}
		},
		"identificationWithJurisdiction": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"identifierTypeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"identifierTypeOther": {
					"$ref": "#/definitions/string200"
				},
				"number": {
					"$ref": "#/definitions/string100"
				},
				"jurisdictionOfIssueCountryCode": {
					"$ref": "#/definitions/alpha2"
				},
				"jurisdictionOfIssueProvinceStateCode": {
					"$ref": "#/definitions/alpha2"
				},
				"jurisdictionOfIssueProvinceStateName": {
					"$ref": "#/definitions/string100"
				}
			}
		},
		"registrationIncorporation": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"typeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"number": {
					"$ref": "#/definitions/string100"
				},
				"jurisdictionOfIssueCountryCode": {
					"$ref": "#/definitions/alpha2"
				},
				"jurisdictionOfIssueProvinceStateCode": {
					"$ref": "#/definitions/alpha2"
				},
				"jurisdictionOfIssueProvinceStateName": {
					"$ref": "#/definitions/string100"
				}
			}
		},
		"reportingEntityLocation": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"id": {
					"$ref": "#/definitions/string30"
				}
			}
		},
		"account": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"referenceNumber": {
					"$ref": "#/definitions/string100"
				},
				"otherRelatedReferenceNumber": {
					"$ref": "#/definitions/string100"
				},
				"financialInstitutionNumber": {
					"$ref": "#/definitions/string50"
				},
				"branchNumber": {
					"$ref": "#/definitions/string50"
				},
				"number": {
					"$ref": "#/definitions/string100"
				},
				"typeCode": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"typeOther": {
					"$ref": "#/definitions/string200"
				},
				"currencyCode": {
					"$ref": "#/definitions/alpha3"
				},
				"dateOpened": {
					"$ref": "#/definitions/localDate"
				},
				"holders": {
					"type": "array",
					"items": {
						"type": "object",
						"additionalProperties": false,
						"properties": {
							"typeCode": {
								"enum": [
									1,
									2
								]
							},
							"refId": {
								"$ref": "#/definitions/refId"
							}
						},
						"required": [
							"typeCode",
							"refId"
						]
					}
				}
			},
			"required": [
				"holders"
			]
		},
		"additionalPaymentInformation": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"tag": {
					"$ref": "#/definitions/optionTypeCode"
				},
				"rawValue": {
					"$ref": "#/definitions/string10000"
				}
			},
			"required": [
				"tag",
				"rawValue"
			]
		},
		"alpha2": {
			"type": "string",
			"minLength": 2,
			"maxLength": 2
		},
		"alpha3": {
			"type": "string",
			"minLength": 3,
			"maxLength": 3
		},
		"string10": {
			"type": "string",
			"minLength": 0,
			"maxLength": 10
		},
		"string20": {
			"type": "string",
			"minLength": 0,
			"maxLength": 20
		},
		"string30": {
			"type": "string",
			"minLength": 0,
			"maxLength": 30
		},
		"string50": {
			"type": "string",
			"minLength": 0,
			"maxLength": 50
		},
		"string100": {
			"type": "string",
			"minLength": 0,
			"maxLength": 100
		},
		"string200": {
			"type": "string",
			"minLength": 0,
			"maxLength": 200
		},
		"string500": {
			"type": "string",
			"minLength": 0,
			"maxLength": 500
		},
		"string10000": {
			"type": "string",
			"minLength": 0,
			"maxLength": 10000
		},
		"optionTypeCode": {
			"type": "integer",
			"minimum": 0,
			"maximum": 99999
		},
		"externalReportReference": {
			"type": "string",
			"pattern": "^[A-Za-z0-9-_]{1,100}$"
		},
		"externalTransactionReference": {
			"type": "string",
			"pattern": "^[A-Za-z0-9-_]{1,200}$"
		},
		"refId": {
			"type": "string",
			"pattern": "^[A-Za-z0-9-_]{1,50}$"
		},
		"reNumber": {
			"type": "number",
			"minimum": 0,
			"maximum": 9999999
		},
		"telephone": {
			"type": "string",
			"minLength": 0,
			"maxLength": 20
		},
		"telephoneExtension": {
			"type": "string",
			"minLength": 0,
			"maxLength": 10
		},
		"currencyAmount": {
			"type": "string",
			"pattern": "^\\d{1,17}(\\.\\d{2,10})?$"
		},
		"exchangeRate": {
			"type": "string",
			"pattern": "^\\d{1,17}(\\.\\d{2,10})?$"
		},
		"zonedDateTime": {
			"type": "string",
			"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[\\-\\+][0-9]{2}:[0-9]{2}$"
		},
		"localDate": {
			"type": "string",
			"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
		},
		"zonedTime": {
			"type": "string",
			"pattern": "^[0-9]{2}:[0-9]{2}:[0-9]{2}[\\-\\+][0-9]{2}:[0-9]{2}$"
		}
	}
}