Authenticate with OAuth 2.0 (com.intuit.quickbooks.accounting scope) and note the realmId for all subsequent requests to the base URL https://quickbooks.api.intuit.com/v3/company/{realmId}.
Create a Class entity via POST /v3/company/{realmId}/class with a JSON body containing Name and optionally SubClass=true and ParentRef to model a hierarchy (e.g., Product Line > Region); locations use the Department entity with the same pattern.
Tag transactions (invoices, expenses, journal entries) by including a ClassRef or DepartmentRef object on the transaction body or on individual line items, depending on whether class tracking is set to 'one per transaction' or 'one per line' in company Preferences.
Run a segmented Profit and Loss by calling GET /v3/company/{realmId}/reports/ProfitAndLossDetail with query parameters class or department to filter to a specific segment; use summarize_column_by=Class for a comparative multi-column report.
To retrieve all class or location breakdowns in one pass, call the ProfitAndLoss report without filters and parse the ColData[].value metadata from the Columns section, which lists each Class dimension.
Respect the product-tier limit of 40 combined classes and locations on QBO Plus (enforced via API as of October 2025); query the Preferences entity before bulk-creating to avoid hitting the cap.
Known gotchas
Class and location usage limits are now enforced at the API level (effective October 2025); applications that previously created classes beyond the product limit will receive an error — check the CompanyInfo or Preferences entity to confirm the SKU.
The Batch API endpoint is rate-limited to 120 requests per minute per realmId (effective October 2025); segment reporting loops that use batch calls must implement throttling.
Classes and Departments are distinct entities in the QBO API and cannot be used interchangeably; the report parameter is 'class' for Class entities and 'department' for Department/Location entities.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp