{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/inscribe/json-schema/inscribe-list-bank-accounts-schema.json",
  "title": "ListBankAccounts",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/inscribe-bank-accounts-api-openapi.yml#/components/schemas/ListBankAccounts",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BankAccountData"
      },
      "description": "A map with a data property that contains an array of bank accounts. Each entry in the array is a separate bank account object."
    },
    "pagination": {
      "type": "object",
      "properties": {
        "cursor": {
          "type": "string",
          "format": "uuid",
          "description": "A cursor for use in pagination. This cursor is to be used in the next request's cursor parameter to request the next set of bank accounts."
        }
      }
    },
    "metadata": {
      "$ref": "#/$defs/metadata_transactions_accounts"
    }
  },
  "$defs": {
    "BankAccountData": {
      "type": "object",
      "description": "The bank account data",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for the object."
        },
        "account_number": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account number of the bank account."
        },
        "account_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "The type of the bank account.",
          "enum": [
            "PERSONAL",
            "BUSINESS"
          ]
        },
        "account_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the bank account."
        },
        "end_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The end date of the bank account in the format yyyy-MM-dd."
        },
        "start_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "The start date of the bank account in the format yyyy-MM-dd."
        },
        "guid": {
          "type": [
            "string",
            "null"
          ],
          "description": "An identifier for the bank account submitted by the data provider."
        },
        "institution_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the bank."
        }
      }
    },
    "metadata_transactions_accounts": {
      "type": "object",
      "description": "Additional data which provides context about Inscribe's Credit Insights response.",
      "properties": {
        "customer_contains_low_trust_score_documents": {
          "type": "boolean",
          "description": "This value will be set to True if the customer contains any documents under a trust score threshold of 50. Else, this will be set to False."
        },
        "included_data_sources": {
          "type": "object",
          "description": "Lists all documents and open banking data which were used to create the Inscribe Credit Insights.",
          "properties": {
            "documents": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "document_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            },
            "open_banking": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "open_banking_data_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "excluded_data_sources": {
          "type": "object",
          "description": "Lists all documents and open banking data which were excluded from the Inscribe Credit Insights. Documents can be excluded if they are duplicate documents, or when the include_unreconciled_documents query parameter is set to False.",
          "properties": {
            "documents": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "document_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "exclusion_reason": {
                    "format": "string"
                  }
                }
              }
            },
            "open_banking": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "open_banking_data_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              }
            }
          }
        },
        "query_parameters": {
          "type": "object",
          "description": "Lists the query parameters which were used in the original endpoint request."
        }
      }
    }
  }
}