Update transaction

Use this endpoint to update a single transaction. You may also use this to split an existing transaction.

put
Update transaction

https://dev.lunchmoney.app/v1/transactions/:transaction_id
Request
Response
Request
Body Parameters
split
optional
object
Defines the split of a transaction. You may not split an already-split transaction, recurring transaction, or group transaction. See Split object for supported properties.
transaction
required
object
Updates to transaction matching ID (see Update Transaction object below)
debit_as_negative
optional
boolean
If true, will assume negative amount values denote expenses and positive amount values denote credits. Defaults to false.
Response
200: OK
If a split was part of the request, an array of newly-created split transactions will be returned.
{
updated: true,
split: [58, 59]
}
404: Not Found
Array of errors will be returned if field(s) are invalid.
{ error:
[ 'This transaction doesn't exist or you don't have access to it.' ] }
{ error:
[ 'You cannot change the amount for this transaction because it was automatically imported.',
'You cannot assign an asset_id for this transaction because it was automatically imported.' ] }
Update Transaction object
Split object
Update Transaction object

Update Transaction object

Key

Type

Description

date

string

Must be in ISO 8601 format (YYYY-MM-DD).

category_id

number

Unique identifier for associated category_id. Category must be associated with the same account and must not be a category group.

payee

string

Max 140 characters

amount

number | string

You may only update this if this transaction was not created from an automatic import, i.e. if this transaction is not associated with a plaid_account_id

currency

string

You may only update this if this transaction was not created from an automatic import, i.e. if this transaction is not associated with a plaid_account_id. Defaults to user account's primary currency.

asset_id

number

Unique identifier for associated asset (manually-managed account). Asset must be associated with the same account. You may only update this if this transaction was not created from an automatic import, i.e. if this transaction is not associated with a plaid_account_id

recurring_id

number

Unique identifier for associated recurring expense. Recurring expense must be associated with the same account.

notes

string

Max 350 characters

status

string

Must be either cleared or uncleared. Defaults to uncleared If recurring_id is provided, the status will automatically be set to recurring or recurring_suggested depending on the type of recurring_id. Defaults to uncleared.

external_id

string

User-defined external ID for transaction. Max 75 characters. External IDs must be unique within the same asset_id. You may only update this if this transaction was not created from an automatic import, i.e. if this transaction is not associated with a plaid_account_id

tags

array of numbers and/or strings

Passing in a number will attempt to match by ID. If no matching tag ID is found, an error will be thrown.

Passing in a string will attempt to match by string. If no matching tag name is found, a new tag will be created.

Split object

Split object

Key

Type

Description

date

string

Must be in ISO 8601 format (YYYY-MM-DD)

Required.

category_id

number

Unique identifier for associated category_id. Category must be associated with the same account.

Required.

notes

string

amount

number | string

Individual amount of split. Currency will inherit from parent transaction. All amounts must sum up to parent transaction amount.

Required.