Skill: Search Invoices

Search, create, and update invoices in QuickBooks Online — with line items, addresses, due dates, and customer associations.

The Search Invoices skill is a multi-action skill that handles searching for existing invoices, creating new invoices, and updating existing ones in QuickBooks Online. The action parameter determines which operation is performed.

Parameters

Common parameters

ParameterTypeRequiredDescription
actionstringYesThe operation: search, create, or update.

Search parameters

Used when action is search.

ParameterTypeRequiredDescription
customer_idstringNoFilter invoices by QuickBooks customer ID.
doc_numberstringNoFilter by invoice number (exact match).
start_datestringNoFilter invoices with a transaction date on or after this date (YYYY-MM-DD).
end_datestringNoFilter invoices with a transaction date on or before this date (YYYY-MM-DD).
due_date_startstringNoFilter invoices with a due date on or after this date (YYYY-MM-DD).
due_date_endstringNoFilter invoices with a due date on or before this date (YYYY-MM-DD).
max_resultsintegerNoMaximum number of invoices to return. Defaults to 100.

Create parameters

Used when action is create.

ParameterTypeRequiredDescription
customer_idstringYesQuickBooks customer ID for the invoice.
line_itemsarrayYesArray of line item objects. Each item includes description, amount, quantity, unit_price, and optionally item_ref (product/service ID).
due_datestringNoInvoice due date (YYYY-MM-DD).
doc_numberstringNoCustom invoice number. Auto-generated if omitted.
bill_emailstringNoEmail address to send the invoice to.
bill_addrobjectNoBilling address with line1, line2, city, country_sub_division_code, postal_code, country.
ship_addrobjectNoShipping address (same structure as bill_addr).
private_notestringNoInternal note not visible to the customer.
customer_memostringNoNote visible to the customer on the invoice.

Update parameters

Used when action is update.

ParameterTypeRequiredDescription
idstringYesQuickBooks invoice ID.
sync_tokenstringYesCurrent sync token for optimistic concurrency.
line_itemsarrayNoUpdated line items (replaces all existing line items).
due_datestringNoUpdated due date.
bill_emailstringNoUpdated billing email.
bill_addrobjectNoUpdated billing address.
ship_addrobjectNoUpdated shipping address.
private_notestringNoUpdated internal note.
customer_memostringNoUpdated customer-facing note.
Caution

When updating an invoice, the line_items array replaces all existing line items. If you want to add a line item, you must include all existing line items plus the new one. The agent typically handles this by first searching for the invoice to get current line items.

Example usage

“Show me all invoices for Acme Corp from this quarter.”

The agent first looks up Acme Corp’s customer ID, then invokes:

  • action: search
  • customer_id: 12345
  • start_date: 2026-01-01
  • end_date: 2026-03-31

“Create an invoice for Acme Corp: 10 hours of consulting at $150/hour, due in 30 days.”

The agent invokes:

  • action: create
  • customer_id: 12345
  • line_items: [{ "description": "Consulting Services", "quantity": 10, "unit_price": 150 }]
  • due_date: 2026-04-17

“Change the due date on invoice #1042 to April 30.”

The agent first searches for the invoice to get its id and sync_token, then invokes:

  • action: update
  • id: 789
  • sync_token: 3
  • due_date: 2026-04-30

Response structure

  • Search returns an array of invoice records with all fields (id, doc_number, customer, line items, amounts, dates, status, balance).
  • Create returns the newly created invoice record with its auto-generated ID.
  • Update returns the updated invoice record with the new sync token.

Related skills: Query Customer | Customer Upsert | Get Uncleared Transactions