Save income
save_incomeCreate or update income record(s). For one, send its fields inline (pass an id to update, omit to create). To create/update many at once, send an items array — preferred over repeated calls: the whole batch is one all-or-nothing transaction with a single ledger recompute. Each item with an id updates; each without creates. Use update_income_bulk when you only need to recategorise/relink existing income, or create_income_expenses_bulk to add income and expenses together in one transaction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Income id. Present → update that income; omit → create a new one. | |
| date | No | Income date (ISO 8601). | |
| name | No | Display name / description of the income. | |
| alert | No | Alert/reminder note to surface on this income. | |
| items | No | Vector of income objects to create/update in one all-or-nothing batch. Preferred over repeated calls. Each item with an id updates; each without creates. | |
| notes | No | Free-text notes. | |
| split | No | Whether this income is one line of a split transaction. | |
| amount | No | Unit amount before quantity/tax, in the record's currency. | |
| client | No | Client id, or an exact client name to resolve (see list_clients). | |
| method | No | Payment method as free text (e.g. "cash", "card", "eft") — no fixed set. | |
| unlink | No | Id of a currently-linked invoice/asset to detach from this income. Ignored unless it is an invoice/asset id. | |
| assetid | No | Asset id to link this income to (e.g. proceeds from an asset). | |
| groupid | No | Group id linking split lines of one real-world transaction together. | |
| product | No | Product id this income is for (see list_products). | |
| category | No | Income category name; forced to "Sales" when linked to an invoice. | |
| currency | No | ISO 4217 currency code (e.g. "ZAR", "USD"). Defaults to the business currency. | |
| accountid | No | Chart-of-accounts income category account id, or an exact account name to resolve (see list_accounts). | |
| invoiceid | No | Invoice id this income pays toward. | |
| incometype | No | Income type/classification label. | |
| exchangerate | No | Manual FX rate to the business base currency; omit to use the stored/auto rate. | |
| baseaccountid | No | Base/control account id override; rarely needed — defaults from the category. | |
| transactionid | No | Bank transaction id to reconcile this income against. |