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

ParameterInTypeDescription
file_id (required)pathstringThe company file id (file_...), from GET /v1/files.
limitqueryintegerRecords per page, 1 to 500. Default 100.
cursorquerystringnext_cursor from the previous page. Keep the other parameters the same while paging.
modified_sincequerystringOnly records changed at or after this time (ISO 8601 date-time with offset, or a date).
statusquerystring: active, inactive, allFilter by status.
fieldsquerystringComma-separated top-level fields to return (id is always included).
if_queuedquerystring: errorerror: 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).
orderquerystring: modified, idid (default) or modified (default with modified_since).
formatquerystring: json, csvjson (default) or csv. Accept: text/csv works too.
flatquerystring: 11 returns the flat rows CSV uses, as JSON (what the Power Query recipe reads).

Responses

StatusMeans
200OK
202The company file keeps no copy here. The answer arrives at the next Web Connector check-in; read the job then.
400A parameter isn't valid, or the key was put in the URL.
401No key, or the key isn't valid.
404No such company file, record or job for this key.
409if_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.
429More 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

ParameterInTypeDescription
file_id (required)pathstringThe company file id (file_...), from GET /v1/files.
qb_id (required)pathstringQuickBooks' id for the record (ListID or TxnID).
if_queuedquerystring: errorerror: 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).
formatquerystring: json, csvjson (default) or csv. Accept: text/csv works too.

Fields

Classes fields
FieldTypeDescription
idstringQuickBooks' own id (ListID for lists, TxnID for transactions).
editSequencestringChanges every time the record is edited in QuickBooks.
createdAtdate-timeWhen the record was created, with the company file's time offset.
modifiedAtdate-timeWhen the record last changed. Use modified_since to read only what changed.
namestringThe class name.
fullNamestringThe full name, including parents (Customer:Job, Parent:Item).
isActivebooleanFalse 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.

Also in the reference: Customers, Vendors, Items, Accounts.