update_invoice
Modify existing invoice details in FreshBooks by providing invoice ID and field updates to correct errors or reflect changes.
Instructions
Update an invoice. Pass any writable invoice fields as updates dict.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_id | Yes | ||
| updates | Yes |
Implementation Reference
- src/mcp_freshbooks/server.py:173-179 (handler)The handler for the update_invoice tool. It is registered with @mcp.tool() and uses the client to perform the accounting_update.
@mcp.tool() @_handle_errors async def update_invoice(invoice_id: int, updates: dict) -> str: """Update an invoice. Pass any writable invoice fields as updates dict.""" result = await client.accounting_update("invoices/invoices", invoice_id, "invoice", updates) inv = result.get("invoice", result) return f"Invoice #{inv.get('invoice_number', '?')} updated."