QuickBooks Desktop API Examples
Accounts
In QuickBooks Desktop, an account is a record that tracks the money coming in and going out of your business. Accounts are organized into a chart of accounts which includes assets, liabilities, income, and expenses. Each account has specific properties and characteristics.
To see all of the request parameters and response fields for , check out our client library’s amazing autocomplete.
Fetching accounts
Fetching accounts in QuickBooks Desktop is straightforward. You can use optional request parameters to filter the results as needed.
Fetching all accounts
const accounts = await conductor.qbd.account.query("{{END_USER_ID}}");
Fetching all accounts with a filter
const accounts = await conductor.qbd.account.query("{{END_USER_ID}}", {
NameFilter: {
MatchCriterion: "StartsWith",
Name: "Test Account",
},
});
Creating accounts
Creating accounts is also straightforward. There are several optional request parameters available, but the only required ones are Name
and AccountType
.
Creating an account
const account = await conductor.qbd.account.add("{{END_USER_ID}}", {
// Create a unique name for testing because QBD requires unique names.
Name: "Test Account " + Date.now(),
AccountType: "Expense",
});