> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.spreadspace.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.spreadspace.app/_mcp/server.

# List all bank statement accounts

GET https://api.spreadspace.app/api/borrowers/{borrower_id}/extractions/bank-statement-accounts

Lists the bank accounts seen across the borrower's extracted bank statements, one entry per statement in period order, carrying only the account's identity and statement period. It's the cheap way to learn which accounts and months are on file without pulling full statement payloads. Pass `loan_id` to narrow it to one loan. Duplicates and failed extractions are left out. When the borrower's balance sheet names its bank accounts, a `document_account_labels` roster also maps each account's last four digits to the name the balance sheet uses for it.

Requires the `extractions:read` scope. Rate limit: 200 requests per minute per key (the `api` lane).

Reference: https://docs.spreadspace.app/api/api-reference/bank-statement-accounts/get-bank-statement-accounts

## Authentication

- `Authorization` header (bearer token, required) — Bearer token. Use `ss_live_…` for live data or `ss_test_…` for the sandbox (test mode). See [Authentication](https://docs.spreadspace.app/api/authentication).

## Request

### Path parameters

- `borrower_id` (string, required) — Id of the borrower whose extractions are read. A borrower the caller cannot access is a 404.

### Query parameters

- `loan_id` (string, optional) — Optional. Restricts the read to this loan's documents; omit to read across all of the borrower's loans. A loan the caller cannot access is a 404. An embed session is always held to its bound loan.

### Headers

- `SpreadSpace-Version` (string, optional) — Pin the API version, e.g. `2026-10-07`. Omit to get the latest. See [Versioning](https://docs.spreadspace.app/api/versioning).

## Response

### 200

OK

- `borrower_id` (string, required) — The borrower the documents belong to.
- `statements` (list of BankStatementAccountReportDataListItem, required) — One row per document.
- `document_account_labels` (list of BankStatementAccountReportDataListResponseDocumentAccountLabelsItems, optional) — Balance sheet account names for the accounts in this list, when a balance sheet on the file prints any.

## Errors

### 400 Bad Request Error

Bad request: validation failed, the cursor is malformed, or the API version is unknown.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

### 401 Unauthorized Error

Unauthorized: the bearer token or API key is missing or invalid.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

### 402 Payment Required Error

Payment required: the standard error envelope with `type` `subscription_required` when the workspace has no active or trialing subscription, or `billing_required` where a plan entitlement applies.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

### 403 Forbidden Error

Forbidden: authentication succeeded but the caller is not permitted to perform this action, for example an API key missing the required scope, an embed session reaching a loan it was not minted for, or a feature outside the workspace's plan.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

### 404 Not Found Error

Not found: the resource does not exist or is not visible to the calling tenant.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

### 429 Too Many Requests Error

Too many requests: the rate limit was hit, or an idempotency-key replay is still in progress.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

### 500 Internal Server Error

Internal server error: an unexpected failure. Quote the `request_id` in support tickets. A mutation sent with an `Idempotency-Key` replays this fault under that key rather than re-running; confirm the resource state before resending with a new key.

- `error` (ApiErrorBody, required) — Inner body of the canonical API error envelope.

## Types

### BankStatementAccountReportDataListItem

One row of the Bank Statement Account list: the document's identity and its extracted object.

- `extracted_document_id` (string, required) — Identifier of the extracted document.
- `report_data` (BankStatementAccountReportData, required) — The extracted object, in the family's shape.

### BankStatementAccountReportDataListResponseDocumentAccountLabelsItems

An account label as a balance sheet on the file prints it.

- `account_last4` (string, required) — Last four digits of the account the label names.
- `label` (string, required) — The account's name as the balance sheet prints it.
- `source_doc_id` (string, optional) — Identifier of the balance sheet that prints the label, when one document supplied it.

### ApiErrorBody

Inner body of the canonical API error envelope.

- `type` (string, required) — Stable error type identifier. Pattern-match on this value, not the human-readable message.
- `message` (string, required) — Human-readable error message. Subject to wording changes; do not parse.
- `request_id` (string, optional, nullable) — Per-request correlation ID (matches `X-Request-ID` response header). Quote in support tickets.
- `details` (map from string to string, optional, nullable) — Structured detail. Some error types populate documented keys in every environment: a version conflict (409) carries `current_version`, the version the resource is actually at, so the client can reload and re-apply. Free-form diagnostic detail beyond those keys appears in development environments only. An `insufficient_credits` 402 carries `balance_usd`, `reserved_usd`, `in_flight_docs`, `incoming_docs` and `per_doc_reservation_usd` as decimal strings.

### BankStatementAccountReportData

The account and period blocks of a bank statement, as the account list serves them.

- `account` (BankStatementAccountReportData_BankStatementAccount, required, nullable) — The account the statement is for; null when the statement has no account block.
- `period` (BankStatementAccountReportData_BankStatementPeriod, required, nullable) — The statement period; null when the statement has no period block.

### BankStatementAccountReportData_BankStatementAccount

The account the statement is for.

- `holder` (string, required, nullable) — Name of the account holder as printed.
- `institution` (string, required, nullable) — Name of the bank as printed.
- `accountNumberLast4` (string, required, nullable) — The last four digits of the account number.
- `type` (string, required, nullable) — The account type as printed, for example checking or savings.
- `linkedAccountLast4` (list of string, optional) — Last four digits of the other accounts that appear on a statement covering several accounts. Empty for a statement of one account.

### BankStatementAccountReportData_BankStatementPeriod

The statement period and its opening and closing balances.

- `start` (string, required, nullable) — First day of the statement period.
- `end` (string, required, nullable) — Last day of the statement period.
- `openingBalance` (string, required, nullable) — Balance at the start of the period, as printed; for a statement that prints none, the linked account's current balance carried back through its own transactions.
- `closingBalance` (string, required, nullable) — Balance at the end of the period, as printed; for a statement that prints none, the linked account's current balance carried back through its own transactions.

## Examples

**Response**

```json
{
  "borrower_id": "3f9c2b1e8d7a4c5b9e0f1a2b",
  "statements": [
    {
      "extracted_document_id": "7a1d4e9c2b3f4a5d8e6c1b0f",
      "report_data": {
        "account": {
          "holder": "Greenfield Construction LLC",
          "institution": "Wells Fargo",
          "accountNumberLast4": "5382",
          "type": "Commercial Banking"
        },
        "period": {
          "start": "2025-01-01",
          "end": "2025-01-31",
          "openingBalance": "385000.00",
          "closingBalance": "395000.00"
        }
      }
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.spreadspace.app/api/borrowers/3f9c2b1e8d7a4c5b9e0f1a2b/extractions/bank-statement-accounts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```