Merge counterparty groups into one name

POST/api/v1/counterparty-naming/merge

Every transaction that currently displays one of the source names gets target_name as its stored name, marked user-edited so re-syncs keep it. Rows renamed by hand to some other name are never touched. Each row keeps its registry link unless the target names a registry entry (target_registry_id, or the entry whose canonical name is exactly target_name), which every merged row then links to. Saved renames make future transactions display the target too: one per registry entry involved and one per raw name of the unlinked rows.

Operation ID: merge_counterparties·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

sourcesarray · CounterpartyRefrequiredCounterpartyRef

Groups to fold into the target.

2 fields
counterparty_namestringrequired
registry_idstring
target_namestringrequired

Name every merged transaction gets.

target_registry_idstring

Registry entry the merged transactions should link to. Pass the registry_id of the chosen canonical group when it is linked; omit to leave the merged transactions unlinked.

Responses

201Successful Response

successboolean
messagestring
codestring
dataMergeCounterpartiesResponse

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.