{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argyle9a25/json-schema/argyle9a25-open-banking-bank-account-schema.json",
  "title": "OpenBankingBankAccount",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argyle9a25-open-banking-api-openapi.yml#/components/schemas/OpenBankingBankAccount",
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "id": {
      "type": "string",
      "description": "ID of the bank account."
    },
    "user": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the user associated with the bank account."
    },
    "account_number_display": {
      "type": "string",
      "description": "Display account identifier."
    },
    "name": {
      "type": "string",
      "description": "Account name."
    },
    "type": {
      "type": "string",
      "description": "Bank account type.",
      "enum": [
        "checking",
        "savings",
        "cd",
        "moneyMarket",
        "creditCard",
        "lineOfCredit",
        "investment",
        "investmentTaxDeferred",
        "employeeStockPurchasePlan",
        "ira",
        "401k",
        "roth",
        "403b",
        "529plan",
        "rollover",
        "ugma",
        "utma",
        "keogh",
        "457plan",
        "401a",
        "brokerageAccount",
        "educationSavings",
        "healthSavingsAccount",
        "pension",
        "profitSharingPlan",
        "roth401k",
        "sepIRA",
        "simpleIRA",
        "thriftSavingsPlan",
        "variableAnnuity",
        "cryptocurrency",
        "mortgage",
        "loan",
        "studentLoan",
        "studentLoanGroup",
        "studentLoanAccount"
      ]
    },
    "aggregation_status_code": {
      "type": "integer",
      "description": "Status code of the most recent aggregation attempt.\n\nSee [Aggregation status codes](/api-reference/bank-accounts#aggregation-status-codes).\n"
    },
    "status": {
      "type": "string",
      "description": "Bank account status.",
      "enum": [
        "pending",
        "active"
      ]
    },
    "institution": {
      "type": "string",
      "description": "ID of the financial institution."
    },
    "aggregation_success_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) of the last successful aggregation for the account."
    },
    "aggregation_attempt_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) of the last aggregation attempt for the account, whether successful or not."
    },
    "created_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) for when the bank account was created."
    },
    "currency": {
      "type": "string",
      "description": "Currency code."
    },
    "institution_login": {
      "type": "integer",
      "description": "ID of the institution login."
    },
    "display_position": {
      "type": "integer",
      "description": "Display position of the account at the financial institution."
    },
    "parent_bank_account": {
      "type": "string",
      "description": "ID of the parent bank account."
    },
    "linked_account_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) for when the account was linked."
    },
    "error_code": {
      "type": "string",
      "description": "Bank connection error code."
    },
    "error_message": {
      "type": "string",
      "description": "Bank connection error message."
    },
    "real_account_number_last4": {
      "type": "string",
      "description": "Last four digits of the account number."
    },
    "balance": {
      "type": "number",
      "description": "Account balance amount. Returned as a number with up to two decimal places.",
      "x-argyle-decimal-places": 2,
      "x-argyle-decimal-mode": "maximum"
    },
    "balance_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) for when the balance was recorded."
    },
    "last_updated_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) for when the account was last updated."
    },
    "market_segment": {
      "type": "string",
      "enum": [
        "personal",
        "business"
      ],
      "description": "Indicates whether the account is personal or business."
    },
    "line_of_business": {
      "type": [
        "string",
        "null"
      ],
      "x-mint": {
        "post": [
          "Coming soon"
        ]
      },
      "enum": [
        "personal",
        "business",
        "unknown"
      ],
      "description": "Indicates how the account is registered with the financial institution. Does not indicate how the account is used."
    },
    "line_of_business_source": {
      "type": [
        "string",
        "null"
      ],
      "x-mint": {
        "post": [
          "Coming soon"
        ]
      },
      "enum": [
        "Financial_Institution",
        "Mastercard"
      ],
      "description": "Source of the **`line_of_business`** value.\n\n- `Financial_Institution` indicates the value was provided by the financial institution.\n- `Mastercard` indicates the value was inferred using analytical models.\n"
    },
    "line_of_business_confidence_score": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "maximum": 1,
      "x-mint": {
        "post": [
          "Coming soon"
        ]
      },
      "description": "Confidence score for **`line_of_business`**, from 0 to 1.\n\nA score of 1 is expected when the value is provided by the financial institution. Scores from 0.90 to 0.99 indicate high confidence, 0.60 to 0.89 indicate medium confidence, and 0.00 to 0.59 indicate low confidence.\n"
    },
    "last_transaction_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) of the latest transaction."
    },
    "oldest_transaction_date": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)) of the oldest transaction."
    }
  }
}