---
title: Accounts
editUrl: false
head: []
template: doc
prev: false
next: false
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Defined in: [src/transactions/client.gen.ts:8](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L8)

## Constructors

### Constructor

> **new Accounts**(`_core`): `Accounts`

Defined in: [src/transactions/client.gen.ts:9](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L9)

#### Parameters

##### \_core

[`BrexCore`](/brex/api/index/classes/brexcore/)

#### Returns

`Accounts`

## Methods

### get()

> **get**(`id`, `options?`): `Promise`\<\{ `account_number`: `string`; `available_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `current_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `id`: `string`; `name`: `string`; `primary`: `boolean`; `routing_number`: `string`; `status?`: `"ACTIVE"` \| `null`; \}\>

Defined in: [src/transactions/client.gen.ts:18](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L18)

Get cash account by ID

This endpoint returns the cash account associated with the provided ID with its status.

`GET /v2/accounts/cash/{id}` — requires OAuth scope: `accounts.cash.readonly`

#### Parameters

##### id

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `account_number`: `string`; `available_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `current_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `id`: `string`; `name`: `string`; `primary`: `boolean`; `routing_number`: `string`; `status?`: `"ACTIVE"` \| `null`; \}\>

***

### getPrimary()

> **getPrimary**(`options?`): `Promise`\<\{ `account_number`: `string`; `available_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `current_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `id`: `string`; `name`: `string`; `primary`: `boolean`; `routing_number`: `string`; `status?`: `"ACTIVE"` \| `null`; \}\>

Defined in: [src/transactions/client.gen.ts:36](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L36)

Get primary cash account

This endpoint returns the primary cash account with its status. There will always be only one primary account.

`GET /v2/accounts/cash/primary` — requires OAuth scope: `accounts.cash.readonly`

#### Parameters

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `account_number`: `string`; `available_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `current_balance`: \{ `amount`: `number`; `currency`: `string` \| `null`; \}; `id`: `string`; `name`: `string`; `primary`: `boolean`; `routing_number`: `string`; `status?`: `"ACTIVE"` \| `null`; \}\>

***

### list()

> **list**(`options?`): `Promise`\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/transactions/client.gen.ts:53](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L53)

List cash accounts

This endpoint lists all the existing cash accounts with their status.

`GET /v2/accounts/cash` — requires OAuth scope: `accounts.cash.readonly`

#### Parameters

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### listCard()

> **listCard**(`options?`): `Promise`\<`object`[]\>

Defined in: [src/transactions/client.gen.ts:70](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L70)

List card accounts

This endpoint lists all accounts of card type.

`GET /v2/accounts/card` — requires OAuth scope: `accounts.card.readonly`

#### Parameters

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<`object`[]\>

***

### listCashStatements()

> **listCashStatements**(`id`, `query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/transactions/client.gen.ts:88](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L88)

List cash account statements.

This endpoint lists all finalized statements for the cash account by ID.

`GET /v2/accounts/cash/{id}/statements` — requires OAuth scope: `statements.cash.readonly`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### id

`string`

##### query?

###### cursor?

`string` \| `null`

###### limit?

`number` \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### listPrimaryCardStatements()

> **listPrimaryCardStatements**(`query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/transactions/client.gen.ts:108](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/transactions/client.gen.ts#L108)

List primary card account statements.

This endpoint lists all finalized statements for the primary card account.

`GET /v2/accounts/card/primary/statements` — requires OAuth scope: `statements.card.readonly`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### query?

###### cursor?

`string` \| `null`

###### limit?

`number` \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>