Add an expense record
create_expenseAdds one expense record: a bill or cost. It needs the supplier (contact_id, from list_contacts; add a new supplier with create_contact), an expense account (from list_expense_accounts) and, for a rental cost, the property (from list_properties). liable_contact_ids names the contractors or property owners the cost is shared between, which decides whose figures it reduces. Match the expense type with list_choices and the account by its name or IRD line; When the person's words match more than one, or none, show them the closest and ask which they mean; never guess an id. Only for an organisation where this connection may add and change records (list_organisations says which). The answer is the saved record with its organisation's name; tell the person what was added and where.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Free text kept with the record, such as the invoice number ("Invoice number: 1234"). | |
| amount | Yes | The bill's total in NZD. | |
| due_date | No | The New Zealand date the bill is due, yyyy-MM-dd, when it has one. | |
| contact_id | Yes | The supplier or payee, from list_contacts. | |
| property_id | No | A rental cost's property, from list_properties. | |
| expense_date | Yes | The New Zealand date of the bill or cost, yyyy-MM-dd. | |
| expense_type | Yes | rental (a rental property's costs), commission (costs of a contractor's work) or household (the household's own costs). | |
| allow_duplicate | No | Adding is safe to repeat: the same details sent again return the record already made. Set true only when the person confirms they really want a second, identical record. | |
| organisation_id | No | The id of the organisation to use, from list_organisations. Leave it out when the connection covers only one organisation; it is required when it covers more than one. | |
| expense_account_id | Yes | The expense account to file it under, from list_expense_accounts. | |
| liable_contact_ids | No | The contact ids of the contractors or property owners liable for the cost, from list_contacts. A cost on a jointly owned property is shared by every owner named. |