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.
| Operation | Method and path | Scope |
|---|---|---|
preview-merge-payees | POST /v1/workspaces/{workspaceID}/payees/merge/preview | payees:write |
merge-payees | POST /v1/workspaces/{workspaceID}/payees/merge | payees: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:
| Kind | Key in references |
|---|---|
| Transactions | transactions |
| Downloaded bank transactions in the Inbox with the payee staged | inboxItems |
| Recurring transactions | recurringTransactions |
| Bills | bills |
| Income schedules | incomeSchedules |
| Business clients linked to the payee | clients |
| 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.
| Status | code | detail name | When |
|---|---|---|---|
403 | FORBIDDEN | insufficientRoleToMergePayees | Your role in the workspace can't edit data. |
404 | NOT_FOUND | destinationPayeeNotFound | The destination doesn't exist in this workspace. |
404 | NOT_FOUND | oneOrMoreSourcePayeesNotFound | A source doesn't exist in this workspace. |
422 | VALIDATION_FAILED | destinationPayeeHasAlreadyBeenMerged | The destination was merged into another payee. Use that payee instead. |
422 | VALIDATION_FAILED | sourcePayeeHasAlreadyBeenMerged | A source was already merged. |
422 | VALIDATION_FAILED | destinationPayeeIdMustNotAppearInSourcePayeeIds | The destination is also listed as a source. |
422 | VALIDATION_FAILED | sourcePayeeIdsMustContainAtLeastOnePayee, sourcePayeeIdsMustNotContainDuplicates, sourcePayeeIdsMustNotContainEmptyValues, invalidSourcePayeeId, destinationPayeeIdIsRequired, invalidDestinationPayeeId | The 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.
| Operation | Method and path | Scope |
|---|---|---|
preview-rename-payee | POST /v1/workspaces/{workspaceID}/payees/{payeeID}/rename/preview | payees: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.
| Status | code | detail name | When |
|---|---|---|---|
403 | FORBIDDEN | insufficientRoleToUpdatePayees | Your role in the workspace can't edit data. |
404 | NOT_FOUND | payeeNotFound | The payee doesn't exist in this workspace. |
422 | VALIDATION_FAILED | nameIsRequired | The 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.