QuickBooks Desktop classes API
Your class list (locations, departments, lines of business), for splitting reports the way the company does. Classes come from a QuickBooks list (qbXML ClassQuery). Empty when class tracking is turned off in the company file.
List classes
GET/v1/files/{file_id}/classes
List classes. Follow next_cursor for the rest (how pages work).
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 class
GET/v1/files/{file_id}/classes/{qb_id}
One class 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
| 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 class name. |
fullName | string | The full name, including parents (Customer:Job, Parent:Item). |
isActive | boolean | False when the class is inactive. |
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.
Example
curl -H "Authorization: Bearer dbk_your_key" "https://desktop-app.greatwork.company/v1/files/file_8f2c41/classes?limit=100"
{
"object": "list",
"resource": "classes",
"file_id": "file_8f2c41",
"data": [
{
"id": "80000002-1700000002",
"name": "North yard",
"fullName": "Locations:North yard",
"isActive": true
}
],
"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 classes
What classes are for
Classes are QuickBooks Desktop's way of tagging transactions by location, department or line of business, separate from the chart of accounts. They exist only when class tracking is on: in QuickBooks, Edit > Preferences > Accounting > Company Preferences > Use class tracking for transactions (Intuit's steps). With it off, this list is empty and the class fields on transactions are empty too. That is not an error.
Classes can nest (Locations:North yard), and fullName carries the path.
Splitting numbers by class
The class list is small; the value is in the class references on transactions. Invoices carry a class on the invoice and on each line; sales receipts, bills, checks and journal entries carry it on each line. QuickBooks lets a class sit on any line, so line level is where to read it.
Sales by class for a month, as one row per line ready for a pivot table:
GET /v1/files/file_8f2c41/invoices?date_from=2026-11-01&date_to=2026-11-30&rows=lines&format=csv
GET /v1/files/file_8f2c41/sales-receipts?date_from=2026-11-01&date_to=2026-11-30&rows=lines&format=csv
Stack the two, then pivot on class_name and sum amount. Expenses by class work the same way with bills and checks. Lines entered without a class come back with no class, so give the blank its own label ("Unclassified" is the usual one) to keep the totals whole.
The reports in this API (profit and loss and the rest) come back as QuickBooks runs them for the whole company, without a class filter, so line-level reads are the way to get a by-class view.