{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-organization-bank-account-response-dto-schema.json",
  "title": "OrganizationBankAccountResponseDto",
  "description": "Bank account response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-funding-accounts-api-openapi.yml#/components/schemas/OrganizationBankAccountResponseDto",
  "required": [
    "archived",
    "id"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "BILL-generated ID of the bank account. The value begins with `bac`."
    },
    "archived": {
      "type": "boolean",
      "description": "Set as `true` if the bank account is archived"
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountStatus"
        },
        {
          "description": "Bank account status."
        }
      ]
    },
    "createdBy": {
      "type": "string",
      "description": "BILL-generated ID of the user that created the bank account. The value begins with `006`."
    },
    "routingNumber": {
      "type": "string",
      "description": "Bank routing number"
    },
    "accountNumber": {
      "type": "string",
      "description": "Bank account number"
    },
    "nameOnAccount": {
      "type": "string",
      "description": "Full name on bank account"
    },
    "type": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountType"
        },
        {
          "description": "Bank account type"
        }
      ]
    },
    "ownerType": {
      "allOf": [
        {
          "$ref": "#/$defs/BankAccountOwnerType"
        },
        {
          "description": "Bank account owner type"
        }
      ]
    },
    "bankName": {
      "type": "string",
      "description": "Bank name"
    },
    "accessToAdmins": {
      "type": "boolean",
      "description": "Set as `true` to enable access to all users with the `ADMINISTRATOR` user role"
    },
    "default": {
      "allOf": [
        {
          "$ref": "#/$defs/OrganizationBankAccountDefault"
        },
        {
          "description": "Bank account default values for BILL AP and AR operations"
        }
      ]
    },
    "createdTime": {
      "type": "string",
      "description": "Created date and time",
      "format": "date-time"
    },
    "updatedTime": {
      "type": "string",
      "description": "Updated date and time",
      "format": "date-time"
    },
    "chartOfAccountId": {
      "type": "string",
      "description": "BILL-generated ID of the chart of accounts for the bank account. The value begins with `0ca`."
    }
  },
  "$defs": {
    "BankAccountOwnerType": {
      "type": "string",
      "description": "BankAccountOwnerType Enum.",
      "enum": [
        "BUSINESS",
        "PERSONAL"
      ]
    },
    "BankAccountStatus": {
      "type": "string",
      "description": "Bank account status.",
      "enum": [
        "NOT_VERIFIED",
        "VERIFIED",
        "PENDING",
        "BLOCKED",
        "EXPIRED",
        "INVALID",
        "UNDEFINED"
      ]
    },
    "BankAccountType": {
      "type": "string",
      "description": "BankAccountType Enum.",
      "enum": [
        "CHECKING",
        "SAVINGS"
      ]
    },
    "OrganizationBankAccountDefault": {
      "type": "object",
      "properties": {
        "payables": {
          "type": "boolean",
          "description": "Set as `true` if the bank account is set as default for Accounts Payable operations"
        },
        "receivables": {
          "type": "boolean",
          "description": "Set as `true` if the bank account is set as default for Accounts Receivable operations"
        }
      },
      "description": "Bank account defaults."
    }
  }
}