QuickBooks Tool
Connection Setup GuideThe QuickBooks tool provides a powerful interface for managing your accounting data. Your AI agent can interact with customers, invoices, and items, enabling sophisticated financial automation workflows.
Key Use Cases:
- Customer Management: Create new customers or look up existing ones by name or ID.
- Invoice Creation: Automatically generate new invoices for customers based on a list of products and services.
- Financial Queries: Ask your agent to find specific invoices (e.g., "Find all unpaid invoices for 'Innovate Corp'") or look up item prices.
quickbooks_tool.filter_customers
Filters for customers in QuickBooks using the content of a 'WHERE' clause.
Parameters
Name | Type | Description |
---|---|---|
filter_clause |
string |
The filter part of a QBO query. Example: "DisplayName LIKE 'A%'" or for all customers, provide something that is always true like "Active = true". |
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.filter_customers",
"arguments": {
"filter_clause": {
"type": "string",
"description": "The filter part of a QBO query. Example: \"DisplayName LIKE 'A%'\" or for all customers, provide something that is always true like \"Active = true\"."
}
}
}
}'
import requests
import json
API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"
payload = {
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.filter_customers",
"arguments": {
"filter_clause": {
"type": "string",
"description": "The filter part of a QBO query. Example: \"DisplayName LIKE 'A%'\" or for all customers, provide something that is always true like \"Active = true\"."
}
}
}
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
result = response.json()
print(json.dumps(result, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
quickbooks_tool.get_customer_by_id
Retrieves a single customer by their unique QuickBooks ID.
Parameters
Name | Type | Description |
---|---|---|
customer_id |
integer |
The numeric ID of the customer in QuickBooks. |
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.get_customer_by_id",
"arguments": {
"customer_id": {
"type": "integer",
"description": "The numeric ID of the customer in QuickBooks."
}
}
}
}'
import requests
import json
API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"
payload = {
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.get_customer_by_id",
"arguments": {
"customer_id": {
"type": "integer",
"description": "The numeric ID of the customer in QuickBooks."
}
}
}
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
result = response.json()
print(json.dumps(result, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
quickbooks_tool.create_customer
Creates a new customer in QuickBooks.
Parameters
Name | Type | Description |
---|---|---|
display_name |
string |
The primary name for the customer, must be unique. |
company_name |
string |
Optional. The legal name of the customer's company. |
email |
string |
Optional. The primary email address for the customer. |
phone |
string |
Optional. The primary phone number for the customer. |
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.create_customer",
"arguments": {
"display_name": {
"type": "string",
"description": "The primary name for the customer, must be unique."
},
"company_name": {
"type": "string",
"description": "Optional. The legal name of the customer's company."
},
"email": {
"type": "string",
"description": "Optional. The primary email address for the customer."
},
"phone": {
"type": "string",
"description": "Optional. The primary phone number for the customer."
}
}
}
}'
import requests
import json
API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"
payload = {
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.create_customer",
"arguments": {
"display_name": {
"type": "string",
"description": "The primary name for the customer, must be unique."
},
"company_name": {
"type": "string",
"description": "Optional. The legal name of the customer's company."
},
"email": {
"type": "string",
"description": "Optional. The primary email address for the customer."
},
"phone": {
"type": "string",
"description": "Optional. The primary phone number for the customer."
}
}
}
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
result = response.json()
print(json.dumps(result, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
quickbooks_tool.find_invoices
Searches for invoices in QuickBooks using a SQL-like WHERE clause.
Parameters
Name | Type | Description |
---|---|---|
filter_clause |
string |
The filter part of a QBO query. Example: "DocNumber = '1001'" or "TotalAmt > '500.00'". |
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.find_invoices",
"arguments": {
"filter_clause": {
"type": "string",
"description": "The filter part of a QBO query. Example: \"DocNumber = '1001'\" or \"TotalAmt > '500.00'\"."
}
}
}
}'
import requests
import json
API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"
payload = {
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.find_invoices",
"arguments": {
"filter_clause": {
"type": "string",
"description": "The filter part of a QBO query. Example: \"DocNumber = '1001'\" or \"TotalAmt > '500.00'\"."
}
}
}
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
result = response.json()
print(json.dumps(result, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
quickbooks_tool.find_items
Searches for products and services (items) in QuickBooks.
Parameters
Name | Type | Description |
---|---|---|
filter_clause |
string |
The filter part of a QBO query. Example: "Name LIKE 'Consulting%'" or "Active = true" for all active items. |
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.find_items",
"arguments": {
"filter_clause": {
"type": "string",
"description": "The filter part of a QBO query. Example: \"Name LIKE 'Consulting%'\" or \"Active = true\" for all active items."
}
}
}
}'
import requests
import json
API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"
payload = {
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.find_items",
"arguments": {
"filter_clause": {
"type": "string",
"description": "The filter part of a QBO query. Example: \"Name LIKE 'Consulting%'\" or \"Active = true\" for all active items."
}
}
}
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
result = response.json()
print(json.dumps(result, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
quickbooks_tool.create_invoice
Creates a new invoice for a customer.
Parameters
Name | Type | Description |
---|---|---|
customer_id |
integer |
The ID of the customer to invoice. |
line_items |
array |
A list of items to include on the invoice. |
curl -X POST https://toolstream.dev/v1/tools/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.create_invoice",
"arguments": {
"customer_id": {
"type": "integer",
"description": "The ID of the customer to invoice."
},
"line_items": {
"type": "array",
"description": "A list of items to include on the invoice.",
"items": {
"type": "object",
"properties": {
"item_id": {
"type": "integer",
"description": "The ID of the product or service item."
},
"quantity": {
"type": "number",
"description": "The quantity of the item."
},
"unit_price": {
"type": "number",
"description": "The price per unit of the item."
},
"description": {
"type": "string",
"description": "Optional. A custom description for this line item."
}
},
"required": [
"item_id",
"quantity",
"unit_price"
]
}
}
}
}
}'
import requests
import json
API_KEY = "YOUR_API_KEY"
TOOLSTREAM_URL = "https://toolstream.dev/v1/tools/execute"
payload = {
"connection_name": "YOUR_CONNECTION_NAME",
"tool_call": {
"name": "quickbooks_tool.create_invoice",
"arguments": {
"customer_id": {
"type": "integer",
"description": "The ID of the customer to invoice."
},
"line_items": {
"type": "array",
"description": "A list of items to include on the invoice.",
"items": {
"type": "object",
"properties": {
"item_id": {
"type": "integer",
"description": "The ID of the product or service item."
},
"quantity": {
"type": "number",
"description": "The quantity of the item."
},
"unit_price": {
"type": "number",
"description": "The price per unit of the item."
},
"description": {
"type": "string",
"description": "Optional. A custom description for this line item."
}
},
"required": [
"item_id",
"quantity",
"unit_price"
]
}
}
}
}
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
response = requests.post(TOOLSTREAM_URL, headers=headers, data=json.dumps(payload))
if response.status_code == 200:
result = response.json()
print(json.dumps(result, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)