---
title: "List the accounts a CSV import can post to"
method: GET
path: "/accountant/companies/{customerId}/accounts"
tags: ["Accountant Portal"]
---

# List the accounts a CSV import can post to

`GET /accountant/companies/{customerId}/accounts`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/accounts`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

The "deposit to" accounts the accountant portal's CSV import modal offers for this customer, as one flat list: connected accounts (`integration`), bank accounts not already surfaced by a connected account (`bank`), and the active Asset and Liability Chart-of-Accounts rows (`gl_account`). A bank or connected row carries the currency it gives imported rows that have none; a Chart-of-Accounts row reports the currency the importer would resolve for it as `importCurrency` (#2162).

## Response `200`

The accounts in the order the modal lists them (connected, bank, Chart of Accounts).

- AccountantCustomerAccountsResponse
  - `success` boolean
  - `data` AccountantCustomerAccount[]
    - `id` string, uuid, required: An integration_account, bank_account or gl_account id, by `type`; the polymorphic `accountId` the import endpoint accepts.
    - `type` 'integration' | 'bank' | 'gl_account', required
    - `label` string, required
    - `currency` string, nullable, required: The currency a bank or connected account gives imported rows that carry none. Always null for a `gl_account` row; see `importCurrency`.
    - `provider` string, nullable, required
    - `mask` string, nullable, required
    - `glAccountId` string, uuid, nullable, required: The GL account the row posts to; for a `gl_account` row, its own id.
    - `glAccountCode` string, nullable: `gl_account` rows only.
    - `glAccountType` string, nullable: `gl_account` rows only: Asset or Liability.
    - `entityId` string, uuid, nullable, required: The owning legal entity of a bank or connected account. Null for a `gl_account` row, which is company-scoped; the import declares the entity.
    - `entityName` string, nullable, required
    - `legalEntities` object[]: `gl_account` rows only: the legal entities the import may declare.
      - `id` string, uuid, required
      - `name` string, required
      - `role` string, nullable, required
    - `canAddManualBankAccount` boolean: `gl_account` rows only (#2874): a manual bank account may be created on this GL account.
    - `importCurrency` string, nullable: `gl_account` rows only (#2162). The currency the importer gives rows that carry none when this row is picked: that of the sole non-personal bank account bound to the GL account, resolved with the same lookup and rule as the import itself (#2119, #3015). Null when no bank account is bound or several are, in which case the import needs a Currency column. Company-wide; the import itself also scopes the bound accounts to the declared legal entity.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
