Using Departments/Locations and Classes in QuickBooks Online
QuickBooks Online supports two powerful categorization features for tracking where your business activity happens: Departments and Classes. In the QuickBooks API, business units (departments) are represented by the Department entity.
Enable Locations and Classes in QBO
- In QuickBooks Online, go to the gear icon → Account and settings → Advanced → Categories.
- Toggle on Track classes and/or Track locations (QBO's UI label for the Department entity).
- Optionally choose whether to assign classes/departments per transaction or per line.
- Save your changes.
Departments and Classes are best used for high‑level categories such as offices, regions, or departments. They are available on QuickBooks Online Plus and Advanced editions.
References:
- Using Classes and Departments in QBO: Using Classes And Locations in QuickBooks Online
- Business units in the API: Manage business units (Departments) workflow
How Apideck maps QBO Departments
- The Apideck Accounting API
departmentsresource maps to the QuickBooksDepartmententity. - If your product or domain uses the term “departments”, treat these QBO Departments as departments—they are the same underlying entity in QBO and are exposed via Apideck’s
departmentsendpoints. See: Manage business units (Departments). - Supported operations (QBO endpoints):
- List:
GET /query?query=select * from Department(paginate viaSTARTPOSITIONandMAXRESULTSclauses in the query) - Create:
POST /department - Get by ID:
GET /department/{id} - Update:
POST /department/{id}(sparse update)
- List:
- Field mappings (examples):
name→Namestatus→Active(Apideck normalizes toactive/inactive)row_version→SyncTokencreated_at/updated_at→MetaData.CreateTime/MetaData.LastUpdatedTime(normalized to ISO 8601)
Practical examples (Apideck Accounting API)
Create a department:
List departments:
Get a department by ID:
Update a department:
Notes and requirements
- Ensure Departments/Classes are enabled in the QBO company; otherwise department fields may be ignored or operations may fail validation in the UI.
- Required scope remains
com.intuit.quickbooks.accounting. - QBO represents business units as
Departmentin the API; Apideck’sdepartmentsabstracts this for consistency across accounting connectors.