Add journal line
add_journal_lineAdd ONE debit or credit line to an EXISTING journal entry; to create a whole new entry use save_journal_entry, and to change a line already there use update_journal_line.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "add_journal_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Line id (for updating an existing line). | |
| role | No | Optional line role: what the amount is (e.g. sars-3601), set by the producer. Lowercase letters, digits and hyphens, at most 64 characters. Send "$delete" to clear it; omit it to leave it alone. | |
| debit | No | Debit amount for this line (0 if this is a credit line). | |
| credit | No | Credit amount for this line (0 if this is a debit line). | |
| entryid | No | Id of the parent journal entry this line belongs to. | |
| clientid | No | PROD-2704. Optional: the customer (clientid) or supplier (supplierid) this line books to, at most one per line. It tags the line and adds no posting; the entry then shows on that contact's statement and balance. The id must be one of this business's clients or suppliers (see list_clients, list_suppliers). Send "$delete" to clear it; omit it or send null to leave it alone. Naming one kind clears the other. | |
| currency | No | Optional. The currency this line's foreign amount is in. A line on a foreign-currency account takes the account's own; name one on a rand account only for an amount owed in another currency, such as a euro receivable. | |
| accountid | No | Chart-of-accounts account id for this line (see list_accounts). | |
| employeeid | No | PROD-3206. Optional: the employee this line books to, such as a PAYE correction (see list_employees). A line names one contact at most: a customer, a supplier or an employee. A line on PAYE Payable with role sars-4102, tagged to an employee, counts in EMP201 and EMP501 and on that employee's IRP5. Send "$delete" to clear it; omit it or send null to leave it alone. Needs payroll access: without it the write is refused, as is any change to a journal that already names an employee. | |
| supplierid | No | PROD-2704. Optional: the customer (clientid) or supplier (supplierid) this line books to, at most one per line. It tags the line and adds no posting; the entry then shows on that contact's statement and balance. The id must be one of this business's clients or suppliers (see list_clients, list_suppliers). Send "$delete" to clear it; omit it or send null to leave it alone. Naming one kind clears the other. | |
| exchangerate | No | Optional. Base currency per ONE unit of that currency, as booked (20.0480 rand per euro). Omitted, it is the line's rand amount over its foreign amount. | |
| foreignamount | No | Optional. The line's amount in that currency, positive, as booked: €1,250.00 of a R25,060.00 line. Kept as written and never converted again. Omitted on a foreign-currency account, stub works it out at the business's closing rate for the day, else its daily rate. |