Category suggestions

POST /api/v1/transactions/suggest-categories

Suggest ledger categories for uncategorized transactions. By default only fast pattern-matching layers run (<1 s). Pass include_ai=true to also run LLM categorization for transactions the pattern layers could not resolve.

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

Parameters

Query

limit integer default: 20
only_uncategorized boolean default: True
include_ai boolean default: False

Responses

201 Successful Response

suggestions array · CategorySuggestionItem CategorySuggestionItem
5 fields
transaction_id string required

ID of the transaction

suggested_ledger_id string required

Suggested ledger/account ID

suggested_ledger_name string required

Suggested ledger/account name

confidence number required

Confidence score 0-1

reason string required

Brief reason for this suggestion

groups array · CounterpartySuggestionGroup CounterpartySuggestionGroup

Suggestions grouped by counterparty for bulk operations

8 fields
counterparty string required

Counterparty name

suggested_ledger_id string required

Suggested ledger/account ID

suggested_ledger_name string required

Suggested ledger/account name

confidence number required

Avg confidence score

reason string required

Strategy or pattern that matched

transaction_ids array · string

IDs of transactions in this group (from analyzed batch)

transaction_count integer required

Total transactions for this counterparty (may exceed analyzed batch)

sample_description string

Example transaction description for context

count integer

Number of suggestions returned

total_uncategorized integer

Total uncategorized transactions in the business

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object