vendor.update
Change a vendor; `active: false` deactivates it.
Changes the fields of a vendor you name; fields you leave out stay as they are, and null clears terms or
taxTable. Vendors cannot be deleted, as in GnuCash; set active: false.
Examples
Example: with a copy of the synthetic/business-editable example book open as book.gnucash.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"vendor.update","params":{"vendor":"9697710198334d558a9bfde219bb1e41","terms":null,"notes":"Pays on receipt"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"guid": "9697710198334d558a9bfde219bb1e41",
"notes": "Pays on receipt",
"terms": null,
"…": "…"
}
}
Command line
red-ale exec --book book.gnucash vendor.update '{"vendor":"9697710198334d558a9bfde219bb1e41","terms":null,"notes":"Pays on receipt"}'
It prints:
{
"guid": "9697710198334d558a9bfde219bb1e41",
"notes": "Pays on receipt",
"terms": null,
"…": "…"
}
MCP tool call
Tool call:
{"name":"vendor.update","arguments":{"vendor":"9697710198334d558a9bfde219bb1e41","terms":null,"notes":"Pays on receipt"}}
Result:
{
"structuredContent": {
"guid": "9697710198334d558a9bfde219bb1e41",
"notes": "Pays on receipt",
"terms": null,
"…": "…"
}
}
Effect: write, on the Book.
Params
Params of vendor.update: the fields to change.
vendor(Guid, required): The vendor.name(string or null): Company name.id(string or null): Vendor number. On create, absent or empty takes the next number from the book'sgncVendorcounter.currency(CommodityId or null): The currency of the vendor's documents.addr(AddressParams or null): Payment address.notes(string or null): Notes.terms(BillTermRef or null): Default billing term for new bills, by GUID or name;nullfor none.taxTable(TaxTableRef or null): Tax table, by GUID or name;nullfor none.taxTableOverride(boolean or null): New bill lines usetaxTablerather than the book's default.taxIncluded(TaxIncludedWire or null): Whether prices include tax by default.active(boolean or null): Active;falsedeactivates.
Result
A vendor.
guid(Guid, required): A GUID: 32 hexadecimal digits.id(string, required)name(string, required)addr(AddressInfo, required): An address. Empty strings are unset fields.notes(string, required)currency(CommodityId or null)terms(Guid or null)taxTable(Guid or null)taxTableOverride(boolean, required)taxIncluded(TaxIncludedWire, required): Whether prices include tax by default for the contact's documents.active(boolean, required)