job.create
Create a job for a customer or vendor; its ID comes from the book's counter unless given.
Creates a job: a project of a customer or a vendor that its invoices or bills can be filed under. It needs a name and
an owner, the GUID of a customer or vendor. A job has no currency of its own; it uses its owner's.
rate is the default price of new lines on the job's documents (GnuCash keeps it in the job's job-rate slot); zero
removes it. Leave id out and the job is numbered from the gncJob counter.
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":"job.create","params":{"name":"Audit","owner":"5b22073fa4e34411b07c14a77147ce6b","rate":"120"}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"guid": "…",
"name": "Audit",
"owner": {
"kind": "customer",
"guid": "5b22073fa4e34411b07c14a77147ce6b"
},
"rate": {
"num": "120",
"denom": "1"
},
"active": true,
"…": "…"
}
}
Command line
red-ale exec --book book.gnucash job.create '{"name":"Audit","owner":"5b22073fa4e34411b07c14a77147ce6b","rate":"120"}'
It prints:
{
"guid": "…",
"name": "Audit",
"owner": {
"kind": "customer",
"guid": "5b22073fa4e34411b07c14a77147ce6b"
},
"rate": {
"num": "120",
"denom": "1"
},
"active": true,
"…": "…"
}
MCP tool call
Tool call:
{"name":"job.create","arguments":{"name":"Audit","owner":"5b22073fa4e34411b07c14a77147ce6b","rate":"120"}}
Result:
{
"structuredContent": {
"guid": "…",
"name": "Audit",
"owner": {
"kind": "customer",
"guid": "5b22073fa4e34411b07c14a77147ce6b"
},
"rate": {
"num": "120",
"denom": "1"
},
"active": true,
"…": "…"
}
}
Effect: write, on the Book.
Params
Params of job.create. name and owner are required.
name(string or null): Job name.id(string or null): Job number. On create, absent or empty takes the next number from the book'sgncJobcounter.owner(Guid or null): The customer or vendor the job is for. It cannot change once the job has documents.reference(string or null): Reference (GnuCash's job description).rate(Amount or null): Rate: the default price of new lines on the job's documents. Zero removes it.active(boolean or null): Active;falsedeactivates.
Result
A job.
guid(Guid, required): A GUID: 32 hexadecimal digits.id(string, required)name(string, required)owner(OwnerInfo, required): An owner: a customer, vendor, employee or job.reference(string, required)rate(Amount, required): An exact amount. Read from a decimal string ("12.34"), a rational string ("1234/100") or {num, denom} with string members; written as {num, denom}. Never a JSON number.active(boolean, required)