<!-- Generated by scripts/generate-llms.mjs from docs/connectors/quickbooks.md. Do not edit. -->

Source: https://qbash.com/docs/connectors/quickbooks

# Connect QuickBooks

Tasks call QuickBooks Online through `qbash.integrations.quickbooks`. You sign in with Intuit on the Connectors page, and each credential covers the one company you pick during sign-in. The connector runs reports and queries, and reads any record by ID. It creates and updates customers, invoices, payments, bills, journal entries and the other QuickBooks records. It also voids transactions and attaches files. It emails invoices, estimates, sales receipts, credit memos and payment receipts, one per call.

The connector uses the QuickBooks Online Accounting API, so QuickBooks Desktop companies can't connect.

After you connect QuickBooks, you can add its tools to a [qbash MCP server](https://qbash.com/docs-markdown/mcp-servers/overview.md#package) for ChatGPT, Claude and other MCP clients, or call it from a Python task.

## What you need

- A QuickBooks Online sign-in for the company you want to connect.
- To know whether it is a production company or a sandbox company. Sandbox companies hold test data, so they suit a first try of a task that writes.

## Connect in qbash

1. Open **Connectors**, then **QuickBooks**, and click **Connect**.
2. Fill in **Credential Name**, such as "qbash books", then pick the **Company type**.
3. Click **Connect to QuickBooks**. Intuit asks you to sign in and choose the company. qbash saves the company you choose.
4. In the task editor, choose **Add connector** from the Package **+** menu and select the credential. See [Task resources](https://qbash.com/docs-markdown/tasks/task-editor.md#resources).

To work with another company, add another credential. When you reconnect a credential, qbash refuses a sign-in that picks a different company.

## Methods

| Resource | Methods | Read or write |
| --- | --- | --- |
| Company | `get_company_info`, `get_preferences` | Read |
| Any entity | `query`, `get_record`, `list_changes` | Read |
| Customers, vendors, items, accounts | `list_customers`, `list_vendors`, `list_items`, `list_accounts` | Read |
| Customers | `get_customer` | Read |
| Customers | `create_customer`, `update_customer` | Write |
| Invoices | `get_invoice` | Read |
| Invoices | `create_invoice`, `update_invoice`, `send_invoice`, `void_invoice` | Write |
| Payments, bills, journal entries | `create_payment`, `create_bill`, `create_journal_entry` | Write |
| Other entities | `create_record`, `update_record`, `send_transaction`, `void_transaction` | Write |
| Reports | `get_profit_and_loss`, `get_balance_sheet`, `get_cash_flow`, `get_aged_receivables`, `get_aged_payables`, `run_report` | Read |
| Files | `get_pdf`, `download_attachment` | Read |
| Files | `upload_attachment` | Write |

See the [SDK Reference](https://qbash.com/docs-markdown/tasks/sdk-reference.md) for parameters and return shapes.

## Task example

```python
qb = qbash.integrations.quickbooks
customer = qb.list_customers(search="qbash")["customers"][0]
service = qb.list_items(search="Consulting")["items"][0]
invoice = qb.create_invoice(
    customer_id=customer["Id"],
    lines=[{"item_id": service["Id"], "quantity": 4, "unit_price": 150, "description": "November support"}],
    due_date="2026-12-15",
)["invoice"]
pdf = qb.get_pdf(entity="Invoice", record_id=invoice["Id"])
qbash.output({"invoice": invoice["DocNumber"], "total": invoice["TotalAmt"], "pdf": pdf["file"]})
```

The invoice stays unsent until the task calls `send_invoice`.

## Try it on a sandbox company

Intuit creates a sandbox company with sample data when you sign up at developer.intuit.com. Clearing a sandbox from the developer dashboard deletes its sample data, and Intuit can't put it back. Connect it with **Company type** set to **Sandbox company**. Intuit caps a sandbox company at 40 emails a day. Past that, `send_invoice` and `send_transaction` stop working for the rest of the day.

## Details that change results

- QuickBooks has no undo for a delete, so the connector has no delete methods. `void_invoice` and `void_transaction` keep a transaction on record with its amounts at zero. Setting `{"Active": False}` with `update_customer` or `update_record` makes a customer, vendor, item or account inactive, which is how QuickBooks removes one.
- Updates need the record's current `SyncToken`. Pass the one from your last read as `sync_token` and QuickBooks refuses the change when someone edited the record in between. Without it the connector reads the current one first.
- `update_customer` and `update_invoice` change only the fields you pass. `update_record` keeps the fields you leave out and replaces each field you pass whole, so passing `Line` replaces every line.
- `query` accepts `SELECT` statements only, one entity at a time, with no `OR` or joins. Leave `STARTPOSITION` and `MAXRESULTS` out of the statement and use `start_position` and `max_results`. Pass `next_start_position` back as `start_position` until it is `None`. A page holds up to 1000 rows.
- `list_changes` reaches back 30 days at most and returns up to 1000 records per call.
- `create_journal_entry` checks that debits equal credits before it sends anything.
- `get_pdf` and `download_attachment` return a qbash file that other connectors, such as Gmail or Slack, can send as an attachment.
- Access tokens last one hour. When a call gets a 401, qbash refreshes the token once and retries. If the refresh fails, the credential shows as needing re-authentication and you reconnect.
- Intuit allows 500 requests a minute and 10 a second for each company. A 429 means wait a minute and run the call again.
