QuickBooks: Query a report — customerbalancedetail query
QuickBooks customerbalancedetail.query: arguments, response, policy and SDK examples.
← customerbalancedetail operations · Get started · OpenAPI downloads
Contract 2026-10-20 · Operation quickbooks.customerbalancedetail.query_a_report
Provider route: GET /v3/company/{realmID}/reports/CustomerBalanceDetail. 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["customerbalancedetail"]["query"]>[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.customerbalancedetail.query(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.customerbalancedetail.query(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.aging_method | string | Optional | The date upon which aging is determined. Supported Values: Report_Date , Current |
query.arpaid | string | Optional | Supported Values: All , Paid , Unpaid |
query.columns | string | Optional | Column types to be shown in the report. Supported Values: bill_addr, create_by, create_date, cust_bill_email, cust_comp_name, cust_msg, cust_phone_other, cust_tel, cust_name, deliv_addr, doc_num*, due_date*, last_mod_by, last_mod_date, memo*, sale_sent_state, ship_addr, ship_date, ship_via, term_name, tracking_num, tx_date*, txn_type* Additional columns with custom fields enabled: sales_cust1, sales_cust2, sales_cust3 Additional columns with location tracking enabled: dept_name* |
query.custom1 | string | Optional | Filter by the specified custom field as defined by the CustomField attribute in transaction entities where supported. Supported Values: Name of custom field. |
query.customer | string | Optional | Filters report contents to include information for specified customers. Supported Values: One or more comma separated customer IDs as returned in the attribute, Customer.Id , of the Customer object response code. |
query.department | string | Optional | Filters report contents to include information for specified departments if so configured in the company file. Supported Values: One or more comma separated department IDs as returned in the attribute, Department.Id of the Department object response code. |
query.end_duedate | string | Optional | The range of dates over which receivables are due, in the format YYYY-MM-DD . start_duedate must be less than end_duedate . If not specified, all data is returned. |
query.report_date | string | Optional | Start date to use for the report, in the format YYYY-MM-DD . |
query.shipvia | string | Optional | Filter by the shipping method as stored in Invoice.ShipMethodRef.Name . Supported Values: Any shipping method as sent in the Invoice.ShipMethodRef.Name attribute at Invoice create- or update-time. |
query.sort_by | string | Optional | The column type used in sorting report rows. Specify a column type as defined with the columns query parameter. |
query.sort_order | string | Optional | The sort order. Supported Values: ascend , descend |
query.start_duedate | string | Optional | The range of dates over which receivables are due, in the format YYYY-MM-DD . start_duedate must be less than end_duedate . If not specified, all data is returned. |
query.term | string | Optional | Filters report contents based on term or terms supplied. Supported Values: One or more comma separated term IDs as returned in the attribute, Term.Id of the Term object response code. |
query.minorversion | integer | Optional | Must equal: 75 |
query.requestid | string | Optional | Minimum length: 1 |
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 — taxsummary query — response body |
Referenced models: Query a report — taxsummary query — response body
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: quickbooks.customerbalancedetail.query_a_report. Catalog operation: customerbalancedetail/query_a_report. 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.