{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/altoviz-com/json-schema/altoviz-com-bank-transaction-schema.json",
  "title": "BankTransaction",
  "description": "Bank transaction.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/altoviz-com-openapi.json#/components/schemas/BankTransaction",
  "type": "object",
  "properties": {
    "bankAccountId": {
      "type": "integer",
      "description": "Bank account ID",
      "format": "int32",
      "readOnly": true
    },
    "category": {
      "type": [
        "string",
        "null"
      ],
      "description": "Category as the provider classifies it",
      "readOnly": true
    },
    "coming": {
      "type": "boolean",
      "description": "Whether the transaction is announced but not yet settled by the bank",
      "readOnly": true
    },
    "date": {
      "type": "string",
      "description": "Date the transaction counts under",
      "format": "date-time",
      "readOnly": true
    },
    "fullLabel": {
      "type": [
        "string",
        "null"
      ],
      "description": "Full label as the bank sends it",
      "readOnly": true
    },
    "id": {
      "type": "integer",
      "description": "Bank transaction ID",
      "format": "int32",
      "readOnly": true
    },
    "includedExternalFeesAmount": {
      "type": "number",
      "description": "Fees already included in Altoviz.Api.Models.BankTransaction.Value",
      "format": "double",
      "readOnly": true
    },
    "isExcluded": {
      "type": "boolean",
      "description": "Whether the transaction has been set aside, so it is not offered for reconciliation and does\nnot count towards the account's pending total. Toggled by `Exclude` and `Include`.",
      "readOnly": true
    },
    "isImported": {
      "type": "boolean",
      "description": "Whether the transaction came from a file import rather than a provider",
      "readOnly": true
    },
    "isReconciliated": {
      "type": "boolean",
      "description": "Whether the transaction is already matched to a settlement",
      "readOnly": true
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "description": "Short label",
      "readOnly": true
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": [
          "string",
          "null"
        ]
      },
      "description": "Metadata carried with the transaction",
      "readOnly": true
    },
    "nature": {
      "$ref": "#/$defs/BankTransactionNature"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Notes",
      "readOnly": true
    },
    "paymentMethod": {
      "$ref": "#/$defs/PaymentMethod"
    },
    "transactionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The transaction's identifier at the provider it was synchronized from",
      "readOnly": true
    },
    "value": {
      "type": "number",
      "description": "Amount. Negative for money leaving the account.",
      "format": "double",
      "readOnly": true
    },
    "valueDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "Value date",
      "format": "date-time",
      "readOnly": true
    }
  },
  "additionalProperties": false,
  "$defs": {
    "BankTransactionNature": {
      "enum": [
        "Transfer",
        "Order",
        "Check",
        "CashDeposit",
        "Payback",
        "Withdrawal",
        "Loan",
        "BankFees",
        "Card",
        "CardSummary",
        "Interest",
        "Dividend",
        "Other"
      ],
      "type": "string"
    },
    "PaymentMethod": {
      "enum": [
        "Transfer",
        "Order",
        "Check",
        "Cash",
        "Card",
        "Bill",
        "Usec",
        "Other"
      ],
      "type": "string"
    }
  }
}