nodejs client for Intuit's QuickBooks API
npm install node-quickbooks
var QuickBooks = require('node-quickbooks')
var qbo = new QuickBooks(consumerKey,
consumerSecret,
oauthToken,
false, // no token secret for oAuth 2.0
realmId,
false, // use the sandbox?
true, // enable debugging?
null, // set minorversion, or null for the latest version
'2.0', //oAuth version
refreshToken);
qbo.createAttachable({Note: 'My File'}, function(err, attachable) {
if (err) console.log(err)
else console.log(attachable.Id)
})
qbo.getBillPayment('42', function(err, billPayment) {
console.log(billPayment)
})
qbo.updateCustomer({
Id: '42',
SyncToken: '1',
sparse: true,
PrimaryEmailAddr: {Address: 'customer@example.com'}
}, function(err, customer) {
if (err) console.log(err)
else console.log(customer)
})
qbo.deleteAttachable('42', function(err, attachable) {
if (err) console.log(err)
else console.log(attachable)
}))
qbo.findAccounts({
AccountType: 'Expense',
desc: 'MetaData.LastUpdatedTime',
limit: 5,
offset: 5
}, function(err, accounts) {
accounts.QueryResponse.Account.forEach(function(account) {
console.log(account.Name)
})
})
qbo.reportBalanceSheet({department: '1,4,7'}, function(err, balanceSheet) {
console.log(balanceSheet)
})
qbo.upload(
'contractor.jpg',
'image/jpeg',
fs.createReadStream('contractor.jpg'),
'Invoice',
40,
function(err, data) {
console.log(err)
console.log(data)
})
All query functions take an optional first argument object which will be converted to a
where clause by means of the keys and values of the object used as column names and parameter values of the where clause. For example, in order to issue a query with a simple where clause such as, select * from attachable where Note = 'My sample note field'
, the following code would be needed:
qbo.findAttachables({
Note: 'My sample note field'
}, function(e, attachables) {
console.log(attachables)
})
Alternatively, the object can be an array of objects, each specifying a field
, value
and operator
(optional) keys. This allows you to build a more complex query using operators such as =
, IN
, <
, >
, <=
, >=
, or LIKE
.
qbo.findTimeActivities([
{field: 'TxnDate', value: '2014-12-01', operator: '>'},
{field: 'TxnDate', value: '2014-12-03', operator: '<'},
{field: 'limit', value: 5}
], function (e, timeActivities) {
console.log(timeActivities)
})
Basic ordering is achieved via the optional first argument object as well. Include asc
or desc
keys in the object whose values are the columns you wish to sort on. For example:
qbo.findAttachables({
desc: 'MetaData.LastUpdatedTime'
}, function(e, attachables) {
console.log(attachables)
})
Pagination is achieved via the optional first argument object as well. Include limit
and/or offset
keys in the object whose values are the number of rows you wish to limit the result set to or from respectively. For example:
qbo.findAttachables({
limit: 10,
offset: 10
}, function(e, attachables) {
console.log(attachables)
})
The default (and max) limit is 1000 records returned in a single request. Adding a boolean fetchAll
parameter
will return all available records, transparently issuing as many requests as necessary to fetch them. So
in the first example below, if your Quickbooks business contains 5,000 customers, 5 http requests will be issued behind
the scenes and finally your callback will be invoked with an array of those 5,000 customers passed to it.
qbo.findCustomers({
fetchAll: true
}, function(e, customers) {
console.log(customers)
})
qbo.findCustomers([
{field: 'fetchAll', value: true},
{field: 'FamilyName', value: 'S%', operator: 'LIKE'}
], function(e, customers) {
console.log(customers)
})
Row counts rather than full result sets can be obtained by passing the count
key in the optional first argument object with a boolean true value. For example:
qbo.findAttachables({
count: true
}, function(e, attachables) {
console.log(attachables)
})
The example
directory contains a barebones Express application that demonstrates the OAuth workflow.
First navigate to the example
directory and install the required dependencies from NPM
npm install
You will need to create an Intuit Developer account at https://developer.intuit.com and add your app's OAuth Consumer Key and Secret to app.js
. Pay attention to which APIs (Payments, QuickBooks) you select during the application creation process, you will have to update example/views/intuit.ejs
if you did not select both.
Start the app
node app.js
Browse to http://localhost:3000/start and you will see a page containing only the Intuit Developer Javascript-rendered button. Clicking on this kicks off the OAuth exchange.
The Intuit Developer Javascript code calls back into the node application, which needs to invoke the OAuth Request Token URL at https://oauth.intuit.com/oauth/v1/get_request_token via a server-side http POST method. Note how the response from the http POST is parsed and the browser is redirected to the App Center URL at https://appcenter.intuit.com/Connect/Begin?oauth_token= with the oauth_token
passed as a URL parameter. Note also how the oauth_token_secret
needs to somehow be maintained across http requests, as it needs to be passed in the second server-side http POST to the Access Token URL at https://oauth.intuit.com/oauth/v1/get_access_token. This final step is invoked once the user has authenticated on Intuit's site and authorized the application, and then the user is redirected back to the node application at the callback URL specified as a parameter in the Request Token remote call, in the example app's case, http://localhost:3000/callback.
The Intuit Developer Javascript code contained in intuit.ejs
is configured with the grantUrl
option set to "http://localhost:3000/requestToken". You will want to change this to an appropriate URL for your application, but you will need to write similar functionality to that contained in the '/requestToken' route configured in app.js
, also taking care to configure your consumerKey
and consumerSecret
on lines 27-28 in app.js.
First you'll need to fill in the missing values in config.js. The consumerKey and consumerSecret you can get from the Intuit Developer portal, the token, tokenSecret, and realmId are easiest to obtain by running the example app, completing the OAuth workflow, and copying the values that are logged to the console. Once you've filled in the missing credentials in config.js you can simply run:
npm test
QuickBooks(consumerKey, consumerSecret, oauth_token, oauth_token_secret, realmId, debug, minorVer, oAuthVer, refresh_token)
Arguments
consumerKey
- The application's consumer keyconsumerSecret
- The application's consumer secretoauth_token
- The user's generated tokenoauth_token_secret
- The user's generated secret. Set this to false for oAuth 2.realmId
- The company IDuseSandbox
- boolean flag to indicate whether to use Sandbox (i.e. for testing)debug
- boolean flag to log http requests, headers, and response bodies to the consoleminorVer
- Minor version for Intuit's API. Use null if you do not want to specify a version, to use the latestoAuthVer
- Use string '2.0' for oAuth 2refresh_token
- The user's generated refresh token. This is the code query parameter in the oAuth 2.0 callbackcreateAccount
createAttachable
createBill
createBillPayment
createClass
createCreditMemo
createCustomer
createDepartment
createDeposit
createEmployee
createEstimate
createInvoice
createItem
createJournalCode
createJournalEntry
createPayment
createPaymentMethod
createPurchase
createPurchaseOrder
createRefundReceipt
createSalesReceipt
createTaxAgency
createTaxService
createTerm
createTimeActivity
createTransfer
createVendor
createVendorCredit
getAccount
getAttachable
getBill
getBillPayment
getClass
getCompanyInfo
getCreditMemo
getCustomer
getDepartment
getDeposit
getEmployee
getEstimate
getExchangeRate
getInvoice
getItem
getJournalCode
getJournalEntry
getPayment
getPaymentMethod
getPreferences
getPurchase
getPurchaseOrder
getRefundReceipt
getReports
getSalesReceipt
getTaxAgency
getTaxCode
getTaxRate
getTerm
getTimeActivity
getVendor
getVendorCredit
updateAccount
updateAttachable
updateBill
updateBillPayment
updateClass
updateCompanyInfo
updateCreditMemo
updateCustomer
updateDepartment
updateDeposit
updateEmployee
updateEstimate
updateInvoice
updateItem
updateJournalCode
updateJournalEntry
updatePayment
updatePaymentMethod
updatePreferences
updatePurchase
updatePurchaseOrder
updateRefundReceipt
updateSalesReceipt
updateTaxAgency
updateTaxCode
updateTaxRate
updateTerm
updateTimeActivity
updateTransfer
updateVendor
updateVendorCredit
updateExchangeRate
deleteAttachable
deleteBill
deleteBillPayment
deleteCreditMemo
deleteDeposit
deleteEstimate
deleteInvoice
deleteJournalCode
deleteJournalEntry
deletePayment
deletePurchase
deletePurchaseOrder
deleteRefundReceipt
deleteSalesReceipt
deleteTimeActivity
deleteTransfer
deleteVendorCredit
findAccounts
findAttachables
findBills
findBillPayments
findBudgets
findClasses
findCompanyInfos
findCreditMemos
findCustomers
findDepartments
findDeposits
findEmployees
findEstimates
findInvoices
findItems
findJournalCodes
findJournalEntries
findPayments
findPaymentMethods
findPreferenceses
findPurchases
findPurchaseOrders
findRefundReceipts
findSalesReceipts
findTaxAgencies
findTaxCodes
findTaxRates
findTerms
findTimeActivities
findVendors
findVendorCredits
findExchangeRates
reportBalanceSheet
reportProfitAndLoss
reportProfitAndLossDetail
reportTrialBalance
reportCashFlow
reportInventoryValuationSummary
reportCustomerSales
reportItemSales
reportCustomerIncome
reportCustomerBalance
reportCustomerBalanceDetail
reportAgedReceivables
reportAgedReceivableDetail
reportVendorBalance
reportVendorBalanceDetail
reportAgedPayables
reportAgedPayableDetail
reportVendorExpenses
reportTransactionList
reportGeneralLedgerDetail
reportDepartmentSales
reportClassSales
getInvoicePdf
getCreditMemoPdf
getSalesReceiptPdf
sendInvoicePdf
sendCreditMemoPdf
sendEstimatePdf
sendSalesReceiptPdf
Creates the Account in QuickBooks
Arguments
object
- The unsaved account, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent AccountCreates the Attachable in QuickBooks
Arguments
object
- The unsaved attachable, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent AttachableCreates the Bill in QuickBooks
Arguments
object
- The unsaved bill, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent BillCreates the BillPayment in QuickBooks
Arguments
object
- The unsaved billPayment, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent BillPaymentCreates the Class in QuickBooks
Arguments
object
- The unsaved class, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent ClassCreates the CreditMemo in QuickBooks
Arguments
object
- The unsaved creditMemo, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent CreditMemoCreates the Customer in QuickBooks
Arguments
object
- The unsaved customer, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent CustomerCreates the Department in QuickBooks
Arguments
object
- The unsaved department, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent DepartmentCreates the Deposit in QuickBooks
Arguments
object
- The unsaved deposit, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent DepositCreates the Employee in QuickBooks
Arguments
object
- The unsaved employee, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent EmployeeCreates the Estimate in QuickBooks
Arguments
object
- The unsaved estimate, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent EstimateCreates the Invoice in QuickBooks
Arguments
object
- The unsaved invoice, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent InvoiceCreates the Item in QuickBooks
Arguments
object
- The unsaved item, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent ItemCreates the JournalCode in QuickBooks
Arguments
object
- The unsaved journalCode, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent JournalCodeCreates the JournalEntry in QuickBooks
Arguments
object
- The unsaved journalEntry, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent JournalEntryCreates the Payment in QuickBooks
Arguments
object
- The unsaved payment, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent PaymentCreates the PaymentMethod in QuickBooks
Arguments
object
- The unsaved paymentMethod, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent PaymentMethodCreates the Purchase in QuickBooks
Arguments
object
- The unsaved purchase, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent PurchaseCreates the PurchaseOrder in QuickBooks
Arguments
object
- The unsaved purchaseOrder, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent PurchaseOrderCreates the RefundReceipt in QuickBooks
Arguments
object
- The unsaved refundReceipt, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent RefundReceiptCreates the SalesReceipt in QuickBooks
Arguments
object
- The unsaved salesReceipt, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent SalesReceiptCreates the TaxAgency in QuickBooks
Arguments
object
- The unsaved taxAgency, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent TaxAgencyCreates the TaxService in QuickBooks
Arguments
object
- The unsaved taxService, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent TaxServiceCreates the Term in QuickBooks
Arguments
object
- The unsaved term, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent TermCreates the TimeActivity in QuickBooks
Arguments
object
- The unsaved timeActivity, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent TimeActivityCreates the Transfer in QuickBooks
Arguments
object
- The unsaved transfer, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent TransferCreates the Vendor in QuickBooks
Arguments
object
- The unsaved vendor, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent VendorCreates the VendorCredit in QuickBooks
Arguments
object
- The unsaved vendorCredit, to be persisted in QuickBookscallback
- Callback function which is called with any error and the persistent VendorCreditRetrieves the Account from QuickBooks
Arguments
id
- The Id of persistent Accountcallback
- Callback function which is called with any error and the persistent AccountRetrieves the Attachable from QuickBooks
Arguments
id
- The Id of persistent Attachablecallback
- Callback function which is called with any error and the persistent AttachableRetrieves the Bill from QuickBooks
Arguments
id
- The Id of persistent Billcallback
- Callback function which is called with any error and the persistent BillRetrieves the BillPayment from QuickBooks
Arguments
id
- The Id of persistent BillPaymentcallback
- Callback function which is called with any error and the persistent BillPaymentRetrieves the Class from QuickBooks
Arguments
id
- The Id of persistent Classcallback
- Callback function which is called with any error and the persistent ClassRetrieves the CompanyInfo from QuickBooks
Arguments
id
- The Id of persistent CompanyInfocallback
- Callback function which is called with any error and the persistent CompanyInfoRetrieves the CreditMemo from QuickBooks
Arguments
id
- The Id of persistent CreditMemocallback
- Callback function which is called with any error and the persistent CreditMemoRetrieves the Customer from QuickBooks
Arguments
id
- The Id of persistent Customercallback
- Callback function which is called with any error and the persistent CustomerRetrieves the Department from QuickBooks
Arguments
id
- The Id of persistent Departmentcallback
- Callback function which is called with any error and the persistent DepartmentRetrieves the Deposit from QuickBooks
Arguments
id
- The Id of persistent Depositcallback
- Callback function which is called with any error and the persistent DepositRetrieves the Employee from QuickBooks
Arguments
id
- The Id of persistent Employeecallback
- Callback function which is called with any error and the persistent EmployeeRetrieves the Estimate from QuickBooks
Arguments
id
- The Id of persistent Estimatecallback
- Callback function which is called with any error and the persistent EstimateRetrieves an ExchangeRate from QuickBooks
Arguments
options
- An object with options including the required sourcecurrencycode
parameter and optional asofdate
parameter.callback
- Callback function which is called with any error and the ExchangeRateRetrieves the Invoice from QuickBooks
Arguments
id
- The Id of persistent Invoicecallback
- Callback function which is called with any error and the persistent InvoiceRetrieves the Item from QuickBooks
Arguments
id
- The Id of persistent Itemcallback
- Callback function which is called with any error and the persistent ItemRetrieves the JournalCode from QuickBooks
Arguments
id
- The Id of persistent JournalCodecallback
- Callback function which is called with any error and the persistent JournalCodeRetrieves the JournalEntry from QuickBooks
Arguments
id
- The Id of persistent JournalEntrycallback
- Callback function which is called with any error and the persistent JournalEntryRetrieves the Payment from QuickBooks
Arguments
id
- The Id of persistent Paymentcallback
- Callback function which is called with any error and the persistent PaymentRetrieves the PaymentMethod from QuickBooks
Arguments
id
- The Id of persistent PaymentMethodcallback
- Callback function which is called with any error and the persistent PaymentMethodRetrieves the Preferences from QuickBooks
Arguments
callback
- Callback function which is called with any error and the Preferences of the authorised realmRetrieves the Purchase from QuickBooks
Arguments
id
- The Id of persistent Purchasecallback
- Callback function which is called with any error and the persistent PurchaseRetrieves the PurchaseOrder from QuickBooks
Arguments
id
- The Id of persistent PurchaseOrdercallback
- Callback function which is called with any error and the persistent PurchaseOrderRetrieves the RefundReceipt from QuickBooks
Arguments
id
- The Id of persistent RefundReceiptcallback
- Callback function which is called with any error and the persistent RefundReceiptRetrieves the Reports from QuickBooks
Arguments
id
- The Id of persistent Reportscallback
- Callback function which is called with any error and the persistent ReportsRetrieves the SalesReceipt from QuickBooks
Arguments
id
- The Id of persistent SalesReceiptcallback
- Callback function which is called with any error and the persistent SalesReceiptRetrieves the TaxAgency from QuickBooks
Arguments
id
- The Id of persistent TaxAgencycallback
- Callback function which is called with any error and the persistent TaxAgencyRetrieves the TaxCode from QuickBooks
Arguments
id
- The Id of persistent TaxCodecallback
- Callback function which is called with any error and the persistent TaxCodeRetrieves the TaxRate from QuickBooks
Arguments
id
- The Id of persistent TaxRatecallback
- Callback function which is called with any error and the persistent TaxRateRetrieves the Term from QuickBooks
Arguments
id
- The Id of persistent Termcallback
- Callback function which is called with any error and the persistent TermRetrieves the TimeActivity from QuickBooks
Arguments
id
- The Id of persistent TimeActivitycallback
- Callback function which is called with any error and the persistent TimeActivityRetrieves the Transfer from QuickBooks
Arguments
id
- The Id of persistent Transfercallback
- Callback function which is called with any error and the persistent TransferRetrieves the Vendor from QuickBooks
Arguments
id
- The Id of persistent Vendorcallback
- Callback function which is called with any error and the persistent VendorRetrieves the VendorCredit from QuickBooks
Arguments
id
- The Id of persistent VendorCreditcallback
- Callback function which is called with any error and the persistent VendorCreditUpdates QuickBooks version of Account
Arguments
object
- The persistent Account, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated AccountUpdates QuickBooks version of Attachable
Arguments
object
- The persistent Attachable, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated AttachableUpdates QuickBooks version of Bill
Arguments
object
- The persistent Bill, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated BillUpdates QuickBooks version of BillPayment
Arguments
object
- The persistent BillPayment, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated BillPaymentUpdates QuickBooks version of Class
Arguments
object
- The persistent Class, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated ClassUpdates QuickBooks version of CompanyInfo
Arguments
object
- The persistent CompanyInfo, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated CompanyInfoUpdates QuickBooks version of CreditMemo
Arguments
object
- The persistent CreditMemo, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated CreditMemoUpdates QuickBooks version of Customer
Arguments
object
- The persistent Customer, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated CustomerUpdates QuickBooks version of Department
Arguments
object
- The persistent Department, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated DepartmentUpdates QuickBooks version of Deposit
Arguments
object
- The persistent Deposit, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated DepositUpdates QuickBooks version of Employee
Arguments
object
- The persistent Employee, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated EmployeeUpdates QuickBooks version of Estimate
Arguments
object
- The persistent Estimate, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated EstimateUpdates QuickBooks version of Invoice
Arguments
object
- The persistent Invoice, including Id and SyncToken fields. To void invoice set void:true
in the object.callback
- Callback function which is called with any error and the updated InvoiceUpdates QuickBooks version of Item
Arguments
object
- The persistent Item, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated ItemUpdates QuickBooks version of JournalCode
Arguments
object
- The persistent JournalCode, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated JournalCodeUpdates QuickBooks version of JournalEntry
Arguments
object
- The persistent JournalEntry, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated JournalEntryUpdates QuickBooks version of Payment
Arguments
object
- The persistent Payment, including Id and SyncToken fields. To void payment set void:true
in the object.callback
- Callback function which is called with any error and the updated PaymentUpdates QuickBooks version of PaymentMethod
Arguments
object
- The persistent PaymentMethod, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated PaymentMethodUpdates QuickBooks version of Preferences
Arguments
object
- The persistent Preferences, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated PreferencesUpdates QuickBooks version of Purchase
Arguments
object
- The persistent Purchase, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated PurchaseUpdates QuickBooks version of PurchaseOrder
Arguments
object
- The persistent PurchaseOrder, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated PurchaseOrderUpdates QuickBooks version of RefundReceipt
Arguments
object
- The persistent RefundReceipt, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated RefundReceiptUpdates QuickBooks version of SalesReceipt
Arguments
object
- The persistent SalesReceipt, including Id and SyncToken fields. To void sales receipt set void:true
in the object.callback
- Callback function which is called with any error and the updated SalesReceiptUpdates QuickBooks version of TaxAgency
Arguments
object
- The persistent TaxAgency, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated TaxAgencyUpdates QuickBooks version of TaxCode
Arguments
object
- The persistent TaxCode, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated TaxCodeUpdates QuickBooks version of TaxRate
Arguments
object
- The persistent TaxRate, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated TaxRateUpdates QuickBooks version of Term
Arguments
object
- The persistent Term, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated TermUpdates QuickBooks version of TimeActivity
Arguments
object
- The persistent TimeActivity, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated TimeActivityUpdates QuickBooks version of Transfer
Arguments
object
- The persistent Transfer, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated TransferUpdates QuickBooks version of Vendor
Arguments
object
- The persistent Vendor, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated VendorUpdates QuickBooks version of VendorCredit
Arguments
object
- The persistent VendorCredit, including Id and SyncToken fieldscallback
- Callback function which is called with any error and the updated VendorCreditUpdates QuickBooks version of ExchangeRate
Arguments
object
- The persistent ExchangeRatecallback
- Callback function which is called with any error and the updated ExchangeRateDeletes the Attachable from QuickBooks
Arguments
idOrEntity
- The persistent Attachable to be deleted, or the Id of the Attachable, in which case an extra GET request will be issued to first retrieve the Attachablecallback
- Callback function which is called with any error and the status of the persistent AttachableDeletes the Bill from QuickBooks
Arguments
idOrEntity
- The persistent Bill to be deleted, or the Id of the Bill, in which case an extra GET request will be issued to first retrieve the Billcallback
- Callback function which is called with any error and the status of the persistent BillDeletes the BillPayment from QuickBooks
Arguments
idOrEntity
- The persistent BillPayment to be deleted, or the Id of the BillPayment, in which case an extra GET request will be issued to first retrieve the BillPaymentcallback
- Callback function which is called with any error and the status of the persistent BillPaymentDeletes the CreditMemo from QuickBooks
Arguments
idOrEntity
- The persistent CreditMemo to be deleted, or the Id of the CreditMemo, in which case an extra GET request will be issued to first retrieve the CreditMemocallback
- Callback function which is called with any error and the status of the persistent CreditMemoDeletes the Deposit from QuickBooks
Arguments
idOrEntity
- The persistent Deposit to be deleted, or the Id of the Deposit, in which case an extra GET request will be issued to first retrieve the Depositcallback
- Callback function which is called with any error and the status of the persistent DepositDeletes the Estimate from QuickBooks
Arguments
idOrEntity
- The persistent Estimate to be deleted, or the Id of the Estimate, in which case an extra GET request will be issued to first retrieve the Estimatecallback
- Callback function which is called with any error and the status of the persistent EstimateDeletes the Invoice from QuickBooks
Arguments
idOrEntity
- The persistent Invoice to be deleted, or the Id of the Invoice, in which case an extra GET request will be issued to first retrieve the Invoicecallback
- Callback function which is called with any error and the status of the persistent InvoiceDeletes the JournalCode from QuickBooks
Arguments
idOrEntity
- The persistent JournalCode to be deleted, or the Id of the JournalCode, in which case an extra GET request will be issued to first retrieve the JournalCodecallback
- Callback function which is called with any error and the status of the persistent JournalCodeDeletes the JournalEntry from QuickBooks
Arguments
idOrEntity
- The persistent JournalEntry to be deleted, or the Id of the JournalEntry, in which case an extra GET request will be issued to first retrieve the JournalEntrycallback
- Callback function which is called with any error and the status of the persistent JournalEntryDeletes the Payment from QuickBooks
Arguments
idOrEntity
- The persistent Payment to be deleted, or the Id of the Payment, in which case an extra GET request will be issued to first retrieve the Paymentcallback
- Callback function which is called with any error and the status of the persistent PaymentDeletes the Purchase from QuickBooks
Arguments
idOrEntity
- The persistent Purchase to be deleted, or the Id of the Purchase, in which case an extra GET request will be issued to first retrieve the Purchasecallback
- Callback function which is called with any error and the status of the persistent PurchaseDeletes the PurchaseOrder from QuickBooks
Arguments
idOrEntity
- The persistent PurchaseOrder to be deleted, or the Id of the PurchaseOrder, in which case an extra GET request will be issued to first retrieve the PurchaseOrdercallback
- Callback function which is called with any error and the status of the persistent PurchaseOrderDeletes the RefundReceipt from QuickBooks
Arguments
idOrEntity
- The persistent RefundReceipt to be deleted, or the Id of the RefundReceipt, in which case an extra GET request will be issued to first retrieve the RefundReceiptcallback
- Callback function which is called with any error and the status of the persistent RefundReceiptDeletes the SalesReceipt from QuickBooks
Arguments
idOrEntity
- The persistent SalesReceipt to be deleted, or the Id of the SalesReceipt, in which case an extra GET request will be issued to first retrieve the SalesReceiptcallback
- Callback function which is called with any error and the status of the persistent SalesReceiptDeletes the TimeActivity from QuickBooks
Arguments
idOrEntity
- The persistent TimeActivity to be deleted, or the Id of the TimeActivity, in which case an extra GET request will be issued to first retrieve the TimeActivitycallback
- Callback function which is called with any error and the status of the persistent TimeActivityDeletes the Transfer from QuickBooks
Arguments
idOrEntity
- The persistent Transfer to be deleted, or the Id of the Transfer, in which case an extra GET request will be issued to first retrieve the Transfercallback
- Callback function which is called with any error and the status of the persistent TransferDeletes the VendorCredit from QuickBooks
Arguments
idOrEntity
- The persistent VendorCredit to be deleted, or the Id of the VendorCredit, in which case an extra GET request will be issued to first retrieve the VendorCreditcallback
- Callback function which is called with any error and the status of the persistent VendorCreditFinds all Accounts in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of AccountsFinds all Attachables in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of AttachablesFinds all Bills in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of BillsFinds all BillPayments in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of BillPaymentsFinds all Budgets in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of BudgetsFinds all Classs in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of ClassesFinds all CompanyInfos in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of CompanyInfosFinds all CreditMemos in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of CreditMemosFinds all Customers in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of CustomersFinds all Departments in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of DepartmentsFinds all Deposits in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of DepositsFinds all Employees in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of EmployeesFinds all Estimates in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of EstimatesFinds all Invoices in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of InvoicesFinds all Items in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of ItemsFinds all JournalCodes in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of JournalCodesFinds all JournalEntrys in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of JournalEntriesFinds all Payments in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of PaymentsFinds all PaymentMethods in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of PaymentMethodsFinds all Preferencess in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of PreferencesFinds all Purchases in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of PurchasesFinds all PurchaseOrders in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of PurchaseOrdersFinds all RefundReceipts in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of RefundReceiptsFinds all SalesReceipts in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of SalesReceiptsFinds all TaxAgencys in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of TaxAgenciesFinds all TaxCodes in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of TaxCodesFinds all TaxRates in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of TaxRatesFinds all Terms in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of TermsFinds all TimeActivitys in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of TimeActivitiesFinds all Vendors in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of VendorsFinds all VendorCredits in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of VendorCreditsFinds all ExchangeRates in QuickBooks, optionally matching the specified criteria
Arguments
criteria
- (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'"callback
- Callback function which is called with any error and the list of ExchangeRatesRetrieves the BalanceSheet Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the BalanceSheet ReportRetrieves the ProfitAndLoss Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the ProfitAndLoss ReportRetrieves the ProfitAndLossDetail Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the ProfitAndLossDetail ReportRetrieves the TrialBalance Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the TrialBalance ReportRetrieves the CashFlow Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the CashFlow ReportRetrieves the InventoryValuationSummary Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the InventoryValuationSummary ReportRetrieves the CustomerSales Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the CustomerSales ReportRetrieves the ItemSales Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the ItemSales ReportRetrieves the CustomerIncome Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the CustomerIncome ReportRetrieves the CustomerBalance Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the CustomerBalance ReportRetrieves the CustomerBalanceDetail Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the CustomerBalanceDetail ReportRetrieves the AgedReceivables Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the AgedReceivables ReportRetrieves the AgedReceivableDetail Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the AgedReceivableDetail ReportRetrieves the VendorBalance Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the VendorBalance ReportRetrieves the VendorBalanceDetail Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the VendorBalanceDetail ReportRetrieves the AgedPayables Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the AgedPayables ReportRetrieves the AgedPayableDetail Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the AgedPayableDetail ReportRetrieves the VendorExpenses Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the VendorExpenses ReportRetrieves the TransactionList Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the TransactionList ReportRetrieves the GeneralLedgerDetail Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the GeneralLedgerDetail ReportRetrieves the DepartmentSales Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the DepartmentSales ReportRetrieves the ClassSales Report from QuickBooks
Arguments
options
- (Optional) Map of key-value pairs passed as options to the Reportcallback
- Callback function which is called with any error and the ClassSales ReportRetrieves the Invoice PDF from QuickBooks
Arguments
id
- The Id of persistent Invoicecallback
- Callback function which is called with any error and the Invoice PDFRetrieves the Credit Memo PDF from QuickBooks
Arguments
id
- The Id of persistent Credit Memocallback
- Callback function which is called with any error and the Credit Memo PDFRetrieves the SalesReceipt PDF from QuickBooks
Arguments
id
- The Id of persistent SalesReceiptcallback
- Callback function which is called with any error and the persistent SalesReceipt PDFEmails the Invoice PDF from QuickBooks to the address supplied in Invoice.BillEmail.EmailAddress or the specified 'sendTo' address
Arguments
Id
- The Id of persistent InvoicesendTo
- (Optional) optional email address to send the PDF to. If not provided, address supplied in Invoice.BillEmail.EmailAddress will be usedcallback
- Callback function which is called with any error and the Invoice PDFEmails the Credit Memo PDF from QuickBooks to the address supplied in CreditMemo.BillEmail.EmailAddress or the specified 'sendTo' address
Arguments
Id
- The Id of persistent Credit MemosendTo
- (Optional) optional email address to send the PDF to. If not provided, address supplied in Credit Memo.BillEmail.EmailAddress will be usedcallback
- Callback function which is called with any error and the Credit Memo PDFEmails the Estimate PDF from QuickBooks to the address supplied in Estimate.BillEmail.EmailAddress or the specified 'sendTo' address
Arguments
Id
- The Id of persistent EstimatesendTo
- (Optional) optional email address to send the PDF to. If not provided, address supplied in Estimate.BillEmail.EmailAddress will be usedcallback
- Callback function which is called with any error and the Estimate PDFEmails the SalesReceipt PDF from QuickBooks to the address supplied in SalesReceipt.BillEmail.EmailAddress or the specified 'sendTo' address
Arguments
Id
- The Id of persistent SalesReceiptsendTo
- (Optional) optional email address to send the PDF to. If not provided, address supplied in SalesReceipt.BillEmail.EmailAddress will be usedcallback
- Callback function which is called with any error and the SalesReceipt PDFEmails the Purchase Order from QuickBooks to the address supplied in PurchaseOrder.POEmail.Address or the specified 'sendTo' address
Arguments
Id
- The Id of persistent Purchase OrdersendTo
- (Optional) optional email address to send the email to. If not provided, address supplied in PurchaseOrder.POEmail.Address will be usedcallback
- Callback function which is called with any error and the PurchaseOrder PDFBatch operation to enable an application to perform multiple operations in a single request. The following batch items are supported:
create
update
delete
query
The maximum number of batch items in a single request is 30.
Arguments
items
- JavaScript array of batch itemscallback
- Callback function which is called with any error and list of BatchItemResponsesThe change data capture (CDC) operation returns a list of entities that have changed since a specified time.
Arguments
entities
- Comma separated list or JavaScript array of entities to search for changessince
- JavaScript Date or string representation of the form '2012-07-20T22:25:51-07:00' to look back for changes untilcallback
- Callback function which is called with any error and list of changesUploads a file as an Attachable in QBO, optionally linking it to the specified QBO Entity.
Arguments
filename
- the name of the filecontentType
- the mime type of the filestream
- ReadableStream of file contentsentityType
- optional string name of the QBO entity the Attachable will be linked to (e.g. Invoice)entityId
- optional Id of the QBO entity the Attachable will be linked tocallback
- callback which receives the newly created Attachable