Skip to main content

Payee Merges

A merge folds one or more source payees into a destination payee. Every record that uses a source payee moves to the destination, and the sources no longer appear in payee lists. A merge can't be undone, so preview it first.

OperationMethod and pathScope
preview-merge-payeesPOST /v1/workspaces/{workspaceID}/payees/merge/previewpayees:write
merge-payeesPOST /v1/workspaces/{workspaceID}/payees/mergepayees:write

Both take the same body:

{
"destinationPayeeId": "vnd_2Rt7Km4Xb9Nz3Wq6Hd1Lp",
"sourcePayeeIds": ["vnd_8Jd3Pq6Vw1Lx5Ct9Mz2Hb", "vnd_5Gh8Wn2Kc7Ty4Rb1Qs9Fm"]
}

The preview needs payees:write like the merge, because it is only useful to a caller who can merge. Your role in the workspace must allow editing data.

What moves​

Records of these kinds that use a source payee move to the destination:

KindKey in references
Transactionstransactions
Downloaded bank transactions in the Inbox with the payee stagedinboxItems
Recurring transactionsrecurringTransactions
Billsbills
Income schedulesincomeSchedules
Business clients linked to the payeeclients
Remembered payees (payee aliases)payeeAliases

Each source is then marked as merged into the destination. It stays readable with get-payee, so imports and bank sync can still resolve its name to the destination. The merge runs as one change: if any part fails, nothing is merged.

Preview a merge​

preview-merge-payees runs every check that merge-payees runs and changes nothing. It returns the payees by name and counts what would move from each source:

{
"destination": { "id": "vnd_2Rt7Km4Xb9Nz3Wq6Hd1Lp", "name": "Neighborhood Market" },
"sources": [
{
"id": "vnd_8Jd3Pq6Vw1Lx5Ct9Mz2Hb",
"name": "Neighborhood Market Downtown",
"referenceCount": 14,
"references": {
"transactions": 12, "inboxItems": 1, "recurringTransactions": 0, "bills": 0,
"incomeSchedules": 0, "clients": 0, "payeeAliases": 1
}
},
{
"id": "vnd_5Gh8Wn2Kc7Ty4Rb1Qs9Fm",
"name": "NBHD MKT UPTOWN",
"referenceCount": 3,
"references": {
"transactions": 3, "inboxItems": 0, "recurringTransactions": 0, "bills": 0,
"incomeSchedules": 0, "clients": 0, "payeeAliases": 0
}
}
],
"totalReferenceCount": 17
}

sources are in request order. Every kind is always present, even when it is 0. Records that already use the destination aren't counted, because they don't move.

The counts are taken when you ask. If records change before you merge, the merge moves what is there at that moment.

Merge​

merge-payees returns:

{
"destinationPayeeId": "vnd_2Rt7Km4Xb9Nz3Wq6Hd1Lp",
"mergedPayeeIds": ["vnd_8Jd3Pq6Vw1Lx5Ct9Mz2Hb", "vnd_5Gh8Wn2Kc7Ty4Rb1Qs9Fm"],
"updatedReferenceCount": 17
}

updatedReferenceCount is the number of records moved. If nothing changed in between, it equals the preview's totalReferenceCount.

Errors​

Both operations return the same errors for the same body. The detail key is errors.api.<name>.detail, with the name below.

Statuscodedetail nameWhen
403FORBIDDENinsufficientRoleToMergePayeesYour role in the workspace can't edit data.
404NOT_FOUNDdestinationPayeeNotFoundThe destination doesn't exist in this workspace.
404NOT_FOUNDoneOrMoreSourcePayeesNotFoundA source doesn't exist in this workspace.
422VALIDATION_FAILEDdestinationPayeeHasAlreadyBeenMergedThe destination was merged into another payee. Use that payee instead.
422VALIDATION_FAILEDsourcePayeeHasAlreadyBeenMergedA source was already merged.
422VALIDATION_FAILEDdestinationPayeeIdMustNotAppearInSourcePayeeIdsThe destination is also listed as a source.
422VALIDATION_FAILEDsourcePayeeIdsMustContainAtLeastOnePayee, sourcePayeeIdsMustNotContainDuplicates, sourcePayeeIdsMustNotContainEmptyValues, invalidSourcePayeeId, destinationPayeeIdIsRequired, invalidDestinationPayeeIdThe body is malformed.

See Errors for the response format.

Preview a rename​

Renaming a payee with update-payee changes only its name, and every record that uses it shows the new name. It never combines the payee with another payee that has the same name; merge them for that. To see what a rename would do first, call preview-rename-payee. It needs payees:write, runs the same checks as the rename and changes nothing.

OperationMethod and pathScope
preview-rename-payeePOST /v1/workspaces/{workspaceID}/payees/{payeeID}/rename/previewpayees:write

The body is {"name": "Neighborhood Market"}; name is required. It returns:

{
"id": "vnd_8Jd3Pq6Vw1Lx5Ct9Mz2Hb",
"currentName": "NBHD MKT #123",
"newName": "Neighborhood Market",
"referenceCount": 13,
"references": {
"transactions": 12, "inboxItems": 1, "recurringTransactions": 0, "bills": 0,
"incomeSchedules": 0, "clients": 0, "payeeAliases": 0
},
"payeesWithNewName": [
{ "id": "vnd_2Rt7Km4Xb9Nz3Wq6Hd1Lp", "name": "neighborhood market" }
]
}

newName has leading and trailing spaces removed, as the rename removes them. references uses the keys in What moves. payeesWithNewName lists other payees, not merged ones, whose name matches the new name ignoring case. It's usually empty.

Statuscodedetail nameWhen
403FORBIDDENinsufficientRoleToUpdatePayeesYour role in the workspace can't edit data.
404NOT_FOUNDpayeeNotFoundThe payee doesn't exist in this workspace.
422VALIDATION_FAILEDnameIsRequiredThe name is blank. A missing name is refused by request validation.

AI assistants​

The merge_payees MCP tool uses preview-merge-payees as its preview, needs a confirmation for every call, and merges at most 20 payees per call. The REST operations have no such limit.

The rename_payee MCP tool uses preview-rename-payee as its preview and needs a confirmation for every call.