# QuickBooks Desktop accounts API

The chart of accounts, with each account's type, number and current balance. Accounts come from a QuickBooks list (qbXML `AccountQuery`).

## List accounts

`GET /v1/files/{file_id}/accounts`

List accounts. Follow `next_cursor` for the rest ([how pages work](/docs/requests-and-pagination)).

### Parameters

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `file_id` (required) | path | string | The company file id (file_...), from GET /v1/files. |
| `limit` | query | integer | Records per page, 1 to 500. Default 100. |
| `cursor` | query | string | next_cursor from the previous page. Keep the other parameters the same while paging. |
| `modified_since` | query | string | Only records changed at or after this time (ISO 8601 date-time with offset, or a date). |
| `status` | query | string: active, inactive, all | Filter by status. |
| `fields` | query | string | Comma-separated top-level fields to return (id is always included). |
| `if_queued` | query | string: error | error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in). |
| `order` | query | string: modified, id | id (default) or modified (default with modified_since). |
| `format` | query | string: json, csv | json (default) or csv. Accept: text/csv works too. |
| `flat` | query | string: 1 | 1 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads). |

### Responses

| Status | Means |
| --- | --- |
| 200 | OK |
| 202 | The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then. |
| 400 | A parameter isn't valid, or the key was put in the URL. |
| 401 | No key, or the key isn't valid. |
| 404 | No such company file, record or job for this key. |
| 409 | if_queued=error was sent and the answer would have had to wait for the next check-in: the company file keeps no copy (no_copy_kept), or QuickBooks hasn't sent this report yet (report_not_ready). Run it again after the check-in. |
| 429 | More than 60 requests a minute with this key. Retry-After says when to try again. |

## One account

`GET /v1/files/{file_id}/accounts/{qb_id}`

One account by its QuickBooks id.

### Parameters

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `file_id` (required) | path | string | The company file id (file_...), from GET /v1/files. |
| `qb_id` (required) | path | string | QuickBooks' id for the record (ListID or TxnID). |
| `if_queued` | query | string: error | error: for clients that can't come back later, such as a scheduled sheet refresh. Instead of 202, a no-copy file answers 409 no_copy_kept at once and nothing is queued; a report QuickBooks hasn't sent yet answers 409 report_not_ready (it is still asked for at the next check-in). |
| `format` | query | string: json, csv | json (default) or csv. Accept: text/csv works too. |

## Fields

Accounts fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | QuickBooks' own id (ListID for lists, TxnID for transactions). |
| `editSequence` | string | Changes every time the record is edited in QuickBooks. |
| `createdAt` | date-time | When the record was created, with the company file's time offset. |
| `modifiedAt` | date-time | When the record last changed. Use modified_since to read only what changed. |
| `name` | string | The account name. |
| `fullName` | string | The full name, including parents (Customer:Job, Parent:Item). |
| `type` | string | The account type as QuickBooks names it (Bank, AccountsReceivable, Income...). |
| `number` | string | The account number, when account numbers are turned on. |
| `isActive` | boolean | False when the account is inactive. |
| `balance` | number | The account balance. |

`Ref` is `{ id, name }`: QuickBooks' id and full name, so reports can show names without a second request. CSV flattens each record into one row; the columns are listed in [the OpenAPI document](https://desktop-app.greatwork.company/openapi.json).

## Example

```bash
curl -H "Authorization: Bearer dbk_your_key" "https://desktop-app.greatwork.company/v1/files/file_8f2c41/accounts?limit=100"
```

```json
{
  "object": "list",
  "resource": "accounts",
  "file_id": "file_8f2c41",
  "data": [
    {
      "id": "80000003-1700000003",
      "name": "Operating Checking",
      "fullName": "Operating Checking",
      "type": "Bank",
      "number": "1010",
      "isActive": true,
      "balance": 48210.33
    }
  ],
  "next_cursor": null,
  "has_more": false,
  "synced_at": "2026-11-27T07:04:12-06:00",
  "as_of": "2026-11-27T07:03:58-06:00"
}
```

## About accounts

## The chart of accounts as QuickBooks names it

Every account comes back with QuickBooks' own type, written the way qbXML writes it: `Bank`, `AccountsReceivable`, `OtherCurrentAsset`, `FixedAsset`, `OtherAsset`, `AccountsPayable`, `CreditCard`, `OtherCurrentLiability`, `LongTermLiability`, `Equity`, `Income`, `CostOfGoodsSold`, `Expense`, `OtherIncome`, `OtherExpense` and `NonPosting`. Grouping by `type` gives the same sections the balance sheet and the profit and loss use. Subaccounts show their parent in `fullName` (`Utilities:Water`), so sorting on it reproduces the indented chart.

`number` is filled only when account numbers are turned on in the company file's preferences; otherwise it is empty and `fullName` is the stable label to show.

## Balances

The account list is read whole at every Web Connector check-in, so `balance` is as current as the last check-in (`as_of` says when). That makes this the quickest way to put bank and credit card balances on a dashboard:

```bash
GET /v1/files/file_8f2c41/accounts?status=active&fields=fullName,type,number,balance&format=csv
```

Keep the `Bank` and `CreditCard` rows. For income and expense totals over a period, the account list is the wrong place: ask the [profit and loss](/docs/api/reports/profit-and-loss) report for the dates you want, which uses QuickBooks' own report and your company file's accrual or cash basis. For assets and liabilities as of a date other than today, use the [balance sheet](/docs/api/reports/balance-sheet).

## Using accounts with other resources

Account references appear all over the transaction resources: `depositTo` on [payments](/docs/api/payments) and [sales receipts](/docs/api/sales-receipts), `account` on [checks](/docs/api/checks) and [deposits](/docs/api/deposits), and on every [journal entry](/docs/api/journal-entries) line. Join on `id`, not the name, since accounts get renamed and renumbered over the years. Inactive accounts stay in the list with `isActive: false` so old transactions still resolve.

**Also in the reference:** [Customers](/docs/api/customers), [Vendors](/docs/api/vendors), [Items](/docs/api/items), [Classes](/docs/api/classes).

Previous: [Items](/docs/api/items) | Next: [Classes](/docs/api/classes)
