{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-bank-account-schema.json",
  "title": "BankAccount",
  "description": "A connected bank account (backed by the bankConnections collection).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-banking-api-openapi.yml#/components/schemas/BankAccount",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "provider": {
      "type": [
        "string",
        "null"
      ],
      "description": "saltedge | tink | truelayer | yodlee | revolut | manual"
    },
    "bankName": {
      "type": [
        "string",
        "null"
      ]
    },
    "accountName": {
      "type": [
        "string",
        "null"
      ]
    },
    "accountNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last 4 digits for display."
    },
    "iban": {
      "type": [
        "string",
        "null"
      ],
      "description": "Masked IBAN."
    },
    "currency": {
      "type": [
        "string",
        "null"
      ]
    },
    "isActive": {
      "type": "boolean"
    },
    "lastSyncAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}