QuickBooks: Query a report — trialbalance query Variant0 Standard
QuickBooks trialbalance.queryVariant0Standard: arguments, response, policy and SDK examples.
← Trialbalance operations · Get started
Operation quickbooks.trialbalance.query_a_report.standard
Provider route: GET /v3/company/{realmID}/reports/TrialBalance. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/quickbooks with npm, or alter-sdk-quickbooks with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { QuickBooksIntegration } from "@alter-ai/quickbooks";
async function execute(input: Parameters<QuickBooksIntegration["trialbalance"]["queryVariant0Standard"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new QuickBooksIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.trialbalance.queryVariant0Standard(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_quickbooks import QuickBooksIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = QuickBooksIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.trialbalance.query_variant_0_standard(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | Model | Optional | Expand Query a report — trialbalance query Variant0 Fr — request body — query |
Referenced models: Query a report — trialbalance query Variant0 Fr — request body — query
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Query a report — profitandloss query — response body |
Referenced models: Query a report — profitandloss query — response body
Schemas
Section titled “Schemas”Query a report — profitandloss query — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
Columns | Model | Optional | Expand Query a report — cashflow query — response body — Columns Top level container holding information for report columns or subcolumns. |
Header | Model | Optional | Expand Query a report — cashflow query — response body — Header The report header. |
Rows | Model | Optional | Expand Query a report — cashflow query — response body — Rows Top level container holding information for profit and loss report rows. |
Referenced models: Query a report — cashflow query — response body — Rows, Query a report — cashflow query — response body — Columns, Query a report — cashflow query — response body — Header
Query a report — trialbalance query Variant0 Fr — request body — query
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
accounting_method | string | Optional | The accounting method used in the report. Supported Values: Cash , Accrual |
date_macro | string | Optional | Predefined date range. Use if you want the report to cover a standard report date range; otherwise, use the start_date and end_date to cover an explicit report date range. Supported Values: Today, Yesterday, This Week, Last Week, This Week-to-date, Last Week-to-date, Next Week, Next 4 Weeks, This Month, Last Month, This Month-to-date, Last Month-to-date, Next Month, This Fiscal Quarter, Last Fiscal Quarter, This Fiscal Quarter-to-date, Last Fiscal Quarter-to-date, Next Fiscal Quarter, This Fiscal Year, Last Fiscal Year, This Fiscal Year-to-date, Last Fiscal Year-to-date, Next Fiscal Year |
end_date | string | Optional | The end date of the report, in the format YYYY-MM-DD . start_date must be less than end_date . Use if you want the report to cover an explicit date range; otherwise, use date_macro to cover a standard report date range. If not specified value of date_macro is used |
sort_order | string | Optional | The sort order. Supported Values: ascend , descend |
start_date | string | Optional | The start date of the report, in the format YYYY-MM-DD . start_date must be less than end_date . Use if you want the report to cover an explicit date range; otherwise, use date_macro to cover a standard report date range. If not specified value of date_macro is used |
summarize_column_by | string | Optional | The criteria by which to group the report results. Supported Values: Total, Month, Week, Days, Quarter, Year, Customers, Vendors, Classes, Departments, Employees, ProductsAndServices |
minorversion | integer | Optional | Must equal: 75 |
requestid | string | Optional | Minimum length: 1 |
Query a report — cashflow query — response body — Rows
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
Row | array | Optional | Represents a row in a report. A group of rows is enclosed in a Rows container. Rows may be nested either as a single row or in sets, based on the accounts represented in the report and query parameters specified in the request. Parameters: type —As an enclosing section of sub-rows, this is always the string, Section . As a leaf row, this is always the string, Data . group —The group name, valid when type=Section . |
Row[] | Model | Each item | Expand Query a report — cashflow query — response body — Rows Row item |
Referenced models: Query a report — cashflow query — response body — Rows Row item
Query a report — cashflow query — response body — Columns
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
Column | array | Optional | Container for an individual report column definition. |
Column[] | Model | Each item | Expand Query a report — cashflow query — response body — Columns Column item |
Referenced models: Query a report — cashflow query — response body — Columns Column item
Query a report — cashflow query — response body — Header
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
Class | string | Optional | A string containing the Ids as specified with the corresponding filter query parameter. Only those filter query parameters specified in the request are returned in the header. |
Currency | string | Optional | A string containing the currency code associated with the report. |
Customer | string | Optional | A string containing the Ids as specified with the corresponding filter query parameter. Only those filter query parameters specified in the request are returned in the header. |
Department | string | Optional | A string containing the Ids as specified with the corresponding filter query parameter. Only those filter query parameters specified in the request are returned in the header. |
Employee | string | Optional | A string containing the Ids as specified with the corresponding filter query parameter. Only those filter query parameters specified in the request are returned in the header. |
EndPeriod | string | Optional | The date specified by the end_date query parameter submitted with the request. Format is yyyy-mm-dd . |
Item | string | Optional | A string containing the Ids as specified with the corresponding filter query parameter. Only those filter query parameters specified in the request are returned in the header. |
Option | array | Optional | |
Option[] | Model | Each item | Expand Query a report — cashflow query — response body — Header Option item Container for one or more name/value pairs that return additional information about the report contents. |
ReportBasis | string | Optional | Accounting method. Possible values include Cash and Accrual . |
ReportName | string | Optional | Name of the report. |
StartPeriod | string | Optional | The date specified by the start_date query parameter submitted with the request. Format is yyyy-mm-dd . |
SummarizeColumnsBy | string | Optional | The method by which report columns are organized. This contains the value specified by the summarize_column_by query parameter submitted with the request. |
Time | string | Optional | Date and timestamp of the report. |
Vendor | string | Optional | A string containing the Ids as specified with the corresponding filter query parameter. Only those filter query parameters specified in the request are returned in the header. |
Referenced models: Query a report — cashflow query — response body — Header Option item
Query a report — cashflow query — response body — Rows Row item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
ColData | array | Optional | |
ColData[] | object | Each item | Information for each column of a leaf row Row type=Data . There must be a ColData definition for each column defined in the Columns section. Parameters: id —The reference id of the entity as returned in the Id entity field. Returned where applicable. value —The value for column. The type of value is based on the column type. href —The link to the quick zoom data for this cell, available when the report endpoint specifies the qzurl query parameter. The qzurl query parameter is supported on a report by report basis; check the list of query parameters for the specific report to determine support. The value of the parameter is localized. Additional keys: allowed |
Header | object | Optional | Header row for the report section. Additional keys: allowed |
Rows | object | Optional | Container for one or more leaf rows. Additional keys: allowed |
Summary | object | Optional | Summary row for a report section. It is the cumulative total amount of money in the account, including the sub accounts. Additional keys: allowed |
Query a report — cashflow query — response body — Columns Column item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
ColTitle | string | Optional | The column label. This string appears at the top of the column. If not defined, the column does not have a label. The value of this attribute is localized. |
ColType | string | Optional | The type of information found in the column. Possible values include: Account —This column in the row represents an account for the row item. The row further defines the specific account. Money —This column in the row represents an amount for the row item. |
Query a report — cashflow query — response body — Header Option item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: allowed |
name | string | Optional | Supported Names: AccountingStandard —Indicates the accounting standard being used for this report. Returned with ProfitAndLoss and BalanceSheet reports, only. NoReportData —Used to signal whether report contains data. If true , report contains no data. If false , report contains data. Returned for every report type. |
value | string | Optional | The value of the parameter, as passed in with the report endpoint URL. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: quickbooks.trialbalance.query_a_report.standard. Catalog operation: trialbalance/query_a_report/standard. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.