> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redbark.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connections, accounts and transactions

> Banking and brokerage reads in v2 shape

All reads need `data:read` (connections and consents need `connections:read`). Live data is fetched from the bank at request time through the connection gateway cache and is never stored.

## Connections

`GET /v2/connections` (cheap), `GET /v2/connections/{id}`. Filters: `status[]`, `provider`. Include: `accounts`.

```json theme={null}
{
  "id": "conn_2Bc4De6fGh8jKl0mNp3qRs",
  "object": "connection",
  "provider": "fiskil",
  "category": "banking",
  "institution": { "id": "inst_fk_anz", "name": "ANZ", "logo": null },
  "status": "active",
  "consent": { "id": "cons_7Hq2Kp9dLm3nRt5vWx8yZa", "status": "active", "expires_at": "2027-03-01T00:00:00.000Z" },
  "accounts": null,
  "account_count": 3,
  "last_refreshed_at": "2026-08-21T02:10:00.000Z",
  "ready_at": "2026-03-01T10:02:11.000Z",
  "metadata": null,
  "livemode": true,
  "created": "2026-03-01T10:01:58.000Z",
  "updated": "2026-08-21T02:10:00.000Z"
}
```

`status` is computed: `pending` (accounts not landed yet or MFA outstanding), `active`, `expiring` (consent ends within 30 days), `expired`, `invalidated` (bank-side), `revoked`.

## Consents

`GET /v2/consents?connection=` and `GET /v2/consents/{id}`. `status` is `active`, `expiring`, `expired` or `withdrawn`; brokerage consents have no expiry (`expires_at: null`). `termination_reason` is free text, not an enum: it is either our own note for a withdrawal we initiated (`connection_deleted`) or the bank's wording for one the user made at their end. Show it, do not branch on it.

```json theme={null}
{ "id": "cons_7Hq2Kp9dLm3nRt5vWx8yZa", "object": "consent", "connection": "conn_2Bc4De6fGh8jKl0mNp3qRs", "status": "active", "purpose": "sync", "data_types": ["accounts", "transactions"], "expires_at": "2027-03-01T00:00:00.000Z", "withdrawn_at": null, "termination_reason": null, "livemode": true, "created": "2026-03-01T10:02:00.000Z", "updated": "2026-03-01T10:02:00.000Z" }
```

## Accounts

`GET /v2/accounts?connection=` (cheap), `GET /v2/accounts/{id}`. `account_number` is masked to the last four digits.

```json theme={null}
{ "id": "acct_9Lk2Mn4pQr6sTu8vWx1yZb", "object": "account_item", "connection": "conn_2Bc4De6fGh8jKl0mNp3qRs", "provider": "fiskil", "category": "banking", "name": "Everyday", "type": "transaction", "institution": { "id": "inst_fk_anz", "name": "ANZ", "logo": null }, "account_number": "xxxx1234", "currency": "aud", "status": "available", "last_updated_at": "2026-08-21T02:00:00.000Z", "livemode": true, "created": "2026-03-01T10:02:11.000Z", "updated": "2026-08-21T02:00:00.000Z" }
```

* `GET /v2/accounts/{id}/balance` (mid): `{ "object": "balance", "account": "acct_…", "current": { "amount": 123456, "currency": "aud" }, "available": { "amount": 120000, "currency": "aud" }, "currency": "aud" }`; `current`/`available` are money objects or null.
* `GET /v2/accounts/{id}/details` (mid): product name, deposit and lending rates, fees, features and loan details as the bank reports them, in snake\_case. Banking accounts only.

## Transactions

`GET /v2/transactions?account=acct_…&from=&to=&include_pending=true` (heavy). `account` is required. Newest first, `limit` up to 100, follow `next_page_url`. When the 5,000 row ceiling is reached the response carries `X-Redbark-Truncated: true`; narrow `from`/`to`.

```json theme={null}
{
  "id": "txn_fk_4f7a…",
  "object": "transaction",
  "account": "acct_9Lk2Mn4pQr6sTu8vWx1yZb",
  "status": "posted",
  "date": "2026-08-20",
  "datetime": "2026-08-20T03:12:44+10:00",
  "post_date": "2026-08-21",
  "post_datetime": null,
  "value_date": null,
  "value_datetime": null,
  "description": "COLES 1234 RICHMOND",
  "amount": { "amount": -4250, "currency": "aud" },
  "direction": "debit",
  "provider_category": "FOOD_AND_DRINK_GROCERIES",
  "category": "cat_8Mn3Pq5rSt7uVw9xYz1aBc",
  "merchant_name": "Coles",
  "merchant_category_code": "5411",
  "livemode": true
}
```

`provider_category` is the bank or enrichment code (see `/v2/provider_categories`); `category` is the user category it resolves to through your source claims, or `null`.

`GET /v2/transactions/{id}?account=` retrieves one transaction by its tagged provider id within the account's recent window (`from`/`to` optional).

## Holdings and trades

`GET /v2/holdings?account=` and `GET /v2/trades?account=&from=&to=` (heavy, Professional plan). Quantities are decimal strings; prices and values are money objects in the holding's currency.

## Provider categories

`GET /v2/provider_categories` lists every primary category and subcategory (with `parent`). This is what v1 served at `/v1/categories`; your own taxonomy lives at `/v2/categories`. The vocabulary is fixed and short, so this list is not paginated: it always returns every code in one response, `next_page_url` is always `null`, and `limit` is ignored.
