create_vendor_credit
Create a vendor credit by specifying lines of credit amounts applied to expense accounts. Automatically resolves vendor, account, and department names.
Instructions
Create a vendor credit. Accepts vendor/account/department names (will lookup IDs automatically). Lines represent credit amounts applied to expense accounts. Returns credit details and a link to view in QuickBooks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"txn_date": "<txn_date>",
"lines": "<lines>"
},
"name": "create_vendor_credit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vendor_name | No | Vendor display name (e.g., 'Acme Corp'). Will be looked up to get ID. | |
| vendor_id | No | Vendor ID (use if you already know it, otherwise use vendor_name) | |
| txn_date | Yes | Transaction date in YYYY-MM-DD format | |
| 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) | |
| ap_account | No | Accounts Payable account name or number (optional, defaults to standard AP) | |
| memo | No | Private memo for the vendor credit | |
| doc_number | No | Reference number for the vendor credit (optional) | |
| lines | Yes | Array of line items. Each line credits an expense account. | |
| draft | No | If true, validate and show preview without creating (default: true) |