{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swift/json-schema/swift-transaction-summary1-schema.json",
  "title": "TransactionSummary1",
  "description": "Provides a summary on entries for a specific period.",
  "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/TransactionSummary1",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "account_identification": {
      "$ref": "#/$defs/Max34Text"
    },
    "from_date_time": {
      "$ref": "#/$defs/ISODateTime"
    },
    "to_date_time": {
      "$ref": "#/$defs/ISODateTime"
    },
    "total_entries": {
      "$ref": "#/$defs/NumberAndSumOfTransactions5"
    },
    "total_credit_entries": {
      "$ref": "#/$defs/NumberAndSumOfTransactions6"
    },
    "total_debit_entries": {
      "$ref": "#/$defs/NumberAndSumOfTransactions6"
    }
  },
  "required": [
    "account_identification",
    "from_date_time",
    "to_date_time"
  ],
  "$defs": {
    "ActiveCurrencyAndAmount": {
      "type": "object",
      "description": "A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.",
      "properties": {
        "currency": {
          "$ref": "#/$defs/ActiveCurrencyCode"
        },
        "amount": {
          "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}))$"
        }
      }
    },
    "ActiveCurrencyCode": {
      "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"
    },
    "AmountAndDirection52": {
      "type": "object",
      "description": "Posting of an item to a cash account, in the context of a cash transaction, that results in an increase or decrease to the balance of the account.",
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/ActiveCurrencyAndAmount"
        },
        "credit_debit_indicator": {
          "$ref": "#/$defs/CreditDebitCode"
        }
      },
      "required": [
        "amount",
        "credit_debit_indicator"
      ]
    },
    "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"
      ]
    },
    "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)?$"
    },
    "Max15NumericText": {
      "type": "string",
      "description": "Specifies a numeric string with a maximum length of 15 digits.",
      "pattern": "^[0-9]{1,15}$"
    },
    "Max34Text": {
      "type": "string",
      "description": "Specifies a character string with a maximum length of 34 characters.",
      "minLength": 1,
      "maxLength": 34
    },
    "NumberAndSumOfTransactions5": {
      "type": "object",
      "description": "Set of elements providing the total sum of entries.",
      "additionalProperties": false,
      "properties": {
        "number_of_entries": {
          "$ref": "#/$defs/Max15NumericText"
        },
        "total_net_entry": {
          "$ref": "#/$defs/AmountAndDirection52"
        }
      },
      "required": [
        "number_of_entries",
        "total_net_entry"
      ]
    },
    "NumberAndSumOfTransactions6": {
      "type": "object",
      "description": "Set of elements providing the total sum of entries.",
      "additionalProperties": false,
      "properties": {
        "number_of_entries": {
          "$ref": "#/$defs/Max15NumericText"
        },
        "total": {
          "$ref": "#/$defs/ActiveCurrencyAndAmount"
        }
      },
      "required": [
        "number_of_entries",
        "total"
      ]
    }
  }
}