Change an invoice
invoices_updateChange one invoice of a company - its details, a line by its id, or a line added - and answer it whole. Only the fields given change: on FreeAgent by the names invoices_get answers a FreeAgent invoice with, on Xero by Xero's own, its contact named by ContactID alone and every line the change does not name sent back by its LineItemID, so each stays as it was; a Xero draft is approved by Status AUTHORISED, a change of its own, and any automatic collection the organisation set up in Xero, such as a GoCardless Direct Debit mandate, then runs on it as it would on an invoice approved in Xero. On Zoho Books by Zoho's own names: the customer stays, and every line the change does not name goes back by its line_item_id, so each stays as it was - a line with none is added, naming its item by item_id; the organisation's own workflow rules in Zoho may still email on a change. On QuickBooks by QuickBooks' own names: the customer stays, and the change goes to the invoice as just read - one QuickBooks refuses because the invoice changed there meanwhile is answered with a note to read it again. On QuickBooks a change naming no line leaves every line as it is; one naming lines sends every line the invoice holds back as it reads, by its Id, so each stays as it was, a line with no Id added whole. An Amount changed alone stands; Qty and UnitPrice change with the Amount they make; outside the US, on a company charging tax, a line added names its TaxCodeRef; and QuickBooks works the tax out again on the lines as changed. Each call is one write, sent to the company's program once - to FreeAgent, or to Xero under a request key of its own, so Xero never takes it twice. A Zoho Books organisation's write goes to Zoho Books, which takes no request key. One given in another program's names, or naming an id of another program's form, is not_written with reason refused, nothing sent; one Xero keeps from the person's Xero role, with reason xero_role. A company set to read only refuses it before its program is asked, and so do words that screen as a prompt attack. outcome is written with the record; not_written with reason and, where its program refused it, what it said; or unknown where its answer never came and reading the books back could not tell, found naming every identical new record where two were made and none where that read itself failed. A write whose answer never came is settled by reading the books back, never sent again. Where the screening holds back its program's words in the answer, the outcome and each record's id stand, marked withheld with why. A QuickBooks company's write goes to QuickBooks under a request key of its own, so QuickBooks never takes it twice.
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": {
"company": "<company>",
"invoice": "<invoice>",
"changes": "<changes>"
},
"name": "invoices_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | ||
| company | Yes | The id companies_list gives the company. | |
| invoice | Yes | The invoice's id, as invoices_list answers it. |