create_expense
Create an expense in QuickBooks by specifying payment type, account, payee, and line items. Automatically looks up account, vendor, and department names to assign IDs.
Instructions
Create an expense (Purchase). Accepts account/department/vendor names (will lookup IDs automatically). Covers Cash, Check, and Credit Card payment types. Note: PaymentType cannot be changed after creation. DepartmentRef is header-level only. Returns expense details and a link to view in QuickBooks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payment_type | Yes | Payment method: 'Cash', 'Check', or 'CreditCard'. Cannot be changed after creation. | |
| payment_account | Yes | Bank or credit card account name or number (e.g., 'PLAT BUS CHECKING', '5752'). Will be looked up to get ID. | |
| txn_date | Yes | Transaction date in YYYY-MM-DD format | |
| entity_name | No | Payee/vendor display name (e.g., 'Simplisafe', 'PG&E'). Will be looked up to get ID. | |
| entity_id | No | Payee/vendor ID (use if you already know it, otherwise use entity_name) | |
| department_name | No | Header-level department/location name (e.g., '20358', 'Cotati'). Will be looked up to get ID. | |
| department_id | No | Header-level department/location ID (use if you already know it, otherwise use department_name) | |
| memo | No | Private memo for the expense | |
| doc_number | No | Reference number for the expense (optional) | |
| lines | Yes | Array of expense line items. Provide account_name OR account_id (name preferred). | |
| draft | No | If true, validate and show preview without creating (default: true) |