{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swift/json-schema/swift-statement-schema.json",
  "title": "Statement",
  "description": "Provides underlying details of transactions that have been included in the entry. Corporate can receive information from their bank(s) about the activity happening on a given account for cash management balance reporting. This will include all entries booked to the account for the specified period.\n",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swift-cash-management-api-openapi.yml#/components/schemas/Statement",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "identification": {
      "description": "Unique identification, as assigned by the account servicer, to unambiguously identify the account statement.\n",
      "type": "string",
      "minLength": 1,
      "maxLength": 36,
      "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
    },
    "creation_date_time": {
      "$ref": "#/$defs/ISODateTime"
    },
    "from_date_time": {
      "$ref": "#/$defs/ISODateTime"
    },
    "to_date_time": {
      "$ref": "#/$defs/ISODateTime"
    },
    "statement_period": {
      "description": "Specify various end of cycle statement reporting (statement periods)\n\nUsage - This may be used to indicate cycle type. Where this is used, all transactions must be related to that cycle. \nEODY - for End of Day - Daily Statement\nEOWK - for End of Week - Weekly Statement\nEOMH - for End of Month - Monthly Statement\nEOYR - for End of Year - Yearly Statement\n",
      "type": "string",
      "enum": [
        "EODY",
        "EOWK",
        "EOMH",
        "EOYR"
      ],
      "default": "EODY"
    },
    "account": {
      "$ref": "#/$defs/CashAccount"
    },
    "related_account": {
      "$ref": "#/$defs/Account"
    },
    "interest": {
      "type": "array",
      "description": "Provides general interest information that applies to the account at a particular moment in time.",
      "items": {
        "$ref": "#/$defs/AccountInterest"
      }
    },
    "balance": {
      "type": "array",
      "minItems": 2,
      "description": "Set of elements used to define the balance as a numerical representation of the net increases and decreases in an account at a specific point in time.  \nUsage - Required balance types - OPBD = OpeningBooked with date on which the opening balance was determined CLBD = ClosingBooked. Rest of the balance types must be bilaterally determined.\n",
      "items": {
        "$ref": "#/$defs/Balance"
      }
    },
    "statement_entry": {
      "type": "array",
      "description": "Specifies an entry in the Statement. For reporting single transaction or batch.\n\nUsage - At least one reference must be provided to identify the entry and its underlying transaction(s). \n",
      "items": {
        "$ref": "#/$defs/StatementEntry"
      }
    },
    "links": {
      "$ref": "#/$defs/Links"
    }
  },
  "required": [
    "identification",
    "statement_period",
    "account",
    "balance"
  ],
  "$defs": {
    "Account": {
      "type": "object",
      "description": "Provides the details to identify an account.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "$ref": "#/$defs/AccountIdentificationChoice"
        },
        "type": {
          "$ref": "#/$defs/CashAccountTypeChoice"
        },
        "currency": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyCode"
        },
        "name": {
          "description": "Name of the account, as assigned by the account servicing institution, in agreement with the account owner in order to provide an additional means of identification of the account.  \n\nUsage: The account name is different from the account owner name. The account name is used in certain user communities to provide a means of identifying the account, in addition to the account owners identity and the account number.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 70,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "alternate_identification": {
          "$ref": "#/$defs/GenericIdentification"
        }
      },
      "required": [
        "identification"
      ]
    },
    "AccountIdentificationChoice": {
      "type": "object",
      "description": "Specifies the unique identification of an account as assigned by the account servicer.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "iban"
          ],
          "properties": {
            "iban": {
              "$ref": "#/$defs/IBAN2007Identifier"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "other"
          ],
          "properties": {
            "other": {
              "$ref": "#/$defs/GenericIdentification"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "AccountInterest": {
      "type": "object",
      "description": "Provides general interest information that applies to the account at a particular moment in time.",
      "additionalProperties": false,
      "properties": {
        "type": {
          "$ref": "#/$defs/InterestTypeChoice"
        },
        "rate": {
          "type": "array",
          "description": "Set of elements used to qualify the interest rate.",
          "items": {
            "$ref": "#/$defs/Rate"
          }
        },
        "from_to_date": {
          "$ref": "#/$defs/DateTimePeriod"
        },
        "reason": {
          "description": "Specifies the reason for the interest.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "tax": {
          "$ref": "#/$defs/TaxCharges"
        }
      }
    },
    "ActiveOrHistoricCurrencyAndAmount": {
      "type": "object",
      "description": "A number of monetary units specified in an active or a historic currency where the unit of currency is explicit and compliant with ISO 4217.",
      "properties": {
        "currency": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyCode"
        },
        "amount": {
          "type": "string",
          "maxLength": 18,
          "pattern": "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|0*|([0-9]{0,18}))$"
        }
      }
    },
    "ActiveOrHistoricCurrencyAndAmountRange": {
      "type": "object",
      "description": "Range of amount values.",
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/ImpliedCurrencyAmountRangeChoice"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        },
        "currency": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyCode"
        }
      },
      "required": [
        "amount",
        "currency"
      ]
    },
    "ActiveOrHistoricCurrencyCode": {
      "type": "string",
      "pattern": "^[A-Z]{3,3}$",
      "description": "A code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 \"Codes for the representation of currencies and funds\".\n"
    },
    "AmountAndCurrencyExchange": {
      "type": "object",
      "description": "Set of elements used to provide information on the original amount.",
      "additionalProperties": false,
      "properties": {
        "instructed_amount": {
          "$ref": "#/$defs/AmountAndCurrencyExchangeDetails"
        },
        "transaction_amount": {
          "$ref": "#/$defs/AmountAndCurrencyExchangeDetails"
        },
        "counter_value_amount": {
          "$ref": "#/$defs/AmountAndCurrencyExchangeDetails"
        },
        "announced_posting_amount": {
          "$ref": "#/$defs/AmountAndCurrencyExchangeDetails"
        },
        "proprietary_amount": {
          "type": "array",
          "description": "Set of elements used to provide information on the original amount and currency exchange.",
          "items": {
            "$ref": "#/$defs/AmountAndCurrencyExchangeDetails"
          }
        }
      }
    },
    "AmountAndCurrencyExchangeDetails": {
      "type": "object",
      "description": "Set of elements used to provide information on the original amount and currency exchange.",
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "currency_exchange": {
          "$ref": "#/$defs/CurrencyExchange"
        }
      },
      "required": [
        "amount"
      ]
    },
    "AmountRangeBoundary": {
      "type": "object",
      "description": "Limit for an amount range.",
      "additionalProperties": false,
      "properties": {
        "boundary_amount": {
          "$ref": "#/$defs/ImpliedCurrencyAndAmount"
        },
        "included": {
          "description": "Indicates whether the boundary amount is included in the range of amount values.",
          "type": "boolean"
        }
      },
      "required": [
        "boundary_amount",
        "included"
      ]
    },
    "AnyBICDec2014Identifier": {
      "type": "string",
      "description": "Code allocated to a financial or non-financial institution by the ISO 9362 Registration Authority, as described in ISO 9362: 2014 - \"Banking - Banking telecommunication messages - Business identifier code (BIC)\".",
      "pattern": "^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$"
    },
    "BICFIDec2014Identifier": {
      "type": "string",
      "description": "Code allocated to a financial institution by the ISO 9362 Registration Authority as described in ISO 9362 - 2014 - Banking - Banking telecommunication messages - Business identifier code (BIC)\n",
      "pattern": "^[A-Z0-9]{4,4}[A-Z]{2,2}[A-Z0-9]{2,2}([A-Z0-9]{3,3}){0,1}$"
    },
    "Balance": {
      "type": "object",
      "description": "Numerical representation of the net increases and decreases in an account at a specific point in time.",
      "additionalProperties": false,
      "properties": {
        "type": {
          "$ref": "#/$defs/BalanceTypeCode"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        },
        "date": {
          "description": "Indicates the date (and time) of the balance. Recommendation that this be expressed in local time with UTC offset format (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm).\n",
          "oneOf": [
            {
              "$ref": "#/$defs/ISODateTime"
            },
            {
              "$ref": "#/$defs/ISODate"
            }
          ]
        },
        "credit_line": {
          "type": "array",
          "description": "Set of elements used to provide details on the credit line.",
          "items": {
            "$ref": "#/$defs/CreditLine"
          }
        },
        "availability": {
          "type": "array",
          "description": "Set of elements used to indicate when the booked amount of money will become available, that is can be accessed and starts generating interest.   \n\nUsage: This type of information is used in the US and is linked to particular instruments such as cheques. Example: When a cheque is deposited, it will be booked on the deposit day, but the amount of money will only be accessible as of the indicated availability day (according to national banking regulations).\n",
          "items": {
            "$ref": "#/$defs/BalanceAvailability"
          }
        }
      },
      "required": [
        "type",
        "amount",
        "credit_debit_indicator",
        "date"
      ]
    },
    "BalanceAvailability": {
      "type": "object",
      "description": "Indicates when the amount of money will become available, that is can be accessed and start generating interest.",
      "additionalProperties": false,
      "properties": {
        "date": {
          "$ref": "#/$defs/ISODate"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        }
      },
      "required": [
        "date",
        "amount",
        "credit_debit_indicator"
      ]
    },
    "BalanceTypeCode": {
      "type": "string",
      "description": "Specifies the nature of the balance.\n*`CLAV_closing_available`-Closing balance of amount of money that is at the disposal of the account owner on the date specified.\n*`CLBD_closing_booked`-Balance of the account at the end of the pre-agreed account reporting period. It is the sum of the opening booked balance at the beginning of the period and all entries booked to the account during the pre-agreed account reporting period.\n*`FWAV_forward_available`-Forward available balance of money that is at the disposal of the account owner on the date specified.\n*`ITAV_interim_available`-Available balance calculated in the course of the account servicer's business day, at the time specified, and subject to further changes during the business day. The interim balance is calculated on the basis of booked credit and debit items during the calculation time/period specified.\n*`OPAV_opening_available`- Opening balance of amount of money that is at the disposal of the account owner on the date specified.\n*`OPBD_opening_booked`-Book balance of the account at the beginning of the account reporting period. It always equals the closing book balance from the previous report.\n*`PRCD_previously_closed_booked`-Balance of the account at the previously closed account reporting period. The opening booked balance for the new period has to be equal to this balance. \n\nUsage: the previously booked closing balance should equal (inclusive date) the booked closing balance of the date it references and equal the actual booked opening balance of the current date.\n",
      "enum": [
        "CLAV",
        "CLBD",
        "FWAV",
        "ITAV",
        "OPAV",
        "OPBD",
        "PRCD"
      ]
    },
    "BankTransactionCode": {
      "type": "object",
      "description": "Set of elements used to identify the type or operations code of a transaction entry.",
      "additionalProperties": false,
      "properties": {
        "domain_code": {
          "description": "Specifies the external domain code of the bank transaction code (business area of the underlying transaction) in the format of character string with a maximum length of 4 characters. The list of valid codes is an external code list published separately. External code sets can be downloaded from www.iso20022.org.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 4
        },
        "family_code": {
          "description": "Specifies the bank transaction code family within a domain, as published in an external bank transaction code family code list. External code sets can be downloaded from www.iso20022.org.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 4
        },
        "sub_family_code": {
          "description": "Specifies the bank transaction code sub-product (sub-family) family within a specific family, as published in an external bank transaction code sub-family code list. External code sets can be downloaded from www.iso20022.org.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 4
        },
        "proprietary_code": {
          "description": "Proprietary bank transaction code to identify the underlying transaction.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "issuer": {
          "description": "Identification of the issuer of the proprietary bank transaction code.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      }
    },
    "BaseOneRate": {
      "description": "Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.",
      "type": "string",
      "maxLength": 12
    },
    "BatchInformation": {
      "type": "object",
      "description": "Provides details on batched transactions.",
      "additionalProperties": false,
      "properties": {
        "message_identification": {
          "description": "Point to point reference, as assigned by the sending party, to unambiguously identify the batch of transactions.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "payment_information_identification": {
          "description": "Unique identification, as assigned by a sending party, to unambiguously identify the payment information group within the message.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "number_of_transactions": {
          "type": "integer",
          "format": "int32",
          "minLength": 1,
          "maxLength": 15
        },
        "total_amount": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyAndAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        }
      }
    },
    "BranchAndFinancialInstitutionIdentification": {
      "type": "object",
      "description": "Unique and unambiguous identification of a financial institution or a branch of a financial institution.",
      "additionalProperties": false,
      "properties": {
        "financial_institution_identification": {
          "$ref": "#/$defs/FinancialInstitutionIdentification"
        },
        "branch_identification": {
          "$ref": "#/$defs/BranchIdentification"
        }
      },
      "required": [
        "financial_institution_identification"
      ]
    },
    "BranchIdentification": {
      "type": "object",
      "description": "Information that locates and identifies a specific branch of a financial institution.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "description": "Unique and unambiguous identification of a branch of a financial institution.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "lei": {
          "$ref": "#/$defs/LEIIdentifier"
        },
        "name": {
          "description": "Name by which an agent is known and which is usually used to identify that agent.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "postal_address": {
          "description": "Information that locates and identifies a specific address, as defined by postal services.\n\nRECOMMENDATION IN ORDER OF PREFERENCE: \n* Use only structured address with mandatory Town Name and Country \n* When using unstructured address, (Address Line), max 1 occurrence with 105 text is allowed. \n* Address Line must not contain Country which must be included in the dedicated Country element in the unstructured structured address. \n",
          "oneOf": [
            {
              "$ref": "#/$defs/PostalAddress"
            },
            {
              "$ref": "#/$defs/PostalAddressUnstructured"
            }
          ]
        }
      }
    },
    "CashAccount": {
      "type": "object",
      "description": "Provides the details to identify an account.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "$ref": "#/$defs/AccountIdentificationChoice"
        },
        "type": {
          "$ref": "#/$defs/CashAccountTypeChoice"
        },
        "currency": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyCode"
        },
        "name": {
          "description": "Name of the account, as assigned by the account servicing institution, in agreement with the account owner in order to provide an additional means of identification of the account.  \n\nUsage: The account name is different from the account owner name. The account name is used in certain user communities to provide a means of identifying the account, in addition to the account owner's identity and the account number.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 70,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "alternate_identification": {
          "$ref": "#/$defs/GenericIdentification"
        },
        "owner": {
          "$ref": "#/$defs/PartyIdentification"
        },
        "servicer": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        }
      },
      "required": [
        "identification",
        "currency"
      ]
    },
    "CashAccountTypeChoice": {
      "type": "object",
      "description": "Nature or use of the account.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "code"
          ],
          "properties": {
            "code": {
              "$ref": "#/$defs/ExternalCashAccountTypeCode"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "proprietary"
          ],
          "properties": {
            "proprietary": {
              "description": "Nature or use of the account in a proprietary form.",
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "CashAvailability": {
      "type": "object",
      "description": "Indicates when the amount of money will become available, that is can be accessed and start generating interest.",
      "additionalProperties": false,
      "properties": {
        "date": {
          "$ref": "#/$defs/ISODate"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        }
      },
      "required": [
        "date",
        "amount",
        "credit_debit_indicator"
      ]
    },
    "ChargeBearerTypeCode": {
      "type": "string",
      "description": "Specifies which party(ies) will pay charges due for processing of the instruction.\n*`DEBT_borne_by_debtor`-All transaction charges are to be borne by the debtor.\n*`CRED_borne_by_creditor`-All transaction charges are to be borne by the creditor.\n*`SHAR_shared`-In a credit transfer context, means that transaction charges on the sender side are to be borne by the debtor, transaction charges on the receiver side are to be borne by the creditor. In a direct debit context, means that transaction charges on the sender side are to be borne by the creditor, transaction charges on the receiver side are to be borne by the debtor.\n*`SLEV_following_service_level`-Charges are to be applied following the rules agreed in the service level and/or scheme.\n",
      "enum": [
        "DEBT",
        "CRED",
        "SHAR",
        "SLEV"
      ]
    },
    "Charges": {
      "type": "object",
      "description": "Provides further details on the charges related to the payment transaction.",
      "additionalProperties": false,
      "properties": {
        "total_charges_and_tax_amount": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyAndAmount"
        },
        "record": {
          "type": "array",
          "description": "Provides details of the individual charges record.",
          "items": {
            "$ref": "#/$defs/ChargesRecord"
          }
        }
      }
    },
    "ChargesRecord": {
      "type": "object",
      "description": "Provides further individual record details on the charges related to the payment transaction.",
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyAndAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        },
        "charge_included_indicator": {
          "description": "Indicates whether the charge should be included in the amount or is added as pre-advice.",
          "type": "boolean"
        },
        "type": {
          "$ref": "#/$defs/GenericIdentification"
        },
        "rate": {
          "$ref": "#/$defs/PercentageRate"
        },
        "bearer": {
          "$ref": "#/$defs/ChargeBearerTypeCode"
        },
        "agent": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "tax": {
          "$ref": "#/$defs/TaxCharges"
        }
      },
      "required": [
        "amount"
      ]
    },
    "ClearingSystemIdentificationChoice": {
      "type": "object",
      "description": "Choice of a clearing system identifier.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "code"
          ],
          "properties": {
            "code": {
              "$ref": "#/$defs/ExternalClearingSystemIdentificationCode"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "proprietary"
          ],
          "properties": {
            "proprietary": {
              "description": "Identification code for a clearing system, that has not yet been identified in the list of clearing systems.",
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "ClearingSystemMemberIdentification": {
      "type": "object",
      "description": "Unique identification, as assigned by a clearing system, to unambiguously identify a member of the clearing system.",
      "additionalProperties": false,
      "properties": {
        "clearing_system_identification": {
          "$ref": "#/$defs/ClearingSystemIdentificationChoice"
        },
        "member_identification": {
          "description": "Identification of a member of a clearing system.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        }
      },
      "required": [
        "member_identification"
      ]
    },
    "CountryCode": {
      "type": "string",
      "pattern": "^[A-Z]{2,2}$",
      "description": "Code to identify a country, a dependency, or another area of particular geopolitical interest, on the basis of country names obtained from the United Nations (ISO 3166, Alpha-2 code).\n"
    },
    "CreditDebitCode": {
      "type": "string",
      "description": "Specifies if an operation is an increase or a decrease.\n*`CRDT_credit`-Operation is an increase.\n*`DBIT_debit`-Operation is a decrease.\n",
      "enum": [
        "CRDT",
        "DBIT"
      ]
    },
    "CreditLine": {
      "type": "object",
      "description": "Specifies the details of a credit line.",
      "additionalProperties": false,
      "properties": {
        "included": {
          "description": "Indicates whether or not the credit line is included in the balance.",
          "type": "boolean",
          "default": false
        },
        "type": {
          "$ref": "#/$defs/ExternalCreditLineTypeCode"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        }
      },
      "required": [
        "included"
      ]
    },
    "CurrencyAmount": {
      "type": "object",
      "description": "Amount of money to be moved between the debtor and creditor, before deduction of charges, expressed in the currency as ordered by the initiating party.\n",
      "additionalProperties": false,
      "required": [
        "currency_code",
        "amount"
      ],
      "properties": {
        "currency_code": {
          "description": "ISO three character currency code.\n\nThe Currency Code must be registered, or have already been registered. Valid active or historic currency codes are registered with the ISO 4217 Maintenance Agency, consist of three (3) contiguous letters, and may be or not be withdrawn on the day the message containing the Currency is exchanged.\n",
          "type": "string",
          "minLength": 3,
          "maxLength": 3,
          "pattern": "^[A-Z]{3,3}$"
        },
        "amount": {
          "description": "The amount with fractional digit. The number of fractional digits (or minor unit of currency) must comply with ISO 4217. \n\nfractionDigits - 5\ntotalDigits - 18\n*`Note:` The decimal separator is a dot.\n",
          "type": "string",
          "maxLength": 19,
          "pattern": "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|0*|([0-9]{0,18}))$"
        }
      }
    },
    "CurrencyCode": {
      "description": "Code allocated to a currency, by a maintenance agency, under an international identification scheme as described in the latest edition of the international standard ISO 4217 \"Codes for the representation of currencies and funds\". Valid currency codes are registered with the ISO 4217 Maintenance Agency, and consist of three contiguous letters.\n",
      "type": "string",
      "pattern": "^[A-Z]{3,3}$"
    },
    "CurrencyExchange": {
      "type": "object",
      "description": "Set of elements used to provide details of the currency exchange.",
      "additionalProperties": false,
      "properties": {
        "source_currency": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "target_currency": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "unit_currency": {
          "$ref": "#/$defs/CurrencyCode"
        },
        "exchange_rate": {
          "$ref": "#/$defs/BaseOneRate"
        },
        "contract_identification": {
          "description": "Unique identification to unambiguously identify the foreign exchange contract.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "quotation_date": {
          "$ref": "#/$defs/ISODateTime"
        }
      },
      "required": [
        "source_currency",
        "exchange_rate"
      ]
    },
    "DateAndPlaceOfBirth": {
      "type": "object",
      "description": "Date and place of birth of a person.",
      "additionalProperties": false,
      "properties": {
        "birth_date": {
          "$ref": "#/$defs/ISODate"
        },
        "province_of_birth": {
          "description": "Province where a person was born.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "city_of_birth": {
          "description": "City where a person was born.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "country_of_birth": {
          "$ref": "#/$defs/CountryCode"
        }
      },
      "required": [
        "birth_date",
        "city_of_birth",
        "country_of_birth"
      ]
    },
    "DateTimePeriod": {
      "type": "object",
      "description": "Time span defined by a start date and time, and an end date and time.",
      "additionalProperties": false,
      "properties": {
        "from_date_time": {
          "$ref": "#/$defs/ISODateTime"
        },
        "to_date_time": {
          "$ref": "#/$defs/ISODateTime"
        }
      },
      "required": [
        "from_date_time",
        "to_date_time"
      ]
    },
    "Document": {
      "type": "object",
      "description": "General information that unambiguously identifies a document, such as identification number and issue date time.",
      "additionalProperties": false,
      "properties": {
        "type": {
          "$ref": "#/$defs/ReferredDocumentTypeChoice"
        },
        "number": {
          "description": "Unique and unambiguous identification of the referred document.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+$"
        },
        "related_date": {
          "$ref": "#/$defs/ISODate"
        },
        "line_details": {
          "type": "array",
          "description": "Set of elements used to provide the content of the referred document line.",
          "items": {
            "$ref": "#/$defs/DocumentItem"
          }
        }
      }
    },
    "DocumentItem": {
      "type": "object",
      "description": "General information that unambiguously identifies a document, such as identification number and issue date time.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "description": "Provides identification of the document item line.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+$"
        },
        "description": {
          "description": "Description associated with the document item line.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+$"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        },
        "adjustment_reason": {
          "description": "Specifies the reason for the adjustment.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      },
      "required": [
        "identification"
      ]
    },
    "DocumentTypeCode": {
      "type": "string",
      "description": "Specifies a type of financial or commercial document.\n*`MSIN_metered_service_invoice`-Document is an invoice claiming payment for the supply of metered services, for example gas or electricity supplied to a fixed meter.\n*`CNFA_credit_note_related_to_financial_adjustment`-Document is a credit note for the final amount settled for a commercial transaction.\n*`DNFA_debit_note_related_to_financial_adjustment`-Document is a debit note for the final amount settled for a commercial transaction.\n*`CINV_commercial_invoice`-Document is an invoice.\n*`CREN_credit_note`-Document is a credit note.\n*`DEBN_debit_note`-Document is a debit note.\n*`HIRI_hire_invoice`-Document is an invoice for the hiring of human resources or renting goods or equipment.\n*`SBIN_self_billed_invoice`-Document is an invoice issued by the debtor.\n*`CMCN_commercial_contract`-Document is an agreement between the parties, stipulating the terms and conditions of the delivery of goods or services.\n*`SOAC_statement_of_account`-Document is a statement of the transactions posted to the debtor's account at the supplier.\n*`DISP_dispatch_advice`-Document is a dispatch advice.\n*`BOLD_bill_of_lading`-Document is a shipping notice.\n*`VCHR_voucher`-Document is an electronic payment document.\n*`AROI_account_receivable_open_item`-Document is a payment that applies to a specific source document.\n*`TSUT_trade_services_utility_transaction`-Document is a transaction identifier as assigned by the Trade Services Utility.\n*`PUOR_purchase_order`-Document is a purchase order.\n",
      "enum": [
        "MSIN",
        "CNFA",
        "DNFA",
        "CINV",
        "CREN",
        "DEBN",
        "HIRI",
        "SBIN",
        "CMCN",
        "SOAC",
        "DISP",
        "BOLD",
        "VCHR",
        "AROI",
        "TSUT",
        "PUOR"
      ]
    },
    "ExternalCashAccountTypeCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the nature, or use, of the cash account in the format of character string with a maximum length of 4 characters. The list of valid codes is an external code list published separately. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalClearingSystemIdentificationCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 5,
      "description": "Specifies the clearing system identification code, as published in an external clearing system identification code list. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalCreditLineTypeCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the external credit line type code in the format of character string with a maximum length of 4 characters. The list of valid codes is an external code set published separately. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalEntryStatusCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the status of an entry on the books of the account servicer, as published in an external code set. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalOrganisationIdentificationCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the external organisation identification scheme name code in the format of character string with a maximum length of 4 characters. The list of valid codes is an external code list published separately. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalPersonIdentificationCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the external person identification scheme name code in the format of character string with a maximum length of 4 characters. The list of valid codes is an external code list published separately. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalPurposeCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the external purpose code in the format of character string with a maximum length of 4 characters. The list of valid codes is an external code list published separately. External code sets can be downloaded from www.iso20022.org.\n"
    },
    "ExternalReturnReasonCode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4,
      "description": "Specifies the return reason, as published in an external return reason code list. External code sets can be downloaded from www.iso20022.org."
    },
    "FinancialInstitutionIdentification": {
      "type": "object",
      "description": "Specifies the details to identify a financial institution.",
      "additionalProperties": false,
      "properties": {
        "bicfi": {
          "$ref": "#/$defs/BICFIDec2014Identifier"
        },
        "clearing_system_member_identification": {
          "$ref": "#/$defs/ClearingSystemMemberIdentification"
        },
        "lei": {
          "$ref": "#/$defs/LEIIdentifier"
        },
        "name": {
          "description": "Name by which an agent is known and which is usually used to identify that agent.",
          "type": "string",
          "minLength": 1,
          "maxLength": 140,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ !#$%&\\*=^_`\\{\\|\\}~\";<>@\\[\\\\\\]]+$"
        },
        "postal_address": {
          "description": "Information that locates and identifies a specific address, as defined by postal services.\n\nRECOMMENDATION IN ORDER OF PREFERENCE: \n* Use only structured address with mandatory Town Name and Country \n* When using unstructured address, (Address Line), max 1 occurrence with 105 text is allowed. \n* Address Line must not contain Country which must be included in the dedicated Country element in the unstructured structured address. \n",
          "oneOf": [
            {
              "$ref": "#/$defs/PostalAddress"
            },
            {
              "$ref": "#/$defs/PostalAddressUnstructured"
            }
          ]
        },
        "other": {
          "$ref": "#/$defs/GenericIdentification"
        }
      }
    },
    "FromToAmountRange": {
      "type": "object",
      "description": "Range of amount values.",
      "additionalProperties": false,
      "properties": {
        "from_amount": {
          "$ref": "#/$defs/AmountRangeBoundary"
        },
        "to_amount": {
          "$ref": "#/$defs/AmountRangeBoundary"
        }
      },
      "required": [
        "from_amount",
        "to_amount"
      ]
    },
    "GenericIdentification": {
      "type": "object",
      "description": "Information related to an identification, for example, party identification or account identification.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "description": "Proprietary information, often a code, issued by the data source scheme issuer.",
          "type": "string",
          "minLength": 1,
          "maxLength": 36
        },
        "scheme_name": {
          "description": "Short textual description of the scheme.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "issuer": {
          "description": "Entity that assigns the identification.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      },
      "required": [
        "identification"
      ]
    },
    "GenericOrganisationIdentification": {
      "type": "object",
      "description": "Information related to an identification of an organisation.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "description": "Identification assigned by an institution.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "scheme_name": {
          "$ref": "#/$defs/OrganisationIdentificationSchemeNameChoice"
        },
        "issuer": {
          "description": "Entity that assigns the identification.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      },
      "required": [
        "identification"
      ]
    },
    "GenericPersonIdentification": {
      "type": "object",
      "description": "Information related to an identification of a person.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "description": "Unique and unambiguous identification of a person.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "scheme_name": {
          "$ref": "#/$defs/PersonIdentificationSchemeNameChoice"
        },
        "issuer": {
          "description": "Entity that assigns the identification.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      },
      "required": [
        "identification"
      ]
    },
    "IBAN2007Identifier": {
      "type": "string",
      "description": "An identifier used internationally by financial institutions to uniquely identify the account of a customer at a financial institution, as described in the latest edition of the international standard ISO 13616: 2007 - \"Banking and related financial services - International Bank Account Number (IBAN)\".",
      "pattern": "^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}$"
    },
    "ISODate": {
      "type": "string",
      "description": "A particular point in the progression of time in a calendar year expressed in the YYYY-MM-DD format. This representation is defined in \"XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004\" which is aligned with ISO 8601.",
      "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)$"
    },
    "ISODateTime": {
      "type": "string",
      "description": "A particular point in the progression of time defined by a mandatory date and a mandatory time component, expressed in either UTC time format (YYYY-MM-DDThh:mm:ss.sssZ), local time with UTC offset format (YYYY-MM-DDThh:mm:ss.sss+/-hh:mm), or local time format (YYYY-MM-DDThh:mm:ss.sss). These representations are defined in \"XML Schema Part 2: Datatypes Second Edition - W3C Recommendation 28 October 2004\" which is aligned with ISO 8601.\nNote on the time format:\n1) beginning / end of calendar day\n00:00:00 = the beginning of a calendar day\n24:00:00 = the end of a calendar day\n2) fractions of second in time format\nDecimal fractions of seconds may be included. In this case, the involved parties shall agree on the maximum number of digits that are allowed.\n",
      "pattern": "^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.[0-9]+)?(?:Z|[+-][01]\\d:[0-5]\\d)?$"
    },
    "ImpliedCurrencyAmountRangeChoice": {
      "type": "object",
      "description": "Choice between ranges of values in which an amount is considered valid or a specified amount value which has to be matched or unmatched to be valid.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "from_amount"
          ],
          "properties": {
            "from_amount": {
              "$ref": "#/$defs/AmountRangeBoundary"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "to_amount"
          ],
          "properties": {
            "to_amount": {
              "$ref": "#/$defs/AmountRangeBoundary"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "from_to_amount"
          ],
          "properties": {
            "from_to_amount": {
              "$ref": "#/$defs/FromToAmountRange"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "equal_amount"
          ],
          "properties": {
            "equal_amount": {
              "$ref": "#/$defs/ImpliedCurrencyAndAmount"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "not_equal_amount"
          ],
          "properties": {
            "not_equal_amount": {
              "$ref": "#/$defs/ImpliedCurrencyAndAmount"
            }
          }
        }
      ]
    },
    "ImpliedCurrencyAndAmount": {
      "type": "string",
      "description": "Number of monetary units specified in a currency where the unit of currency is implied by the context and compliant with ISO 4217. The decimal separator is a dot.\nNote: a zero amount is considered a positive amount.\n",
      "maxLength": 18,
      "pattern": "^0*(([0-9]{0,13}\\.[0-9]{1,5})|([0-9]{0,14}\\.[0-9]{1,4})|([0-9]{0,15}\\.[0-9]{1,3})|([0-9]{0,16}\\.[0-9]{1,2})|([0-9]{0,17}\\.[0-9]{1,1})|0*|([0-9]{0,18}))$"
    },
    "InterestTypeChoice": {
      "type": "object",
      "description": "Interest type is expressed as a code or a text.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "code"
          ],
          "properties": {
            "code": {
              "$ref": "#/$defs/InterestTypeCode"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "proprietary"
          ],
          "properties": {
            "proprietary": {
              "description": "Specifies the type of interest in uncoded form.",
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          }
        }
      ]
    },
    "InterestTypeCode": {
      "type": "string",
      "description": "Indicates if the deal price is excluding or including the accrued interest.\n*`INDY_intra_day`\n*`OVRN_over_night`\n",
      "enum": [
        "INDY",
        "OVRN"
      ]
    },
    "LEIIdentifier": {
      "type": "string",
      "description": "Legal Entity Identifier is a code allocated to a party as described in ISO 17442 \"Financial Services - Legal Entity Identifier (LEI)\".",
      "pattern": "^[A-Z0-9]{18,18}[0-9]{2,2}$"
    },
    "Link": {
      "type": "object",
      "readOnly": true,
      "description": "Contains a generic structure to support hyperlinking (REST level 3).",
      "additionalProperties": false,
      "required": [
        "href"
      ],
      "properties": {
        "href": {
          "description": "Specifies the link as a url. The href member identifies the target IRI location of the resource.",
          "type": "string",
          "maxLength": 256
        },
        "rel": {
          "description": "Specifies the operation. The value of this property MUST be a string. This property is required except self. The self reference contains the URI of the same resource.",
          "type": "string",
          "maxLength": 35
        },
        "type": {
          "description": "The value containing the HTTP verb used for the URL. If the type element is not included then the link MUST be available using GET.",
          "type": "string",
          "maxLength": 35
        }
      }
    },
    "Links": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "Max35Text": {
      "type": "string",
      "description": "Specifies a character string with a maximum length of 35 characters.",
      "minLength": 1,
      "maxLength": 35
    },
    "OrganisationIdentification": {
      "type": "object",
      "description": "Unique and unambiguous way to identify an organisation.",
      "additionalProperties": false,
      "properties": {
        "any_bic": {
          "$ref": "#/$defs/AnyBICDec2014Identifier"
        },
        "lei": {
          "$ref": "#/$defs/LEIIdentifier"
        },
        "other": {
          "type": "array",
          "maxItems": 2,
          "description": "Unique identification of an organisation, as assigned by an institution, using an identification scheme.",
          "items": {
            "$ref": "#/$defs/GenericOrganisationIdentification"
          }
        }
      }
    },
    "OrganisationIdentificationSchemeNameChoice": {
      "type": "object",
      "description": "Sets of elements to identify a name of the organisation identification scheme.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "code"
          ],
          "properties": {
            "code": {
              "$ref": "#/$defs/ExternalOrganisationIdentificationCode"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "proprietary"
          ],
          "properties": {
            "proprietary": {
              "description": "Name of the identification scheme, in a free text form.",
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "PartyChoice": {
      "type": "object",
      "description": "Identification of a person, an organisation or a financial institution.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "party"
          ],
          "properties": {
            "party": {
              "$ref": "#/$defs/PartyIdentification"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "agent"
          ],
          "properties": {
            "agent": {
              "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
            }
          }
        }
      ]
    },
    "PartyIdentification": {
      "type": "object",
      "description": "Specifies the identification of a person or an organisation.",
      "additionalProperties": false,
      "properties": {
        "name": {
          "description": "Name by which a party is known and which is usually used to identify that party.",
          "type": "string",
          "minLength": 1,
          "maxLength": 140
        },
        "postal_address": {
          "description": "Information that locates and identifies a specific address, as defined by postal services.  \n\nRECOMMENDATION IN ORDER OF PREFERENCE:   \n* Use only structured address with mandatory Town Name and Country\n* When using unstructured address, (Address Line), max 1 occurrence with 105 text is allowed.\n* Address Line must not contain Country which must be included in the dedicated Country element in the unstructured structured address.'\n",
          "oneOf": [
            {
              "$ref": "#/$defs/PostalAddress"
            },
            {
              "$ref": "#/$defs/PostalAddressUnstructured"
            }
          ]
        },
        "identification": {
          "$ref": "#/$defs/PartyIdentificationChoice"
        },
        "country_of_residence": {
          "$ref": "#/$defs/CountryCode"
        }
      }
    },
    "PartyIdentificationChoice": {
      "type": "object",
      "description": "Identify the type of party identification as either organisation identification or individual identification.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "organisation_identification"
          ],
          "properties": {
            "organisation_identification": {
              "$ref": "#/$defs/OrganisationIdentification"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "private_identification"
          ],
          "properties": {
            "private_identification": {
              "$ref": "#/$defs/PersonIdentification"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "PaymentReturnReason": {
      "type": "object",
      "description": "Provides further details on the reason of the return of the transaction.",
      "additionalProperties": false,
      "properties": {
        "original_transaction_identification": {
          "description": "Specify the original statement entry reference (transaction_identification) as specified in the previous statement.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "reason": {
          "$ref": "#/$defs/ReturnReasonChoice"
        },
        "additional_information": {
          "description": "Further details on the return reason.",
          "type": "string",
          "minLength": 1,
          "maxLength": 105
        }
      }
    },
    "PercentageRate": {
      "type": "string",
      "description": "Rate expressed as a percentage, that is, in hundredths, for example, 0.7 is 7/10 of a percent, and 7.0 is 7%.",
      "maxLength": 12
    },
    "PersonIdentification": {
      "type": "object",
      "description": "Unique and unambiguous way to identify a person.",
      "additionalProperties": false,
      "properties": {
        "date_and_place_of_birth": {
          "$ref": "#/$defs/DateAndPlaceOfBirth"
        },
        "other": {
          "type": "array",
          "maxItems": 2,
          "description": "Unique identification of a person, as assigned by an institution, using an identification scheme.",
          "items": {
            "$ref": "#/$defs/GenericPersonIdentification"
          }
        }
      }
    },
    "PersonIdentificationSchemeNameChoice": {
      "type": "object",
      "description": "Sets of elements to identify a name of the identification scheme.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "code"
          ],
          "properties": {
            "code": {
              "$ref": "#/$defs/ExternalPersonIdentificationCode"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "proprietary"
          ],
          "properties": {
            "proprietary": {
              "$ref": "#/$defs/Max35Text"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "PostalAddress": {
      "type": "object",
      "description": "Information that locates and identifies a specific address.",
      "additionalProperties": false,
      "required": [
        "town_name",
        "country"
      ],
      "properties": {
        "department": {
          "description": "Identification of a division of a large organisation or building.",
          "type": "string",
          "minLength": 1,
          "maxLength": 70
        },
        "sub_department": {
          "description": "Identification of a sub-division of a large organisation or building.",
          "type": "string",
          "minLength": 1,
          "maxLength": 70
        },
        "street_name": {
          "description": "Name of a street or thoroughfare.",
          "type": "string",
          "minLength": 1,
          "maxLength": 70
        },
        "building_number": {
          "description": "Number that identifies the position of a building on a street.",
          "type": "string",
          "minLength": 1,
          "maxLength": 16
        },
        "building_name": {
          "description": "Name of the building or house.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "floor": {
          "description": "Floor or storey within a building.",
          "type": "string",
          "minLength": 1,
          "maxLength": 70
        },
        "post_box": {
          "description": "Numbered box in a post office, assigned to a person or organisation, where letters are kept until called for.",
          "type": "string",
          "minLength": 1,
          "maxLength": 16
        },
        "room": {
          "description": "Building room number.",
          "type": "string",
          "minLength": 1,
          "maxLength": 70
        },
        "post_code": {
          "description": "Identifier consisting of a group of letters and/or numbers that is added to a postal address to assist the sorting of mail.",
          "type": "string",
          "minLength": 1,
          "maxLength": 16
        },
        "town_name": {
          "description": "Name of a built-up area, with defined boundaries, and a local government.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "town_location_name": {
          "description": "Specific location name within the town.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "district_name": {
          "description": "Identifies a subdivision within a country sub-division.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "country_sub_division": {
          "description": "Identifies a subdivision of a country such as state, region, county.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "country": {
          "description": "Nation with its own government.",
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "pattern": "^[A-Z]{2,2}$"
        }
      }
    },
    "PostalAddressUnstructured": {
      "type": "object",
      "description": "Information that locates and identifies a specific address.",
      "additionalProperties": false,
      "required": [
        "address_line"
      ],
      "properties": {
        "address_line": {
          "description": "Information that locates and identifies a specific address, as defined by postal services, presented in free format text.",
          "type": "string",
          "minLength": 1,
          "maxLength": 105
        },
        "country": {
          "description": "Specify the country code.",
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "pattern": "^[A-Z]{2,2}$"
        }
      }
    },
    "Rate": {
      "type": "object",
      "description": "Set of elements used to qualify the interest rate.",
      "additionalProperties": false,
      "properties": {
        "type": {
          "$ref": "#/$defs/RateTypeChoice"
        },
        "validity_range": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyAndAmountRange"
        }
      },
      "required": [
        "type"
      ]
    },
    "RateTypeChoice": {
      "type": "object",
      "description": "Specifies the rate as a percentage or a text.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "percentage"
          ],
          "properties": {
            "percentage": {
              "$ref": "#/$defs/PercentageRate"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "other"
          ],
          "properties": {
            "other": {
              "description": "Rate type expressed, in another form.",
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          }
        }
      ]
    },
    "ReferredDocumentTypeChoice": {
      "type": "object",
      "description": "Specifies the type of the document referred in the remittance information.",
      "additionalProperties": false,
      "properties": {
        "code": {
          "$ref": "#/$defs/DocumentTypeCode"
        },
        "proprietary": {
          "description": "Proprietary identification of the type of the remittance document.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      }
    },
    "RemittanceInformation": {
      "type": "object",
      "description": "Information supplied to enable the matching of an entry with the items that the transfer is intended to settle, such as commercial invoices in an accounts' receivable system.",
      "additionalProperties": false,
      "properties": {
        "referred_document_information": {
          "type": "array",
          "description": "Provides the identification and the content of the referred document. For example if they payment is against outstanding invoice, provide the invoice details or to apply a credit note specify the detail.",
          "items": {
            "$ref": "#/$defs/Document"
          }
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "creditor_reference_code": {
          "description": "Reference information provided by the creditor to allow the identification of the underlying documents.",
          "type": "string",
          "enum": [
            "DISP",
            "FXDR",
            "PUOR",
            "RPIN",
            "RADM",
            "SCOR"
          ]
        },
        "creditor_reference": {
          "description": "Unique reference, as assigned by the creditor, to unambiguously refer to the payment transaction.\n\nUsage: If available, the initiating party should provide this reference in the structured remittance information, to enable reconciliation by the creditor upon receipt of the amount of money.\n\nIf the business context requires the use of a creditor reference or a payment remit identification, and only one identifier can be passed through the end-to-end chain, the creditor's reference or payment remittance identification should be quoted in the end-to-end transaction identification.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      }
    },
    "RemittanceInformationChoice": {
      "type": "object",
      "description": "Specifies the choice of remittance information provided.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "required": [
            "structured"
          ],
          "properties": {
            "structured": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/RemittanceInformation"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "required": [
            "unstructured"
          ],
          "properties": {
            "unstructured": {
              "description": "Information supplied to enable the matching/reconciliation of an entry with the items that the payment is intended to settle, such as commercial invoices in an accounts' receivable system, in an unstructured form.",
              "type": "string",
              "minLength": 1,
              "maxLength": 140
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "ReturnReasonChoice": {
      "type": "object",
      "description": "Specifies the reason for the return of the transaction.",
      "additionalProperties": true,
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "code": {
              "$ref": "#/$defs/ExternalReturnReasonCode"
            }
          },
          "required": [
            "code"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "proprietary": {
              "description": "Reason for the return, in a proprietary form.",
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            }
          },
          "required": [
            "proprietary"
          ]
        }
      ]
    },
    "StatementEntry": {
      "type": "object",
      "description": "Specifies an entry in the Statement.\n\nUsage - At least one reference must be provided to identify the entry and its underlying transaction(s).\n",
      "additionalProperties": false,
      "properties": {
        "entry_reference": {
          "description": "Unique reference for the entry. The entry is unique per transaction within the statement. Technical incremental identification of the transaction.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "account_servicer_reference": {
          "description": "Unique reference as assigned by the account servicing institution to unambiguously identify the entry.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        },
        "reversal_indicator": {
          "description": "Indicates whether or not the entry is the result of a reversal.\n\n*`Usage:` This element should only be present if the entry is the result of a reversal. If the CreditDebitIndicator is CRDT and ReversalIndicator is Yes, the original operation was a debit entry. If the CreditDebitIndicator is DBIT and ReversalIndicator is Yes, the original operation was a credit entry.\n",
          "type": "boolean",
          "default": false
        },
        "status": {
          "$ref": "#/$defs/ExternalEntryStatusCode"
        },
        "booking_date": {
          "description": "Date and time when an entry is posted to an account on the account servicer''s books.  \n*`Usage:`Booking date is the expected booking date, unless the status is booked, in which case it is the actual booking date.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/ISODateTime"
            },
            {
              "$ref": "#/$defs/ISODate"
            }
          ]
        },
        "value_date": {
          "description": "Date and time at which assets become available to the account owner in case of a credit entry, or cease to be available to the account owner in case of a debit entry.  \n*`Usage:` If entry status is pending and value date is present, then the value date refers to an expected/requested value date. For entries subject to availability/float and for which availability information is provided, the value date must not be used. In this case the availability component identifies the number of availability days.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/ISODateTime"
            },
            {
              "$ref": "#/$defs/ISODate"
            }
          ]
        },
        "availability": {
          "type": "array",
          "description": "Set of elements used to indicate when the booked amount of money will become available, that is can be accessed and starts generating interest.     \n\nUsage: This type of information is used in the US and is linked to particular instruments such as cheques. Example: When a cheque is deposited, it will be booked on the deposit day, but the amount of money will only be accessible as of the indicated availability day (according to national banking regulations).\n",
          "items": {
            "$ref": "#/$defs/CashAvailability"
          }
        },
        "bank_transaction_code": {
          "$ref": "#/$defs/BankTransactionCode"
        },
        "amount_details": {
          "$ref": "#/$defs/AmountAndCurrencyExchange"
        },
        "charges": {
          "$ref": "#/$defs/Charges"
        },
        "entry_details": {
          "$ref": "#/$defs/StatementEntryDetails"
        }
      },
      "required": [
        "entry_reference",
        "amount",
        "credit_debit_indicator",
        "status",
        "value_date",
        "bank_transaction_code"
      ]
    },
    "StatementEntryDetails": {
      "type": "object",
      "description": "Provides details on the entry.",
      "additionalProperties": false,
      "properties": {
        "batch": {
          "$ref": "#/$defs/BatchInformation"
        },
        "transaction_details": {
          "type": "array",
          "description": "Provides information on the underlying transaction(s). This provides a breakdown of the transaction details when the entry is 'batched'. If the entry is not batched and transaction details are to be reported, then transaction details must only occur once.\n",
          "items": {
            "$ref": "#/$defs/StatementTransactionDetails"
          }
        }
      },
      "required": [
        "transaction_details"
      ]
    },
    "StatementTransactionDetails": {
      "type": "object",
      "description": "Provides information on the underlying transaction(s). This provides a breakdown of the transaction details when the entry is 'batched'. If the entry is not batched and transaction details are to be reported, then transaction details must only occur once.",
      "additionalProperties": false,
      "properties": {
        "references": {
          "$ref": "#/$defs/TransactionReferences"
        },
        "amount": {
          "$ref": "#/$defs/CurrencyAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        },
        "amount_details": {
          "$ref": "#/$defs/AmountAndCurrencyExchange"
        },
        "availability": {
          "description": "Set of elements used to indicate when the booked amount of money will become available, that is can be accessed and starts generating interest.   \n\nUsage - This type of information is used in the US and is linked to particular instruments such as cheques. Example - When a cheque is deposited, it will be booked on the deposit day, but the amount of money will only be accessible as of the indicated availability day (according to national banking regulations).\n",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CashAvailability"
          }
        },
        "bank_transaction_code": {
          "$ref": "#/$defs/BankTransactionCode"
        },
        "charges": {
          "$ref": "#/$defs/Charges"
        },
        "related_parties": {
          "$ref": "#/$defs/TransactionParties"
        },
        "related_agents": {
          "$ref": "#/$defs/TransactionAgents"
        },
        "purpose": {
          "$ref": "#/$defs/ExternalPurposeCode"
        },
        "remittance_information": {
          "$ref": "#/$defs/RemittanceInformationChoice"
        },
        "related_dates": {
          "$ref": "#/$defs/TransactionDates"
        },
        "return_information": {
          "$ref": "#/$defs/PaymentReturnReason"
        }
      },
      "required": [
        "references",
        "credit_debit_indicator"
      ]
    },
    "TaxCharges": {
      "type": "object",
      "description": "Amount of money due to the government or tax authority, according to various pre-defined parameters such as thresholds or income.",
      "additionalProperties": false,
      "properties": {
        "identification": {
          "description": "Unique reference to unambiguously identify the nature of the tax levied, such as Value Added Tax (VAT).",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        },
        "rate": {
          "$ref": "#/$defs/PercentageRate"
        },
        "amount": {
          "$ref": "#/$defs/ActiveOrHistoricCurrencyAndAmount"
        }
      }
    },
    "TransactionAgents": {
      "type": "object",
      "description": "Provides further details on the agents specific to the individual transaction.",
      "additionalProperties": false,
      "properties": {
        "instructing_agent": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "instructed_agent": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "debtor_agent": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "creditor_agent": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "intermediary_agent1": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "intermediary_agent2": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        },
        "intermediary_agent3": {
          "$ref": "#/$defs/BranchAndFinancialInstitutionIdentification"
        }
      }
    },
    "TransactionDates": {
      "type": "object",
      "description": "Set of elements used to provide information on the dates related to the underlying individual transaction.",
      "additionalProperties": false,
      "properties": {
        "acceptance_date_time": {
          "$ref": "#/$defs/ISODateTime"
        },
        "trade_activity_contractual_settlement_date": {
          "$ref": "#/$defs/ISODate"
        },
        "trade_date": {
          "$ref": "#/$defs/ISODate"
        },
        "interbank_settlement_date": {
          "$ref": "#/$defs/ISODate"
        },
        "start_date": {
          "$ref": "#/$defs/ISODate"
        },
        "end_date": {
          "$ref": "#/$defs/ISODate"
        },
        "transaction_date_time": {
          "$ref": "#/$defs/ISODateTime"
        }
      }
    },
    "TransactionParties": {
      "type": "object",
      "description": "Provides further details on the parties specific to the individual transaction.",
      "additionalProperties": false,
      "properties": {
        "initiating_party": {
          "$ref": "#/$defs/PartyChoice"
        },
        "debtor": {
          "$ref": "#/$defs/PartyChoice"
        },
        "debtor_account": {
          "$ref": "#/$defs/Account"
        },
        "ultimate_debtor": {
          "$ref": "#/$defs/PartyChoice"
        },
        "creditor": {
          "$ref": "#/$defs/PartyChoice"
        },
        "creditor_account": {
          "$ref": "#/$defs/Account"
        },
        "ultimate_creditor": {
          "$ref": "#/$defs/PartyChoice"
        }
      }
    },
    "TransactionReferences": {
      "type": "object",
      "description": "Identifies the underlying transaction.",
      "additionalProperties": false,
      "properties": {
        "message_identification": {
          "description": "Point to point reference, as assigned by the instructing party of the underlying message.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "account_servicer_reference": {
          "description": "Unique reference, as assigned by the account servicing institution, to unambiguously identify the instruction.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "payment_information_identification": {
          "description": "Unique identification, as assigned by a sending party, to unambiguously identify the payment information group within the message.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "instruction_identification": {
          "description": "Unique identification, as assigned by an instructing party for an instructed party, to unambiguously identify the instruction.  Usage: The instruction identification is a point to point reference that can be used between the instructing party and the instructed party to refer to the individual instruction. It can be included in several messages related to the instruction.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "end_to_end_identification": {
          "description": "Unique identification, as assigned by the initiating party, to unambiguously identify the transaction. This identification is passed on, unchanged, throughout the entire end-to-end chain.  Usage: The end-to-end identification can be used for reconciliation or to link tasks relating to the transaction. It can be included in several messages related to the transaction.  Usage: In case there are technical limitations to pass on multiple references, the end-to-end identification must be passed on throughout the entire end-to-end chain.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "uetr": {
          "description": "Universally unique identifier to provide an end-to-end reference of a payment transaction.",
          "type": "string",
          "format": "uuid"
        },
        "transaction_identification": {
          "description": "Unique identification, as assigned by the first instructing agent, to unambiguously identify the transaction that is passed on, unchanged, throughout the entire interbank chain.  Usage: The transaction identification can be used for reconciliation, tracking or to link tasks relating to the transaction on the interbank level.  Usage: The instructing agent has to make sure that the transaction identification is unique for a pre-agreed period.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "mandate_identification": {
          "description": "Unique identification, as assigned by the creditor, to unambiguously identify the mandate.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "cheque_number": {
          "description": "Unique and unambiguous identifier for a cheque as assigned by the agent.",
          "type": "string",
          "minLength": 1,
          "maxLength": 35,
          "pattern": "^[0-9a-zA-Z/\\-\\?:\\(\\)\\.,'\\+ ]+$"
        },
        "clearing_system_reference": {
          "description": "Unique reference, as assigned by a clearing system, to unambiguously identify the instruction. Usage: In case there are technical limitations to pass on multiple references, the end-to-end identification must be passed on throughout the entire end-to-end chain.\n",
          "type": "string",
          "minLength": 1,
          "maxLength": 35
        }
      }
    }
  }
}