{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-balance-report-response-schema.json",
  "title": "BalanceReportResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-reporting-api-openapi.yml#/components/schemas/Balance-Report-Response",
  "type": "array",
  "items": {
    "$ref": "#/$defs/Balance-Transaction"
  },
  "$defs": {
    "Amount": {
      "type": "number",
      "title": "amount",
      "description": "Amount in currency.",
      "minimum": 0.01,
      "maximum": 10000000000000
    },
    "Balance": {
      "type": "number",
      "title": "opening_balance",
      "description": "Balance."
    },
    "Balance-Transaction": {
      "title": "Balance-Transaction",
      "type": "object",
      "description": "Transaction details for balance reporting including opening and closing balances.",
      "properties": {
        "virtual_account_id": {
          "$ref": "#/$defs/Virtual-Account-Id"
        },
        "uetr": {
          "$ref": "#/$defs/Uetr"
        },
        "end_to_end_id": {
          "$ref": "#/$defs/End-To-End-Id"
        },
        "opening_balance": {
          "allOf": [
            {
              "$ref": "#/$defs/Balance"
            }
          ],
          "title": "opening_balance",
          "description": "The balance before the transaction."
        },
        "closing_balance": {
          "allOf": [
            {
              "$ref": "#/$defs/Balance"
            }
          ],
          "title": "closing_balance",
          "description": "The balance after the transaction."
        },
        "payment_type": {
          "$ref": "#/$defs/Reporting-Payment-Type"
        },
        "created_time": {
          "allOf": [
            {
              "$ref": "#/$defs/Created-Time"
            }
          ],
          "title": "created_on",
          "description": "The creation time of the transaction."
        },
        "amount": {
          "allOf": [
            {
              "$ref": "#/$defs/Amount"
            }
          ],
          "title": "amount",
          "description": "The transaction amount."
        },
        "currency_code": {
          "allOf": [
            {
              "$ref": "#/$defs/Currency-Code"
            }
          ],
          "title": "currency_code"
        },
        "direction": {
          "type": "string",
          "title": "direction",
          "description": "Whether the transaction is a debit or credit."
        }
      }
    },
    "Created-Time": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time of the file created. Pattern YYYY-MM-DDTHH:mm:ssZ",
      "title": "created_time"
    },
    "Currency-Code": {
      "type": "string",
      "title": "currency_code",
      "description": "The currency code in the transaction.",
      "pattern": "^[A-Z]{3}$"
    },
    "End-To-End-Id": {
      "type": "string",
      "title": "end_to_end_id",
      "description": "The unique payment request ID from your system. If the request is for payment to wallet, this field should contain maximum 16 character and should be in UPPER CASE.",
      "minLength": 1,
      "maxLength": 35
    },
    "Reporting-Payment-Type": {
      "type": "string",
      "title": "payment_type",
      "description": "Transaction type.",
      "enum": [
        "INBOUND",
        "PAYOUT",
        "WITHDRAW"
      ]
    },
    "Uetr": {
      "type": "string",
      "title": "uetr",
      "description": "This is a unique payment service provider ID assigned to all individual transactions.",
      "minLength": 1,
      "maxLength": 36
    },
    "Virtual-Account-Id": {
      "type": "string",
      "title": "Virtual-Account-Id",
      "description": "Account ID for a specific virtual account.",
      "minLength": 1,
      "maxLength": 36
    }
  }
}