# QuickBooks on boxd

> Quickbooks is a cloud-based accounting software that helps you manage your finances, track your income and expenses, and get insights into your business.

- Page: https://boxd.sh/integrations/quickbooks/
- CLI: `run quickbooks` (114 commands, 34 marked common)
- SDK: `import { quickbooks } from "@boxd/run"`; every parameter and response type is at `@boxd/run/quickbooks`
- Triggers: none
- Connect: `run auth quickbooks` (Sign in with QuickBooks), or https://app.boxd.sh/integrations/detail/quickbooks
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth quickbooks      # once: prints a link to connect your account
run quickbooks           # list its commands
run quickbooks query-invoices
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, quickbooks } from "@boxd/run";

every("1 hour", async () => {
  const result = await quickbooks.queryInvoices({});
  console.log(result);
});
```

Run it with `run quickbooks.run.ts`. QuickBooks has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run quickbooks <command> --help` lists the optional ones. "common" marks what `run quickbooks` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `capture-charge` | `quickbooks.captureCharge()` | `--charge-id` | 2 | Capture funds for an existing charge that was authorized but not captured |
| `create-account` | `quickbooks.createAccount()` | `--account-type` `--name` | 9 | Create a new account in QuickBooks with the given parameters |
| `create-bank-account` | `quickbooks.createBankAccount()` | `--account-number` `--account-type` `--customer-id` `--name` `--routing-number` | 1 | Create a new bank account on file for a customer in QuickBooks Payments API |
| `create-bill` ·common | `quickbooks.createBill()` | `--Line` `--VendorRef` | 11 | Create a new bill in QuickBooks Online |
| `create-bill-payment` ·common | `quickbooks.createBillPayment()` | `--Line` `--PayType` `--TotalAmt` `--VendorRef` | 6 | Create a bill payment in QuickBooks to record payment against one or more bills |
| `create-class` | `quickbooks.createClass()` | `--name` | 3 | Create a new class in QuickBooks Online |
| `create-credit-memo` | `quickbooks.createCreditMemo()` | `--customer-ref` `--line` | 20 | Create a new credit memo in QuickBooks Online |
| `create-customer` | `quickbooks.createCustomer()` | — | 27 | Create a new customer in QuickBooks with the given parameters |
| `create-deposit` ·common | `quickbooks.createDeposit()` | `--deposit-to-account-ref` `--line` | 6 | Creates a new deposit in QuickBooks Online |
| `create-echeck-payment` | `quickbooks.createEcheckPayment()` | `--amount` `--bankAccount` `--currency` | 1 | Create an eCheck payment using ACH bank transfer in QuickBooks Payments API |
| `create-employee` | `quickbooks.createEmployee()` | `--family-name` `--given-name` | 30 | Create a new employee in QuickBooks |
| `create-estimate` ·common | `quickbooks.createEstimate()` | `--customer-id` `--lines` | 20 | Creates a new estimate in QuickBooks Online |
| `create-invoice` | `quickbooks.createInvoice()` | `--customer-id` `--lines` | 34 | Creates a new invoice in QuickBooks for a customer |
| `create-item` ·common | `quickbooks.createItem()` | `--name` `--type` | 14 | Create a new item in QuickBooks Online |
| `create-journal-entry` ·common | `quickbooks.createJournalEntry()` | `--Line` | 7 | Create a new journal entry in QuickBooks Online |
| `create-payment` ·common | `quickbooks.createPayment()` | `--customer-id` `--lines` `--total-amt` | 12 | Creates a payment record in QuickBooks Online |
| `create-purchase` | `quickbooks.createPurchase()` | `--AccountRef` `--Line` `--PaymentType` | 12 | Create a new purchase transaction in QuickBooks Online |
| `create-purchase-order` ·common | `quickbooks.createPurchaseOrder()` | `--ap-account-id` `--lines` `--total-amt` `--vendor-id` | 21 | Create a new purchase order in QuickBooks |
| `create-refund-receipt` | `quickbooks.createRefundReceipt()` | `--CustomerRef` `--DepositToAccountRef` `--Line` | 8 | Create a new refund receipt in QuickBooks Online |
| `create-sales-receipt` ·common | `quickbooks.createSalesReceipt()` | `--customer-ref` `--line` | 24 | Create a new sales receipt in QuickBooks Online |
| `create-tax-agency` | `quickbooks.createTaxAgency()` | `--DisplayName` | 0 | Create a new tax agency in QuickBooks Online |
| `create-taxservice-taxcode` | `quickbooks.createTaxserviceTaxcode()` | `--TaxCode` `--TaxRateDetails` | 0 | Create a new tax code with associated tax rates using the TaxService endpoint |
| `create-time-activity` | `quickbooks.createTimeActivity()` | `--name-of` | 18 | Create a new time activity record in QuickBooks Online |
| `create-vendor` | `quickbooks.createVendor()` | — | 44 | Create a new vendor in QuickBooks with the given details |
| `create-vendor-credit` | `quickbooks.createVendorCredit()` | `--Line` `--VendorRef` | 10 | Create a new vendor credit in QuickBooks Online |
| `customer-balance-detail` | `quickbooks.customerBalanceDetail()` | — | 13 | Generate a balance detail report for a customer in QuickBooks with the given customer ID |
| `customer-balance-report` | `quickbooks.customerBalanceReport()` | — | 9 | Generate a customer balance report in QuickBooks showing outstanding balances for customers |
| `delete-bank-account` | `quickbooks.deleteBankAccount()` | `--bank-account-id` `--customer-id` | 1 | Delete a bank account on file for a customer in QuickBooks Payments API |
| `delete-item` | `quickbooks.deleteItem()` | `--item-id` `--sync-token` | 1 | Delete an item in QuickBooks Online by marking it as inactive (soft delete) |
| `execute-batch-operation` | `quickbooks.executeBatchOperation()` | `--BatchItemRequest` | 1 | Execute multiple QuickBooks operations in a single request |
| `get-aged-receivables-report` ·common | `quickbooks.getAgedReceivablesReport()` | — | 8 | Generate an aged receivables report showing outstanding customer balances by age |
| `get-attachable` | `quickbooks.getAttachable()` | `--attachable-id` | 1 | Read details of a specific attachable by ID in QuickBooks Online |
| `get-balance-sheet-report` ·common | `quickbooks.getBalanceSheetReport()` | — | 6 | Generate a Balance Sheet report showing company assets, liabilities, and equity at a point in time |
| `get-bank-account` | `quickbooks.getBankAccount()` | `--bank-account-id` `--customer-id` | 0 | Retrieve a specific bank account by ID from QuickBooks Payments API |
| `get-bill` | `quickbooks.getBill()` | `--bill-id` | 1 | Fetch a QuickBooks bill by ID |
| `get-bill-payment` | `quickbooks.getBillPayment()` | `--bill-payment-id` | 1 | Retrieve details of a specific bill payment by ID in QuickBooks Online |
| `get-changed-entities` ·common | `quickbooks.getChangedEntities()` | `--changedSince` `--entities` | 0 | Retrieve entities that changed since a specified timestamp using QuickBooks Change Data Capture (CDC) API |
| `get-company-info` ·common | `quickbooks.getCompanyInfo()` | — | 1 | Read company information from QuickBooks Online |
| `get-credit-memo` | `quickbooks.getCreditMemo()` | `--credit-memo-id` | 1 | Fetch a QuickBooks credit memo by ID |
| `get-credit-memo-pdf` | `quickbooks.getCreditMemoPdf()` | `--credit-memo-id` | 1 | Download a QuickBooks credit memo as a PDF file |
| `get-department` | `quickbooks.getDepartment()` | `--department-id` | 0 | Read details of a specific department by ID in QuickBooks Online |
| `get-deposit` | `quickbooks.getDeposit()` | `--deposit-id` | 1 | Read details of a specific deposit by ID in QuickBooks Online |
| `get-estimate` | `quickbooks.getEstimate()` | `--estimate-id` | 1 | Fetch a QuickBooks estimate by ID |
| `get-estimate-pdf` | `quickbooks.getEstimatePdf()` | `--estimate-id` | 1 | Download a QuickBooks estimate as a PDF file |
| `get-exchange-rate` | `quickbooks.getExchangeRate()` | `--asofdate` `--sourcecurrencycode` | 1 | Get exchange rate for a specific currency code and date in QuickBooks Online |
| `get-general-ledger-report` ·common | `quickbooks.getGeneralLedgerReport()` | — | 15 | Generate a General Ledger report showing all transactions with debits, credits, and running balances |
| `get-inventory-valuation-summary` | `quickbooks.getInventoryValuationSummary()` | — | 6 | Generate an Inventory Valuation Summary report showing inventory quantities and their current values |
| `get-invoice-pdf` | `quickbooks.getInvoicePdf()` | `--invoice-id` | 1 | Download a QuickBooks invoice as a PDF file |
| `get-item` | `quickbooks.getItem()` | `--item-id` | 1 | Retrieve a specific item by its ID from QuickBooks Online |
| `get-journal-entry` | `quickbooks.getJournalEntry()` | `--journal-entry-id` | 1 | Read details of a specific QuickBooks journal entry by ID |
| `get-payment` | `quickbooks.getPayment()` | `--payment-id` | 1 | Fetch details of a specific payment by ID in QuickBooks Online |
| `get-payment-method` | `quickbooks.getPaymentMethod()` | `--payment-method-id` | 0 | Read details of a specific payment method by ID in QuickBooks Online |
| `get-payment-pdf` | `quickbooks.getPaymentPdf()` | `--payment-id` | 1 | Download a QuickBooks payment record as a PDF file |
| `get-preferences` | `quickbooks.getPreferences()` | — | 1 | Read company preferences that control application behavior in QuickBooks Online |
| `get-profit-and-loss-detail-report` ·common | `quickbooks.getProfitAndLossDetailReport()` | — | 11 | Generate a detailed Profit and Loss report showing company income and expenses with transaction-level details |
| `get-profit-and-loss-report` ·common | `quickbooks.getProfitAndLossReport()` | — | 11 | Generate a Profit and Loss report showing company income and expenses over a period |
| `get-purchase` | `quickbooks.getPurchase()` | `--purchase-id` | 1 | Fetch details of a specific purchase by ID in QuickBooks Online |
| `get-purchase-order` | `quickbooks.getPurchaseOrder()` | `--purchase-order-id` | 1 | Fetch a QuickBooks purchase order by ID |
| `get-purchase-order-pdf` | `quickbooks.getPurchaseOrderPdf()` | `--purchase-order-id` | 1 | Download a QuickBooks purchase order as a PDF file |
| `get-refund-receipt` | `quickbooks.getRefundReceipt()` | `--refund-receipt-id` | 1 | Fetch a QuickBooks refund receipt by ID |
| `get-refund-receipt-pdf` | `quickbooks.getRefundReceiptPdf()` | `--refund-receipt-id` | 1 | Download a QuickBooks refund receipt as a PDF file |
| `get-report-account-list` ·common | `quickbooks.getReportAccountList()` | — | 2 | Retrieve the AccountList report from QuickBooks showing a list of all accounts |
| `get-report-aged-payable-detail` | `quickbooks.getReportAgedPayableDetail()` | — | 16 | Generate an aged payable detail report showing aging detail for accounts payable |
| `get-report-aged-payables` ·common | `quickbooks.getReportAgedPayables()` | — | 8 | Retrieve an Aged Payables aging summary report from QuickBooks showing outstanding vendor balances grouped by age |
| `get-report-aged-receivable-detail` | `quickbooks.getReportAgedReceivableDetail()` | — | 18 | Generate an aged receivable detail report showing aging detail for accounts receivable |
| `get-report-cash-flow` ·common | `quickbooks.getReportCashFlow()` | — | 6 | Generate a cash flow report in QuickBooks showing cash inflows and outflows categorized by operating, investing, and financing activities |
| `get-report-class-sales` | `quickbooks.getReportClassSales()` | — | 7 | Generate a ClassSales report in QuickBooks showing sales amounts grouped by class |
| `get-report-customer-income` ·common | `quickbooks.getReportCustomerIncome()` | — | 9 | Generate a customer income report in QuickBooks showing revenue by customer |
| `get-report-customer-sales` ·common | `quickbooks.getReportCustomerSales()` | — | 9 | Generate a customer sales report in QuickBooks showing sales transactions and totals for customers |
| `get-report-department-sales` | `quickbooks.getReportDepartmentSales()` | — | 7 | Generate a department sales report in QuickBooks showing sales data broken down by department |
| `get-report-item-sales` | `quickbooks.getReportItemSales()` | — | 7 | Generate an ItemSales report showing sales data for products and services |
| `get-report-trial-balance` ·common | `quickbooks.getReportTrialBalance()` | — | 8 | Generate a Trial Balance report showing account debits, credits, and balances for a specified period |
| `get-reports` ·common | `quickbooks.getReports()` | `--report-name` | 14 | Retrieve QuickBooks reports such as TransactionList, BalanceSheet, ProfitAndLoss, and others |
| `get-sales-receipt` | `quickbooks.getSalesReceipt()` | `--sales-receipt-id` | 1 | Fetch a QuickBooks sales receipt by ID |
| `get-salesreceipt-pdf` | `quickbooks.getSalesreceiptPdf()` | `--sales-receipt-id` | 1 | Download a QuickBooks sales receipt as a PDF file |
| `get-tax-rate` | `quickbooks.getTaxRate()` | `--tax-rate-id` | 1 | Read details of a specific tax rate by ID in QuickBooks Online |
| `get-term` | `quickbooks.getTerm()` | `--term-id` | 0 | Read details of a specific payment term by ID in QuickBooks Online |
| `get-time-activity` | `quickbooks.getTimeActivity()` | `--time-activity-id` | 1 | Read details of a specific time activity by ID in QuickBooks Online |
| `get-transaction-list-report` ·common | `quickbooks.getTransactionListReport()` | — | 14 | Get the Transaction List report showing all transactions in the company |
| `get-transfer` | `quickbooks.getTransfer()` | `--transfer-id` | 1 | Fetch a QuickBooks transfer by ID |
| `get-vendor-credit` | `quickbooks.getVendorCredit()` | `--vendor-credit-id` | 1 | Fetch a QuickBooks vendor credit by ID |
| `get-vendor-expenses-report` | `quickbooks.getVendorExpensesReport()` | — | 9 | Retrieve a vendor expenses report from QuickBooks showing expense transactions by vendor |
| `list-cards` | `quickbooks.listCards()` | `--customer-id` | 0 | Retrieve all payment cards on file for a customer in QuickBooks Payments API |
| `list-departments` ·common | `quickbooks.listDepartments()` | — | 1 | Query Department entities in QuickBooks using SQL-like syntax |
| `list-invoices` | `quickbooks.listInvoices()` | — | 3 | List invoices via QuickBooks Query endpoint |
| `query-account` | `quickbooks.queryAccount()` | `--query` | 0 | Query Account entities in QuickBooks using SQL-like syntax |
| `query-accounts` ·common | `quickbooks.queryAccounts()` | `--query` | 0 | Query Account entities in QuickBooks using SQL-like syntax |
| `query-attachable` | `quickbooks.queryAttachable()` | — | 1 | Query Attachable entities in QuickBooks using SQL-like syntax |
| `query-bills` ·common | `quickbooks.queryBills()` | `--query` | 0 | Query Bill entities in QuickBooks using SQL-like syntax |
| `query-customers` ·common | `quickbooks.queryCustomers()` | `--query` | 0 | Query Customer entities in QuickBooks using SQL-like syntax |
| `query-entities` ·common | `quickbooks.queryEntities()` | `--query` | 0 | Execute SQL-like queries on QuickBooks Online entities |
| `query-estimates` ·common | `quickbooks.queryEstimates()` | `--query` | 0 | Query Estimate entities in QuickBooks using SQL-like syntax |
| `query-invoices` ·common | `quickbooks.queryInvoices()` | — | 7 | Query QuickBooks invoices with flexible filtering and pagination support |
| `query-items` ·common | `quickbooks.queryItems()` | `--query` | 0 | Query Item entities in QuickBooks using SQL-like syntax |
| `query-payments` ·common | `quickbooks.queryPayments()` | `--query` | 0 | Query Payment entities in QuickBooks using SQL-like syntax |
| `query-vendors` ·common | `quickbooks.queryVendors()` | `--query` | 0 | Query Vendor entities in QuickBooks using SQL-like syntax |
| `read-account` | `quickbooks.readAccount()` | `--account-id` | 0 | Read an account in QuickBooks with the given account ID |
| `read-class` | `quickbooks.readClass()` | `--class-id` | 1 | Read details of a specific class by ID in QuickBooks Online |
| `read-customer` | `quickbooks.readCustomer()` | `--customer-id` | 0 | Read a customer in QuickBooks with the given customer ID |
| `read-employee` | `quickbooks.readEmployee()` | `--employee-id` | 0 | Read an employee's details in QuickBooks with the given employee ID |
| `read-invoice` | `quickbooks.readInvoice()` | — | 2 | Fetch a QuickBooks invoice by ID or the most recent if no ID provided |
| `read-vendor` | `quickbooks.readVendor()` | `--vendor-id` | 0 | Read a vendor in QuickBooks with the given vendor ID |
| `send-credit-memo` | `quickbooks.sendCreditMemo()` | `--credit-memo-id` | 2 | Send a credit memo to a specified email address |
| `update-attachable` | `quickbooks.updateAttachable()` | `--Id` `--SyncToken` | 7 | Update an existing attachable in QuickBooks Online |
| `update-company-info` | `quickbooks.updateCompanyInfo()` | `--CompanyAddr` `--Id` `--SyncToken` | 13 | Update company information in QuickBooks Online |
| `update-department` | `quickbooks.updateDepartment()` | `--Id` `--Name` `--SyncToken` | 4 | Update an existing department in QuickBooks Online |
| `update-full-invoice` | `quickbooks.updateFullInvoice()` | `--invoice` | 2 | Fully replace an Invoice |
| `update-payment-method` | `quickbooks.updatePaymentMethod()` | `--Id` `--Name` `--SyncToken` | 2 | Update an existing payment method in QuickBooks Online |
| `update-preferences` | `quickbooks.updatePreferences()` | `--Id` `--SyncToken` | 12 | Update company preferences in QuickBooks Online |
| `update-sparse-invoice` | `quickbooks.updateSparseInvoice()` | `--invoice` | 0 | Perform a sparse update of an existing invoice |
| `update-term` | `quickbooks.updateTerm()` | `--Id` `--Name` `--SyncToken` `--Type` | 7 | Update an existing payment term in QuickBooks Online |
| `update-transfer` | `quickbooks.updateTransfer()` | `--Amount` `--FromAccountRef` `--Id` `--SyncToken` `--ToAccountRef` | 5 | Update an existing transfer in QuickBooks Online |
| `vendor-balance-detail` | `quickbooks.vendorBalanceDetail()` | — | 16 | Generate a balance detail report for a vendor in QuickBooks with the given vendor ID |
| `vendor-balance-report` | `quickbooks.vendorBalanceReport()` | — | 9 | Retrieve a vendor balance report from QuickBooks showing outstanding balances for vendors |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
