Connect to QuickBooks Online API with OAuth 2
npm install @eld0ud/quickbooks-node-promiseThis library was created for Quickbooks OAuth2. It converted a lot of node-quickbooks into promises.
Will handle the authentication and auto renew Access Tokens when they are expired.
javascript
const QuickBooks = require("quickbooks-node-promise");
const qbo = new QuickBooks(appConfig, realmID);
const customers = await qbo.findCustomers({ Id: "1234" });
const customer = customer.QueryResponse.Customer[0]
console.log(Hi my customer's name is ${customer.Name})
` Setup
Check the example for node express setup endpoints
Install
`
npm i quickbooks-node-promise
`Create Store Strategy
The store strategy is used to Save and Retreive token information. Both methods return a promise.`javascript
class QBStoreStrategy {
/**
* Uses a realmID to lookup the token information.
* Should return back in an object
*
* @param {number} realmID the quickbooks companyID
* @returns {object} Promise
*/
getQBToken({ realmID }) {
return new Promise((resolve) => {
// Get token infomraiton using realmID here // Return object which includes the access_expire_timestamp & refresh_expire_timestamp
let newToken = {
realmID: my_realm_id // optional but nice to have
access_token: my_access_token,
refresh_token: my_refresh_token,
access_expire_timestamp: my_access_expire_timestamp,
refresh_expire_timestamp: my_refresh_expire_timestamp,
id_token: my_id_token // (Optional) Used only for user OpenID verification
}
resolve(newToken)
})
}
/**
* Used to store the new token information
* Will be looked up using the realmID
*
* @param {number} realmID the quickbooks companyID
* @param {object} token
* @param {string} token.access_token used to access quickbooks resource
* @param {string} token.refresh_token This should be securely stored
* @param {number} token.expires_in access_token expire time in seconds, 3600 usually
* @param {number} token.x_refresh_token_expires_in refresh_token expire time in seconds.
* @param {string} token.id_token (Optional) OpenID user token - sent only on original access, not included in refresh token
* @param {string} token.token_type This will be "Bearer"
* @param {object} access_expire_timestamp JS Date object when the access_token expires, calculated from expires_in
* @param {object} refresh_expire_timestamp JS Date object when the refresh_token expires, calculated from x_refresh_token_expires_in
* @returns {object} Promise
*/
storeQBToken({ realmID, token, access_expire_timestamp, refresh_expire_timestamp }) {
return new Promise((resolve) => {
// Store information to DB or your location here now
saveToDB({
realmID: realmID
access_token: token.access_token,
refresh_token: token.refresh_token,
access_expire_timestamp: access_expire_timestamp,
refresh_expire_timestamp: refresh_expire_timestamp,
id_token: my_id_token // (Optional) Used only for user OpenID verification
})
// Return object which includes the access_expire_timestamp & refresh_expire_timestamp
let newToken = {
realmID: my_realm_id
access_token: my_access_token,
refresh_token: my_refresh_token,
access_expire_timestamp: my_access_expire_timestamp,
refresh_expire_timestamp: my_refresh_expire_timestamp,
id_token: my_id_token // (Optional) Used only for user OpenID verification
}
resolve(newToken)
})
}
}
`Config setup
A config setup is needed for each app. Some values have defaults but should supply your own
`javascript
// QB config
QBAppconfig = {
appKey: QB_APP_KEY,
appSecret: QB_APP_SECRET,
redirectUrl: QB_REDIRECT_URL,
minorversion: 37, / default if ommited is 37, check for your version in the documents /
useProduction: QB_USE_PROD, / default is false /
debug: (NODE_ENV == "production" ? false : true), / default is false /
storeStrategy: new QBStoreStrategy(), // if ommited uses storage inside the created object
scope: [
QuickBooks.scopes.Accounting,
QuickBooks.scopes.OpenId,
QuickBooks.scopes.Profile,
QuickBooks.scopes.Email,
QuickBooks.scopes.Phone,
QuickBooks.scopes.Address
]
}
`$3
`javascript
QuickBooks.scopes = {
Accounting: 'com.intuit.quickbooks.accounting',
Payment: 'com.intuit.quickbooks.payment',
Payroll: 'com.intuit.quickbooks.payroll',
TimeTracking: 'com.intuit.quickbooks.payroll.timetracking',
Benefits: 'com.intuit.quickbooks.payroll.benefits',
Profile: 'profile',
Email: 'email',
Phone: 'phone',
Address: 'address',
OpenId: 'openid',
Intuit_name: 'intuit_name'
}
`QuickBooks Methods
Kind: global class * QuickBooks
* new QuickBooks(appConfig, realmID)
* _instance_
* .authorizeUrl() ⇒ string
* .createToken(authCode, realmID) ⇒ object
* .saveToken(token)
* .getToken()
* .refreshWithAccessToken(token) ⇒ Token
* .refreshAccessToken() ⇒ Token
* .revokeAccess(useRefresh)
* .validateIdToken()
* .getPublicKey(modulus, exponent)
* .getUserInfo()
* .batch(items)
* .changeDataCapture(entities, since)
* .upload(filename, contentType, stream, entityType, entityId)
* .createAccount(account)
* .createAttachable(attachable)
* .createBill(bill)
* .createBillPayment(billPayment)
* .createClass(class)
* .createCreditMemo(creditMemo)
* .createCustomer(customer)
* .createDepartment(department)
* .createDeposit(deposit)
* .createEmployee(employee)
* .createEstimate(estimate)
* .createInvoice(invoice)
* .createItem(item)
* .createJournalCode(journalCode)
* .createJournalEntry(journalEntry)
* .createPayment(payment)
* .createPaymentMethod(paymentMethod)
* .createPurchase(purchase)
* .createPurchaseOrder(purchaseOrder)
* .createRefundReceipt(refundReceipt)
* .createSalesReceipt(salesReceipt)
* .createTaxAgency(taxAgency)
* .createTaxService(taxService)
* .createTerm(term)
* .createTimeActivity(timeActivity)
* .createTransfer(transfer)
* .createVendor(vendor)
* .createVendorCredit(vendorCredit)
* .getAccount(Id)
* .getAttachable(Id)
* .getBill(Id)
* .getBillPayment(Id)
* .getClass(Id)
* .getCompanyInfo(Id)
* .getCreditMemo(Id)
* .getCustomer(Id)
* .getDepartment(Id)
* .getDeposit(Id)
* .getEmployee(Id)
* .getEstimate(Id)
* .getExchangeRate(options)
* .getEstimatePdf(Id)
* .sendEstimatePdf(Id, sendTo)
* .getInvoice(Id)
* .getInvoicePdf(Id)
* .sendInvoicePdf(Id, sendTo)
* .getItem(Id)
* .getJournalCode(Id)
* .getJournalEntry(Id)
* .getPayment(Id)
* .getPaymentMethod(Id)
* .getPreferences()
* .getPurchase(Id)
* .getPurchaseOrder(Id)
* .getRefundReceipt(Id)
* .getReports(Id)
* .getSalesReceipt(Id)
* .getSalesReceiptPdf(Id)
* .sendSalesReceiptPdf(Id, sendTo)
* .getTaxAgency(Id)
* .getTaxCode(Id)
* .getTaxRate(Id)
* .getTerm(Id)
* .getTimeActivity(Id)
* .getTransfer(Id)
* .getVendor(Id)
* .getVendorCredit(Id)
* .updateAccount(account)
* .updateAttachable(attachable)
* .updateBill(bill)
* .updateBillPayment(billPayment)
* .updateClass(class)
* .updateCompanyInfo(companyInfo)
* .updateCreditMemo(creditMemo)
* .updateCustomer(customer)
* .updateDepartment(department)
* .updateDeposit(deposit)
* .updateEmployee(employee)
* .updateEstimate(estimate)
* .updateInvoice(invoice)
* .updateItem(item)
* .updateJournalCode(journalCode)
* .updateJournalEntry(journalEntry)
* .updatePayment(payment)
* .updatePaymentMethod(paymentMethod)
* .updatePreferences(preferences)
* .updatePurchase(purchase)
* .updatePurchaseOrder(purchaseOrder)
* .updateRefundReceipt(refundReceipt)
* .updateSalesReceipt(salesReceipt)
* .updateTaxAgency(taxAgency)
* .updateTaxCode(taxCode)
* .updateTaxRate(taxRate)
* .updateTerm(term)
* .updateTimeActivity(timeActivity)
* .updateTransfer(Transfer)
* .updateVendor(vendor)
* .updateVendorCredit(vendorCredit)
* .updateExchangeRate(exchangeRate)
* .deleteAttachable(idOrEntity)
* .deleteBill(idOrEntity)
* .deleteBillPayment(idOrEntity)
* .deleteCreditMemo(idOrEntity)
* .deleteDeposit(idOrEntity)
* .deleteEstimate(idOrEntity)
* .deleteInvoice(idOrEntity)
* .deleteJournalCode(idOrEntity)
* .deleteJournalEntry(idOrEntity)
* .deletePayment(idOrEntity)
* .deletePurchase(idOrEntity)
* .deletePurchaseOrder(idOrEntity)
* .deleteRefundReceipt(idOrEntity)
* .deleteSalesReceipt(idOrEntity)
* .deleteTimeActivity(idOrEntity)
* .deleteTransfer(idOrEntity)
* .deleteVendorCredit(idOrEntity)
* .voidInvoice(idOrEntity)
* .voidPayment(payment)
* .findAccounts(criteria)
* .findAttachables(criteria)
* .findBills(criteria)
* .findBillPayments(criteria)
* .findBudgets(criteria)
* .findClasses(criteria)
* .findCompanyInfos(criteria)
* .findCreditMemos(criteria)
* .findCustomers(criteria)
* .findDepartments(criteria)
* .findDeposits(criteria)
* .findEmployees(criteria)
* .findEstimates(criteria)
* .findInvoices(criteria)
* .findItems(criteria)
* .findJournalCodes(criteria)
* .findJournalEntries(criteria)
* .findPayments(criteria)
* .findPaymentMethods(criteria)
* .findPreferenceses(criteria)
* .findPurchases(criteria)
* .findPurchaseOrders(criteria)
* .findRefundReceipts(criteria)
* .findSalesReceipts(criteria)
* .findTaxAgencies(criteria)
* .findTaxCodes(criteria)
* .findTaxRates(criteria)
* .findTerms(criteria)
* .findTimeActivities(criteria)
* .findTransfers(criteria)
* .findVendors(criteria)
* .findVendorCredits(criteria)
* .findExchangeRates(criteria)
* .reportBalanceSheet(options)
* .reportProfitAndLoss(options)
* .reportProfitAndLossDetail(options)
* .reportTrialBalance(options)
* .reportCashFlow(options)
* .reportInventoryValuationSummary(options)
* .reportCustomerSales(options)
* .reportItemSales(options)
* .reportCustomerIncome(options)
* .reportCustomerBalance(options)
* .reportCustomerBalanceDetail(options)
* .reportAgedReceivables(options)
* .reportAgedReceivableDetail(options)
* .reportVendorBalance(options)
* .reportVendorBalanceDetail(options)
* .reportAgedPayables(options)
* .reportAgedPayableDetail(options)
* .reportVendorExpenses(options)
* .reportTransactionList(options)
* .reportGeneralLedgerDetail(options)
* .reportTaxSummary(options)
* .reportDepartmentSales(options)
* .reportClassSales(options)
* .reportAccountListDetail(options)
* _static_
* .authorizeUrl(appConfig) ⇒ string
* .createToken(appConfig, authCode, realmID) ⇒ object
* ._dateNotExpired(expired_timestamp) ⇒ boolean
* .isAccessTokenValid(token) ⇒ boolean
* .isRefreshTokenValid(token) ⇒ boolean
* .saveToken(store, info)
* .getToken()
$3
Node.js client encapsulating access to the QuickBooks V3 Rest API. An instance
of this class should be instantiated on behalf of each user and company accessing the api.
| Param | Description |
| --- | --- |
| appConfig | application information |
| realmID | QuickBooks companyId, returned as a request parameter when the user is redirected to the provided callback URL following authentication |
$3
Redirect link to Authorization PageKind: instance method of QuickBooks
Returns: string - authorize Uri
$3
Creates new token for the realmID from the returned authorization code received in the callback requestKind: instance method of QuickBooks
Returns: object - new token with expiration dates from storeStrategy
| Param | Type | Description |
| --- | --- | --- |
| authCode | string | The code returned in your callback as a param called "code" |
| realmID | number | The company identifier in your callback as a param called "realmId" |
$3
Save tokenKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| token | object | the token to send to store area |
$3
Get tokenKind: instance method of QuickBooks
$3
Use the refresh token to obtain a new access token.Kind: instance method of QuickBooks
Returns: Token - returns fresh token with access_token and refresh_token
| Param | Type | Description |
| --- | --- | --- |
| token | Token | has the refresh_token |
$3
Use the refresh token to obtain a new access token.Kind: instance method of QuickBooks
Returns: Token - returns fresh token with access_token and refresh_token
$3
Use either refresh token or access token to revoke access (OAuth2).Kind: instance method of QuickBooks
| Param | Description |
| --- | --- |
| useRefresh | boolean - Indicates which token to use: true to use the refresh token, false to use the access token. |
$3
Validate id_tokenKind: instance method of QuickBooks
$3
get Public KeyKind: instance method of QuickBooks
| Param |
| --- |
| modulus |
| exponent |
$3
Get user info (OAuth2).Kind: instance method of QuickBooks
$3
Batch 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 25.Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| items | object | JavaScript array of batch items |
$3
The change data capture (CDC) operation returns a list of entities that have changed since a specified time.Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| entities | object | Comma separated list or JavaScript array of entities to search for changes |
| since | object \| number \| string | JS Date object, JS Date milliseconds, or string in ISO 8601 - to look back for changes until |
$3
Uploads a file as an Attachable in QBO, optionally linking it to the specified
QBO Entity.Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| filename | string | the name of the file |
| contentType | string | the mime type of the file |
| stream | object | ReadableStream of file contents |
| entityType | object | optional string name of the QBO entity the Attachable will be linked to (e.g. Invoice) |
| entityId | object | optional Id of the QBO entity the Attachable will be linked to |
$3
Creates the Account in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| account | object | The unsaved account, to be persisted in QuickBooks |
$3
Creates the Attachable in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| attachable | object | The unsaved attachable, to be persisted in QuickBooks |
$3
Creates the Bill in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| bill | object | The unsaved bill, to be persisted in QuickBooks |
$3
Creates the BillPayment in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| billPayment | object | The unsaved billPayment, to be persisted in QuickBooks |
$3
Creates the Class in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| class | object | The unsaved class, to be persisted in QuickBooks |
$3
Creates the CreditMemo in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| creditMemo | object | The unsaved creditMemo, to be persisted in QuickBooks |
$3
Creates the Customer in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| customer | object | The unsaved customer, to be persisted in QuickBooks |
$3
Creates the Department in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| department | object | The unsaved department, to be persisted in QuickBooks |
$3
Creates the Deposit in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| deposit | object | The unsaved Deposit, to be persisted in QuickBooks |
$3
Creates the Employee in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| employee | object | The unsaved employee, to be persisted in QuickBooks |
$3
Creates the Estimate in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| estimate | object | The unsaved estimate, to be persisted in QuickBooks |
$3
Creates the Invoice in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| invoice | object | The unsaved invoice, to be persisted in QuickBooks |
$3
Creates the Item in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| item | object | The unsaved item, to be persisted in QuickBooks |
$3
Creates the JournalCode in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| journalCode | object | The unsaved journalCode, to be persisted in QuickBooks |
$3
Creates the JournalEntry in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| journalEntry | object | The unsaved journalEntry, to be persisted in QuickBooks |
$3
Creates the Payment in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| payment | object | The unsaved payment, to be persisted in QuickBooks |
$3
Creates the PaymentMethod in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| paymentMethod | object | The unsaved paymentMethod, to be persisted in QuickBooks |
$3
Creates the Purchase in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| purchase | object | The unsaved purchase, to be persisted in QuickBooks |
$3
Creates the PurchaseOrder in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| purchaseOrder | object | The unsaved purchaseOrder, to be persisted in QuickBooks |
$3
Creates the RefundReceipt in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| refundReceipt | object | The unsaved refundReceipt, to be persisted in QuickBooks |
$3
Creates the SalesReceipt in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| salesReceipt | object | The unsaved salesReceipt, to be persisted in QuickBooks |
$3
Creates the TaxAgency in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| taxAgency | object | The unsaved taxAgency, to be persisted in QuickBooks |
$3
Creates the TaxService in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| taxService | object | The unsaved taxService, to be persisted in QuickBooks |
$3
Creates the Term in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| term | object | The unsaved term, to be persisted in QuickBooks |
$3
Creates the TimeActivity in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| timeActivity | object | The unsaved timeActivity, to be persisted in QuickBooks |
$3
Creates the Transfer in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| transfer | object | The unsaved Transfer, to be persisted in QuickBooks |
$3
Creates the Vendor in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| vendor | object | The unsaved vendor, to be persisted in QuickBooks |
$3
Creates the VendorCredit in QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| vendorCredit | object | The unsaved vendorCredit, to be persisted in QuickBooks |
$3
Retrieves the Account from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Account |
$3
Retrieves the Attachable from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Attachable |
$3
Retrieves the Bill from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Bill |
$3
Retrieves the BillPayment from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent BillPayment |
$3
Retrieves the Class from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Class |
$3
Retrieves the CompanyInfo from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent CompanyInfo |
$3
Retrieves the CreditMemo from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent CreditMemo |
$3
Retrieves the Customer from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Customer |
$3
Retrieves the Department from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Department |
$3
Retrieves the Deposit from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Deposit |
$3
Retrieves the Employee from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Employee |
$3
Retrieves the Estimate from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Estimate |
$3
Retrieves an ExchangeRate from QuickBooksKind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| options | object | An object with options including the required
sourcecurrencycode parameter and optional asofdate` parameter. |Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Estimate |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Estimate |
| sendTo | string | optional email address to send the PDF to. If not provided, address supplied in Estimate.BillEmail.EmailAddress will be used |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Invoice |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Invoice |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Invoice |
| sendTo | string | optional email address to send the PDF to. If not provided, address supplied in Invoice.BillEmail.EmailAddress will be used |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Item |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent JournalCode |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent JournalEntry |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Payment |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent PaymentMethod |
Kind: instance method of QuickBooks
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Purchase |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent PurchaseOrder |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent RefundReceipt |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Reports |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent SalesReceipt |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent SalesReceipt |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent SalesReceipt |
| sendTo | string | optional email address to send the PDF to. If not provided, address supplied in SalesReceipt.BillEmail.EmailAddress will be used |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent TaxAgency |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent TaxCode |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent TaxRate |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Term |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent TimeActivity |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Term |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent Vendor |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Id | string | The Id of persistent VendorCredit |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| account | object | The persistent Account, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| attachable | object | The persistent Attachable, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| bill | object | The persistent Bill, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| billPayment | object | The persistent BillPayment, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| class | object | The persistent Class, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| companyInfo | object | The persistent CompanyInfo, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| creditMemo | object | The persistent CreditMemo, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| customer | object | The persistent Customer, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| department | object | The persistent Department, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| deposit | object | The persistent Deposit, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| employee | object | The persistent Employee, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| estimate | object | The persistent Estimate, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| invoice | object | The persistent Invoice, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| item | object | The persistent Item, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| journalCode | object | The persistent JournalCode, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| journalEntry | object | The persistent JournalEntry, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| payment | object | The persistent Payment, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| paymentMethod | object | The persistent PaymentMethod, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| preferences | object | The persistent Preferences, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| purchase | object | The persistent Purchase, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| purchaseOrder | object | The persistent PurchaseOrder, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| refundReceipt | object | The persistent RefundReceipt, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| salesReceipt | object | The persistent SalesReceipt, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| taxAgency | object | The persistent TaxAgency, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| taxCode | object | The persistent TaxCode, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| taxRate | object | The persistent TaxRate, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| term | object | The persistent Term, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| timeActivity | object | The persistent TimeActivity, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| Transfer | object | The persistent Transfer, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| vendor | object | The persistent Vendor, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| vendorCredit | object | The persistent VendorCredit, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| exchangeRate | object | The persistent ExchangeRate, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Attachable |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Bill |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 BillPayment |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 CreditMemo |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Deposit |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Estimate |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Invoice |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 JournalCode |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 JournalEntry |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Payment |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Purchase |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 PurchaseOrder |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 RefundReceipt |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 SalesReceipt |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 TimeActivity |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 Transfer |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | 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 VendorCredit |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| idOrEntity | object | The persistent Invoice to be voided, or the Id of the Invoice, in which case an extra GET request will be issued to first retrieve the Invoice |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| payment | object | The persistent Payment, including Id and SyncToken fields |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| criteria | object | (Optional) String or single-valued map converted to a where clause of the form "where key = 'value'" |
Kind: instance method of QuickBooks
| Param | Type | Description |
| --- | --- | --- |
| criteria | object | (Optional) String or single-val