Skip to content

QuickBooks: Sample batch request

QuickBooks batch.execute: arguments, response, policy and SDK examples.

← Batch operations · Get started

Operation quickbooks.batch.sample_batch_request

Provider route: POST /v3/company/{realmID}/batch. Alter supplies the connection’s credentials and routing.

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["batch"]["execute"]>[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.batch.execute(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.batch.execute(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.minorversionintegerOptionalMust equal: 75
query.requestidstringOptionalMinimum length: 1
bodyobjectRequired within parentAdditional keys: not allowed
body.BatchItemRequestarrayRequired within parentA wrapper around all request objects for this batch operation.
Minimum items: 1
Maximum items: 30
body.BatchItemRequest[]ModelEach itemExpand Sample batch request — request body — body Batch Item Request item

Referenced models: Sample batch request — request body — body Batch Item Request item

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Sample batch request — response body

Referenced models: Sample batch request — response body

93 more schemas are linked from the tables above, on the schema pages.

Sample batch request — response body
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
BatchItemResponsearrayOptionalA wrapper around all response objects for this batch operation.
BatchItemResponse[]ModelEach itemExpand Sample batch request — response body — Batch Item Response item

Referenced models: Sample batch request — response body — Batch Item Response item

Sample batch request — response body — Batch Item Response item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
QueryResponseobjectOptionalAdditional keys: allowed
ResourceNameobjectOptionalThe payload for the response. If the operation results in an error, a Fault object is returned.
Additional keys: allowed
bIdstringOptionalUnique identifier for the batch item. This corresponds to the id supplied in the corresponding batch item request.
Create a refund receipt — request body — body Check Payment
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
AcctNumstringOptionalChecking account number, as printed on the check.
BankNamestringOptionalThe name of the bank on which the check was drawn.
CheckNumstringOptionalThe check number printed on the check.
NameOnAcctstringOptionalName of persons or entities holding the account, as printed on the check.
StatusstringOptionalStatus of the check. Values provided by service/business logic.
Create a vendor — request body — body Other Contact Info item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
TelephonestringOptional
TypestringOptionalThe type of contact information. Valid values: TelephoneNumber
Void an invoice — request body — body Delivery Info
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
DeliveryTimestringOptionalDelivery date and time.
Read only: true
DeliveryTypestringOptionalType of the delivery. Used to confirm that email has been sent via the send operation. Valid values currently include: Email .
Read only: true
Full update companyinfo — request body — body Email
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
AddressstringOptionalAn email address. The address format must follow the RFC 822 standard.
Full update preferences — request body — body Email Messages Prefs
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
EstimateMessageModelOptionalExpand Full update preferences — request body — body Email Messages Prefs Invoice Message
Email message details for Estimate.
InvoiceMessageModelOptionalExpand Full update preferences — request body — body Email Messages Prefs Invoice Message
Email message details for Invoice.
SalesReceiptMessageModelOptionalExpand Full update preferences — request body — body Email Messages Prefs Invoice Message
Email message details for SalesReceipt.
StatementMessageModelOptionalExpand Full update preferences — request body — body Email Messages Prefs Invoice Message
Email message details for Statement.

Referenced models: Full update preferences — request body — body Email Messages Prefs Invoice Message

Read a bill — response body — Bill Meta Data
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
CreateTimestringOptionalTime the entity was created in the source domain.
Read only: true
LastUpdatedTimestringOptionalTime the entity was last updated in the source domain.
Read only: true
Create a vendor — request body — body Bill Addr
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
CitystringOptionalCity name.
CountrystringOptionalFor international addresses, the request can be an ISO alpha-3 code or the full name of the country. The response for update and read operations returns ISO alpha-3 country codes only.
CountrySubDivisionCodestringOptionalRegion within a country. For example, state name for USA, province name for Canada.
IdstringOptionalUnique identifier of the QuickBooks object for the address, autoincremented when the address is changed. This is an internal value included for backwards compatibility and can be ignored.
Read only: true
Line1stringOptionalFirst line of the address.
Line2stringOptionalSecond line of the address.
Line3stringOptionalThird line of the address.
Line4stringOptionalFourth line of the address.
Line5stringOptionalFifth line of the address.
PostalCodestringOptionalPostal code. For example, zip code for USA and Canada
Create a vendor — request body — body Fax
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
FreeFormNumberstringOptionalSpecifies the telephone number in free form.
Create a vendor — request body — body Vendor Payment Bank Detail
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
BankAccountNamestringOptionalName on the Bank Account
BankAccountNumberstringOptionalVendor's Bank Account number.
BankBranchIdentifierstringOptionalbank identification number used to identify the Bank Branch. 6 digit value in format xxx-xxx.
StatementTextstringOptionalText/note/comment for Remmittance
Create a vendor — request body — body Web Addr
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
URIstringOptionalUniform Resource Identifier for the web site.
Create a bill — request body — body Line item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
AccountBasedExpenseLineDetailModelRequired within parentExpand Create a bill — request body — body Line item Account Based Expense Line Detail
LineDetail
AmountJSONRequired within parentThe amount of the line item.
Decimal string
Amount (anyOf 1)numberAlternative
Amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?$
CustomExtensionsarrayOptionalArray of custom extension objects that associate additional attributes with the line. The ExtensionType field specifies the type of extension. The currently supported value is DIMENSION . The AssociatedValues array contains key/value pairs referencing Dimensions DefinitionID/Dimension ValueID. Multiple key/value pairs per extension type are supported. This field is designed to support additional extension types in the future. Dimensions is available for Intuit Enterprise Suite.
CustomExtensions[]ModelEach itemExpand Create an item — request body — body Custom Extensions item
DescriptionstringOptionalFree form text description of the line item that appears in the printed record.
DetailTypestringRequired within parentSet to AccountBasedExpenseLineDetail for this type of line.
IdstringOptionalThe Id of the line item. Its use in requests is as folllows: If Id is greater than zero and exists for the company, the request is considered an update operation for a line item. If no Id is provided, the Id provided is less than or equal to zero, or the Id provided is greater than zero and does not exist for the company then the request is considered a create operation for a line item. Available in all objects that use lines and support the update operation.
Read only: true
LineNumJSONOptionalSpecifies the position of the line in the collection of transaction lines. Positive Integer.
Decimal string
LineNum (anyOf 1)numberAlternative
LineNum (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?$

Referenced models: Create a bill — request body — body Line item Account Based Expense Line Detail, Create an item — request body — body Custom Extensions item

Create a bill — request body — body Currency Ref
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: allowed
namestringOptionalThe full name of the currency.
valueJSONRequired within parent
value (anyOf 1)stringAlternative
value (anyOf 2)integerAlternativeMinimum: 0
Maximum: 9007199254740991

SDK function policy ID: quickbooks.batch.sample_batch_request. Catalog operation: batch. 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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.