Skip to content

Set one default category on many counterparties

POST/api/v1/counterparty-defaults/bulk

Gives every listed counterparty (up to 500) the same default category: an item with default_id, or whose key already has a default, is updated; the rest are created. Each item succeeds or fails on its own (results in request order). Each saved default lists its conflicts when the batch has at most 25 items (conflicts_checked). When every item fails the same way (a category that is not an active category ledger of this business) the request fails with that error.

Operation ID: bulk_set_counterparty_defaults·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

itemsarray · CounterpartyDefaultBulkItemrequiredCounterpartyDefaultBulkItem
3 fields
registry_idstring

Linked registry entry (preferred key)

counterparty_namestring

Name key when the counterparty is not linked

default_idstring

The default this counterparty already has (the summary row's default_id); it is updated instead of creating a new one

default_ledger_idstringrequired

Ledger every listed counterparty defaults to

memostring

Memo for new defaults; existing defaults keep theirs when omitted

mark_personalboolean

Mark matched transactions as personal expenses

Responses

201Successful Response

successboolean
messagestring
codestring
dataCounterpartyDefaultBulkResponse

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.