---
title: "Preview transaction classification proposals"
method: POST
path: "/v1/portfolio/{portfolioSlug}/portfolio-transactions/preview-classification"
tags: ["PortfolioTransactions"]
---

# Preview transaction classification proposals

`POST /v1/portfolio/{portfolioSlug}/portfolio-transactions/preview-classification`

## Request

- Base URL: `https://api.tokenbooks.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tokenbooks.io/v1/portfolio/{portfolioSlug}/portfolio-transactions/preview-classification`
- Auth: API key in header `x-api-key`

Runs the accounting classifier without saving changes. Returns zero or more proposed transactions in the order produced by the native classifier, preserving each selected owner-qualified operation handle exactly (portfolioTransactionId, walletTransactionId, and txIndex). The app enables its merge or split action only when exactly one proposal is returned. API clients issue any mutation as a separate explicit command.

## Path parameters

- `portfolioSlug` string, required

## Request body

- PreviewTransactionClassificationRequestDto: Selected wallet operations for a read-only native classification preview that may return zero or more proposals
  - `operations` object[], required
    - `portfolioTransactionId` string, required: Accounting transaction the movement currently belongs to.
    - `walletTransactionId` string, required: Source transaction the wallet movement belongs to, from a walletOperation in a read tool result.
    - `txIndex` integer, required: Position of the movement within that source transaction, from the same walletOperation.

## Response `200`

- PreviewTransactionClassificationResponseDto: Read-only classification preview containing zero or more proposed transactions in classifier order
  - `transactions` object[], required: Zero or more proposed transactions in classifier order
    - `operationType` 'DEPOSIT_FIAT' | 'INCOME' | 'REFUND' | 'REBATE' | 'WITHDRAWAL_FIAT' | 'EXPENSE' | 'BUY' | 'SELL' | 'EXCHANGE' | 'SWAP' | 'MOVE' | 'INTERCOMPANY_SEND' | 'INTERCOMPANY_RECEIVE' | 'STAKE' | 'UNSTAKE' | 'PROTOCOL_DEPOSIT' | 'PROTOCOL_WITHDRAW' | 'VAULT_DEPOSIT' | 'VAULT_WITHDRAW' | 'LP_IN' | 'LP_OUT' | 'LOAN_BORROW' | 'LOAN_REPAY' | 'LOAN_LIQUIDATION' | 'LEND_GIVE' | 'LEND_WITHDRAW' | 'ADJUSTMENT' | 'UNCATEGORIZED' | 'SPAM', required: Classified accounting operation type
    - `subType` string, nullable, required
    - `systemNotes` string, nullable, required
    - `timestamp` string, date-time, required: Proposed transaction timestamp (ISO 8601)
    - `operations` object[], required
      - `portfolioTransactionId` string, required: Accounting transaction the movement currently belongs to.
      - `walletTransactionId` string, required: Source transaction the wallet movement belongs to, from a walletOperation in a read tool result.
      - `txIndex` integer, required: Position of the movement within that source transaction, from the same walletOperation.

---

[API](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api.md) · [All operations](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/revisions/180622e6255e?raw)
