---
title: "POST /v1/portfolios/{portfolioSlug}/accounting-rules/preview"
method: POST
path: "/v1/portfolios/{portfolioSlug}/accounting-rules/preview"
tags: ["AccountingRules"]
---

# POST /v1/portfolios/{portfolioSlug}/accounting-rules/preview

`POST /v1/portfolios/{portfolioSlug}/accounting-rules/preview`

## 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/portfolios/{portfolioSlug}/accounting-rules/preview`
- Auth: API key in header `x-api-key`

## Path parameters

- `portfolioSlug` string, required

## Request body

- PreviewAccountingRulesRequestDto
  - `detail` 'compact' | 'transactions', required
  - `mutation` union, required
    - object
      - `type` 'current', required
    - object
      - `type` 'create', required
      - `name` string, required: Human-readable rule name, shown in the rules list.
      - `enabled` boolean: Whether the rule evaluates. A disabled rule is kept but never fires.
      - `conditions` object, required
        - `formatVersion` 1, required: Structure version of this envelope. Always 1.
        - `all` union[], required: Conditions that must all match for the rule to fire. At least one is required.
          - union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
      - `action` object, required
        - `formatVersion` 1, required: Structure version of this envelope. Always 1.
        - `actions` union[], required: What the rule changes when it matches. At most one action of each type.
          - union
            - object
              - …
            - object
              - …
            - object
              - …
    - object
      - `type` 'update', required
      - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
      - `enabled` boolean
      - `name` string: Human-readable rule name, shown in the rules list.
      - `conditions` object
        - `formatVersion` 1, required: Structure version of this envelope. Always 1.
        - `all` union[], required: Conditions that must all match for the rule to fire. At least one is required.
          - union
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
            - object
              - …
      - `action` object
        - `formatVersion` 1, required: Structure version of this envelope. Always 1.
        - `actions` union[], required: What the rule changes when it matches. At most one action of each type.
          - union
            - object
              - …
            - object
              - …
            - object
              - …
    - object
      - `type` 'set_enabled', required
      - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
      - `enabled` boolean, required
    - object
      - `type` 'reorder', required
      - `orderedRuleIds` string[], required: Every rule handle in the portfolio, in the order they should evaluate. Rules apply in order, so earlier rules win.
    - object
      - `type` 'delete', required
      - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
  - `maxAffected` integer
  - `budgetMs` integer
  - `maxScanned` integer

## Response `200`

- union
  - object
    - `detail` 'compact', required
    - `scannedCount` integer, required
    - `candidateCount` integer, required
    - `affectedCount` integer, required
    - `firstAffectedAt` string, date-time, nullable, required
    - `lastAffectedAt` string, date-time, nullable, required
    - `truncatedBy` 'affected' | 'budget' | 'details' | 'scanned' | 'null', nullable, required
    - `changes` object[], required
      - `portfolioTransactionId` string, required
      - `timestamp` string, date-time, required
      - `ruleEvaluationFailures` object[]: Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.
        - `rule` union, required
          - object
            - `kind` 'saved', required
            - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
            - `version` integer, required
          - object
            - `kind` 'draft', required
            - `label` 'draft', required
            - `version` 1, required
        - `rejection` object, nullable, required
          - `code` 'ACCOUNT_FACTS_INCOMPLETE' | 'ASSET_EVIDENCE_INCOMPLETE' | 'CURRENCY_MISMATCH' | 'WALLET_SCOPE_CONFLICT' | 'WALLET_PROVENANCE_AMBIGUOUS' | 'ASSET_EVIDENCE_CONFLICT' | 'ASSET_EVIDENCE_MISSING' | 'LOT_EVIDENCE_INCONSISTENT' | 'INVALID_REPORT_CLASSIFICATION' | 'CAPITAL_GAINS_LOT_EVIDENCE_REQUIRED' | 'CAPITAL_LOSS_DISPOSAL_LOT_EVIDENCE_REQUIRED' | 'COUNTERPARTY_NOT_SUPPORTED', required
          - `message` string, required
      - `lines` object[], required
        - `lineNumber` integer, required
        - `assignmentChanged` boolean: Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.
        - `account` object, nullable, required
          - `from` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `to` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `counterparty` object, nullable, required
          - `from` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `to` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `responsibilityCenters` object[], required
          - `responsibilityCenterTypeKey` string, required: Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.
          - `from` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `to` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `matchedButLost` union[], required
          - union
            - object
              - …
            - object
              - …
    - `skippedRuleEvidence` object[]: Transactions where rules were skipped without changing any assignment. This additive collection keeps v1 changes limited to affected transactions.
      - `portfolioTransactionId` string, required
      - `timestamp` string, date-time, required
      - `ruleEvaluationFailures` object[]: Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.
        - `rule` union, required
          - object
            - `kind` 'saved', required
            - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
            - `version` integer, required
          - object
            - `kind` 'draft', required
            - `label` 'draft', required
            - `version` 1, required
        - `rejection` object, nullable, required
          - `code` 'ACCOUNT_FACTS_INCOMPLETE' | 'ASSET_EVIDENCE_INCOMPLETE' | 'CURRENCY_MISMATCH' | 'WALLET_SCOPE_CONFLICT' | 'WALLET_PROVENANCE_AMBIGUOUS' | 'ASSET_EVIDENCE_CONFLICT' | 'ASSET_EVIDENCE_MISSING' | 'LOT_EVIDENCE_INCONSISTENT' | 'INVALID_REPORT_CLASSIFICATION' | 'CAPITAL_GAINS_LOT_EVIDENCE_REQUIRED' | 'CAPITAL_LOSS_DISPOSAL_LOT_EVIDENCE_REQUIRED' | 'COUNTERPARTY_NOT_SUPPORTED', required
          - `message` string, required
      - `lines` object[], required
        - `lineNumber` integer, required
        - `assignmentChanged` boolean: Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.
        - `account` object, nullable, required
          - `from` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `to` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `counterparty` object, nullable, required
          - `from` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `to` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `responsibilityCenters` object[], required
          - `responsibilityCenterTypeKey` string, required: Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.
          - `from` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `to` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `matchedButLost` union[], required
          - union
            - object
              - …
            - object
              - …
  - object
    - `detail` 'transactions', required
    - `scannedCount` integer, required
    - `candidateCount` integer, required
    - `affectedCount` integer, required
    - `firstAffectedAt` string, date-time, nullable, required
    - `lastAffectedAt` string, date-time, nullable, required
    - `truncatedBy` 'affected' | 'budget' | 'details' | 'scanned' | 'null', nullable, required
    - `changes` object[], required
      - `portfolioTransactionId` string, required
      - `timestamp` string, date-time, required
      - `ruleEvaluationFailures` object[]: Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.
        - `rule` union, required
          - object
            - `kind` 'saved', required
            - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
            - `version` integer, required
          - object
            - `kind` 'draft', required
            - `label` 'draft', required
            - `version` 1, required
        - `rejection` object, nullable, required
          - `code` 'ACCOUNT_FACTS_INCOMPLETE' | 'ASSET_EVIDENCE_INCOMPLETE' | 'CURRENCY_MISMATCH' | 'WALLET_SCOPE_CONFLICT' | 'WALLET_PROVENANCE_AMBIGUOUS' | 'ASSET_EVIDENCE_CONFLICT' | 'ASSET_EVIDENCE_MISSING' | 'LOT_EVIDENCE_INCONSISTENT' | 'INVALID_REPORT_CLASSIFICATION' | 'CAPITAL_GAINS_LOT_EVIDENCE_REQUIRED' | 'CAPITAL_LOSS_DISPOSAL_LOT_EVIDENCE_REQUIRED' | 'COUNTERPARTY_NOT_SUPPORTED', required
          - `message` string, required
      - `lines` object[], required
        - `lineNumber` integer, required
        - `assignmentChanged` boolean: Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.
        - `account` object, nullable, required
          - `from` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `to` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `counterparty` object, nullable, required
          - `from` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `to` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `responsibilityCenters` object[], required
          - `responsibilityCenterTypeKey` string, required: Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.
          - `from` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `to` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `matchedButLost` union[], required
          - union
            - object
              - …
            - object
              - …
    - `skippedRuleEvidence` object[]: Transactions where rules were skipped without changing any assignment. This additive collection keeps v1 changes limited to affected transactions.
      - `portfolioTransactionId` string, required
      - `timestamp` string, date-time, required
      - `ruleEvaluationFailures` object[]: Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.
        - `rule` union, required
          - object
            - `kind` 'saved', required
            - `ruleId` string, required: Saved rule handle, from list_accounting_rules.
            - `version` integer, required
          - object
            - `kind` 'draft', required
            - `label` 'draft', required
            - `version` 1, required
        - `rejection` object, nullable, required
          - `code` 'ACCOUNT_FACTS_INCOMPLETE' | 'ASSET_EVIDENCE_INCOMPLETE' | 'CURRENCY_MISMATCH' | 'WALLET_SCOPE_CONFLICT' | 'WALLET_PROVENANCE_AMBIGUOUS' | 'ASSET_EVIDENCE_CONFLICT' | 'ASSET_EVIDENCE_MISSING' | 'LOT_EVIDENCE_INCONSISTENT' | 'INVALID_REPORT_CLASSIFICATION' | 'CAPITAL_GAINS_LOT_EVIDENCE_REQUIRED' | 'CAPITAL_LOSS_DISPOSAL_LOT_EVIDENCE_REQUIRED' | 'COUNTERPARTY_NOT_SUPPORTED', required
          - `message` string, required
      - `lines` object[], required
        - `lineNumber` integer, required
        - `assignmentChanged` boolean: Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.
        - `account` object, nullable, required
          - `from` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `to` string, required: Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `counterparty` object, nullable, required
          - `from` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `to` string, nullable, required: Counterparty name, from list_journal_line_assignment_options (type: counterparty).
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `responsibilityCenters` object[], required
          - `responsibilityCenterTypeKey` string, required: Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.
          - `from` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `to` object, nullable, required
            - `responsibilityCenterName` string, required: Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).
            - `percentageBps` integer, required
          - `byRule` union, required
            - object
              - …
            - object
              - …
          - `lockedBy` 'MANUAL' | 'MANUAL_CLEARED' | 'PAYMENT_LINK' | 'SYSTEM_RULE' | 'null', nullable, required
        - `matchedButLost` union[], required
          - union
            - object
              - …
            - object
              - …
    - `transactionViews` PortfolioTransactionResponseDto[], required
      - `id` string, required: Portfolio transaction ID
      - `operationType` string, required: Accounting operation type
      - `subType` string, nullable, required: Operation sub-type
      - `classification` object, required: Triage summary: classification state, reason, and suggested action
        - `state` 'categorized' | 'uncategorized' | 'error', required: Whether the transaction is categorized, uncategorized, or errored
        - `reason` string, nullable, required: Root failure mode (unwrapped), e.g. FmvNotAvailable; null if none
        - `detail` string, nullable, required: Human-readable detail for the primary issue, if any
        - `suggestedAction` object, nullable, required: Suggested remediation, if any
          - `tool` string, nullable, required: MCP tool to remediate with, or null if no single tool applies
          - `description` string, required: What to do to resolve it
      - `systemNotes` string, nullable, required: System-generated notes
      - `errorMessage` string, nullable, required: Legacy error message text if processing failed
      - `errorDetails` unknown[], nullable: Structured error details if processing failed
        - unknown
      - `timestamp` string, required: Transaction timestamp (ISO 8601)
      - `memo` string, nullable, required: User memo
      - `status` string, required: Transaction status
      - `tags` string[], required: Transaction tags
      - `fileAttachments` unknown[], required: Attached files metadata
        - unknown
      - `journalEntry` JournalEntryResponseDto, required
        - `id` string, required: Journal entry ID
        - `timestamp` string, required: Entry timestamp (ISO 8601)
        - `status` string, required: Journal entry status
        - `memo` string, nullable, required: User memo
        - `systemNotes` string, nullable, required: System-generated notes
        - `isAdjustment` boolean, required: Whether this is an adjustment entry
        - `portfolioTransactionId` string, nullable, required: Originating portfolio transaction ID, if any
        - `operationType` string, nullable, required: Operation type of the originating transaction
        - `subType` string, nullable, required: Operation sub-type of the originating transaction
        - `adjustmentJournalImportProvenance` object, nullable: Adjustment-import provenance with immutable file and source-row facts and the uploader's current display name, or null for a non-imported journal
          - `importRef` string, required
          - `sourceFile` object, required
            - `name` string, required
            - `uploadedAt` string, date-time, required
            - `uploader` object, required
              - …
          - `sourceRows` object[], required
            - `appliedResolutions` object, required
              - …
            - `entryId` string, required
            - `journalLineNumber` integer, required
            - `locator` union, required
              - …
            - `normalizedValues` union, required
              - …
            - `sourceRowHash` string, required
        - `lines` object[], required: Debit/credit lines, ordered by line number
          - `lineNumber` integer, required: Line ordinal within the entry
          - `entryType` string, required: DR (debit) or CR (credit)
          - `accountName` string, nullable, required: Ledger account name
          - `accountNumber` string, nullable, required: Chart-of-accounts number
          - `accountType` string, nullable: Ledger account type
          - `accountSubType` string, nullable: Ledger account sub-type
          - `accountNormalBalanceType` string, nullable: Ledger account normal balance side
          - `fiatAmount` string, required: Fiat amount (decimal string)
          - `assetId` string, nullable, required: Asset ID when the line is asset-denominated
          - `assetSymbol` string, nullable, required: Asset symbol
          - `assetAmount` string, nullable, required: Asset quantity (decimal string)
          - `memo` string, nullable, required: Line memo
          - `responsibilityCenterAssignments` object[], required: Typed responsibility-center assignments, one per dimension, ordered by type sort order
            - `responsibilityCenterTypeId` string, required: Responsibility-center type ID used by edit commands
            - `responsibilityCenterId` string, required: Responsibility-center ID used by edit commands
            - `value` string, required: Filter-options-compatible public value for this assignment
            - `responsibilityCenterType` object, required: The dimension this assignment classifies the line under
              - …
            - `responsibilityCenterName` string, required: Assigned responsibility-center name
            - `responsibilityCenterCode` string, nullable, required: Stable code of the center within its type, if any
            - `percentageBps` integer, required: Allocation in basis points (10000 = 100%)
          - `counterpartyName` string, nullable, required: Counterparty name
          - `lot` object, nullable, required: Cost-basis lot lineage when the line realizes gains/losses
            - `id` string, required: Lot identifier (e.g. BTC_001)
            - `entryId` string, required: Unique lot ledger entry ID
            - `entryKind` string, required: Lot entry kind (ADD, DSP, CUT, MVE, RES, REL)
            - `lotMethod` string, required: Lot accounting method (FIFO, LIFO, HIFO, ACB)
          - `transfer` object, nullable, required: Wallet transfer lineage when the line maps to an on-chain transfer
            - `txIndex` integer, nullable, required: Transfer index within the tx
            - `chainId` string, nullable, required: Chain ID of the transfer
            - `txHash` string, nullable, required: On-chain transaction hash
      - `walletOperations` object[], required: Wallet transfers that make up this transaction
        - `type` string, required: Transfer direction/type (e.g. IN, OUT)
        - `txHash` string, required: On-chain transaction hash
        - `chainId` string, required: Chain ID
        - `txIndex` integer, required: Transfer index within the transaction
        - `walletTransactionId` string, required: Wallet transaction handle for this operation; pair with txIndex to reference the operation in merge_transactions / split_transactions
        - `fromAddress` string, required: Sender address
        - `fromAddressLabel` string, nullable, required: Sender address label
        - `toAddress` string, required: Recipient address
        - `toAddressLabel` string, nullable, required: Recipient address label
        - `value` string, required: Human-readable transfer amount (decimal string)
        - `valueQuote` string, nullable, required: Fiat quote value (decimal string)
        - `quoteCurrency` string, nullable, required: Fiat quote currency
        - `quoteSource` string, nullable, required: Fiat quote source
        - `quoteMeta` object, nullable: Structured quote provenance, null when none is available, or temporarily omitted by an older server during a rolling deploy
          - `s` 'SYNC_SOURCE' | 'FMV_ENGINE' | 'DERIVED_REPRESENTED' | 'DERIVED_SIBLING' | 'POLICY' | 'MANUAL', required
          - `ts` integer
        - `assetId` string, nullable, required: Asset ID
        - `assetSymbol` string, nullable, required: Asset symbol
        - `tokenAddress` string, required: Token contract address
        - `isSpam` boolean, required: Effective spam flag (portfolio prefs applied)
        - `stablecoinPeggedFiatCurrency` string, nullable, required: Effective stablecoin peg, if any
        - `walletName` string, required: Owning wallet name
        - `walletAddress` string, required: Owning wallet address
        - `defiOperation` string, nullable, required: DeFi operation, if any
        - `defiPositionId` string, nullable, required: DeFi position ID, if any
        - `defiPositionRef` string, nullable: Stable DeFi position reference, if any
      - `walletSource` object, nullable: Wallet-backed source metadata for row actions
        - `wallet` object, required: Public wallet identity without internal wallet IDs
          - `chainId` string, required: Public chain ID of the wallet
          - `address` string, required: Public wallet address on the chain
        - `walletType` 'BLOCKCHAIN' | 'EXCHANGE' | 'BANK', required: Wallet type
        - `rawTransactionId` string, required: Wallet transaction ID
        - `rawTransactionSource` string, required: Wallet transaction source
        - `blockHeight` string, required: Wallet transaction block height as a decimal string
        - `timestamp` string, required: Wallet transaction timestamp serialized as ISO 8601
      - `intercompanyPair` object, nullable: Intercompany pair metadata when this transaction is paired
        - `pairId` string, required: Intercompany move pair ID
        - `side` 'SEND' | 'RECEIVE', required: Whether this transaction is the sending or receiving side
        - `treatment` string, nullable, required: Applied intercompany treatment
        - `counterpartPortfolioName` string, required: Counterpart portfolio display name
        - `counterpartPortfolioSlug` string, required: Counterpart portfolio public slug
        - `counterpartPortfolioTransactionId` string, required: Counterpart portfolio transaction ID
        - `counterpartOperationType` string, required: Counterpart accounting operation type
        - `counterpartSubType` string, nullable, required: Counterpart accounting operation subtype
        - `counterpartStatus` 'PROPOSED' | 'ERROR' | 'POSTED' | 'CLOSED', required: Counterpart transaction status
        - `lotLinkCount` integer, required: Number of linked intercompany cost-basis lots
      - `portfolioTransactionContext` object, nullable: Flattened transaction context, when stored
    - `skippedRuleEvidenceTransactionViews` PortfolioTransactionResponseDto[]: Hydrated transactions aligned one-for-one with skippedRuleEvidence.
      - `id` string, required: Portfolio transaction ID
      - `operationType` string, required: Accounting operation type
      - `subType` string, nullable, required: Operation sub-type
      - `classification` object, required: Triage summary: classification state, reason, and suggested action
        - `state` 'categorized' | 'uncategorized' | 'error', required: Whether the transaction is categorized, uncategorized, or errored
        - `reason` string, nullable, required: Root failure mode (unwrapped), e.g. FmvNotAvailable; null if none
        - `detail` string, nullable, required: Human-readable detail for the primary issue, if any
        - `suggestedAction` object, nullable, required: Suggested remediation, if any
          - `tool` string, nullable, required: MCP tool to remediate with, or null if no single tool applies
          - `description` string, required: What to do to resolve it
      - `systemNotes` string, nullable, required: System-generated notes
      - `errorMessage` string, nullable, required: Legacy error message text if processing failed
      - `errorDetails` unknown[], nullable: Structured error details if processing failed
        - unknown
      - `timestamp` string, required: Transaction timestamp (ISO 8601)
      - `memo` string, nullable, required: User memo
      - `status` string, required: Transaction status
      - `tags` string[], required: Transaction tags
      - `fileAttachments` unknown[], required: Attached files metadata
        - unknown
      - `journalEntry` JournalEntryResponseDto, required
        - `id` string, required: Journal entry ID
        - `timestamp` string, required: Entry timestamp (ISO 8601)
        - `status` string, required: Journal entry status
        - `memo` string, nullable, required: User memo
        - `systemNotes` string, nullable, required: System-generated notes
        - `isAdjustment` boolean, required: Whether this is an adjustment entry
        - `portfolioTransactionId` string, nullable, required: Originating portfolio transaction ID, if any
        - `operationType` string, nullable, required: Operation type of the originating transaction
        - `subType` string, nullable, required: Operation sub-type of the originating transaction
        - `adjustmentJournalImportProvenance` object, nullable: Adjustment-import provenance with immutable file and source-row facts and the uploader's current display name, or null for a non-imported journal
          - `importRef` string, required
          - `sourceFile` object, required
            - `name` string, required
            - `uploadedAt` string, date-time, required
            - `uploader` object, required
              - …
          - `sourceRows` object[], required
            - `appliedResolutions` object, required
              - …
            - `entryId` string, required
            - `journalLineNumber` integer, required
            - `locator` union, required
              - …
            - `normalizedValues` union, required
              - …
            - `sourceRowHash` string, required
        - `lines` object[], required: Debit/credit lines, ordered by line number
          - `lineNumber` integer, required: Line ordinal within the entry
          - `entryType` string, required: DR (debit) or CR (credit)
          - `accountName` string, nullable, required: Ledger account name
          - `accountNumber` string, nullable, required: Chart-of-accounts number
          - `accountType` string, nullable: Ledger account type
          - `accountSubType` string, nullable: Ledger account sub-type
          - `accountNormalBalanceType` string, nullable: Ledger account normal balance side
          - `fiatAmount` string, required: Fiat amount (decimal string)
          - `assetId` string, nullable, required: Asset ID when the line is asset-denominated
          - `assetSymbol` string, nullable, required: Asset symbol
          - `assetAmount` string, nullable, required: Asset quantity (decimal string)
          - `memo` string, nullable, required: Line memo
          - `responsibilityCenterAssignments` object[], required: Typed responsibility-center assignments, one per dimension, ordered by type sort order
            - `responsibilityCenterTypeId` string, required: Responsibility-center type ID used by edit commands
            - `responsibilityCenterId` string, required: Responsibility-center ID used by edit commands
            - `value` string, required: Filter-options-compatible public value for this assignment
            - `responsibilityCenterType` object, required: The dimension this assignment classifies the line under
              - …
            - `responsibilityCenterName` string, required: Assigned responsibility-center name
            - `responsibilityCenterCode` string, nullable, required: Stable code of the center within its type, if any
            - `percentageBps` integer, required: Allocation in basis points (10000 = 100%)
          - `counterpartyName` string, nullable, required: Counterparty name
          - `lot` object, nullable, required: Cost-basis lot lineage when the line realizes gains/losses
            - `id` string, required: Lot identifier (e.g. BTC_001)
            - `entryId` string, required: Unique lot ledger entry ID
            - `entryKind` string, required: Lot entry kind (ADD, DSP, CUT, MVE, RES, REL)
            - `lotMethod` string, required: Lot accounting method (FIFO, LIFO, HIFO, ACB)
          - `transfer` object, nullable, required: Wallet transfer lineage when the line maps to an on-chain transfer
            - `txIndex` integer, nullable, required: Transfer index within the tx
            - `chainId` string, nullable, required: Chain ID of the transfer
            - `txHash` string, nullable, required: On-chain transaction hash
      - `walletOperations` object[], required: Wallet transfers that make up this transaction
        - `type` string, required: Transfer direction/type (e.g. IN, OUT)
        - `txHash` string, required: On-chain transaction hash
        - `chainId` string, required: Chain ID
        - `txIndex` integer, required: Transfer index within the transaction
        - `walletTransactionId` string, required: Wallet transaction handle for this operation; pair with txIndex to reference the operation in merge_transactions / split_transactions
        - `fromAddress` string, required: Sender address
        - `fromAddressLabel` string, nullable, required: Sender address label
        - `toAddress` string, required: Recipient address
        - `toAddressLabel` string, nullable, required: Recipient address label
        - `value` string, required: Human-readable transfer amount (decimal string)
        - `valueQuote` string, nullable, required: Fiat quote value (decimal string)
        - `quoteCurrency` string, nullable, required: Fiat quote currency
        - `quoteSource` string, nullable, required: Fiat quote source
        - `quoteMeta` object, nullable: Structured quote provenance, null when none is available, or temporarily omitted by an older server during a rolling deploy
          - `s` 'SYNC_SOURCE' | 'FMV_ENGINE' | 'DERIVED_REPRESENTED' | 'DERIVED_SIBLING' | 'POLICY' | 'MANUAL', required
          - `ts` integer
        - `assetId` string, nullable, required: Asset ID
        - `assetSymbol` string, nullable, required: Asset symbol
        - `tokenAddress` string, required: Token contract address
        - `isSpam` boolean, required: Effective spam flag (portfolio prefs applied)
        - `stablecoinPeggedFiatCurrency` string, nullable, required: Effective stablecoin peg, if any
        - `walletName` string, required: Owning wallet name
        - `walletAddress` string, required: Owning wallet address
        - `defiOperation` string, nullable, required: DeFi operation, if any
        - `defiPositionId` string, nullable, required: DeFi position ID, if any
        - `defiPositionRef` string, nullable: Stable DeFi position reference, if any
      - `walletSource` object, nullable: Wallet-backed source metadata for row actions
        - `wallet` object, required: Public wallet identity without internal wallet IDs
          - `chainId` string, required: Public chain ID of the wallet
          - `address` string, required: Public wallet address on the chain
        - `walletType` 'BLOCKCHAIN' | 'EXCHANGE' | 'BANK', required: Wallet type
        - `rawTransactionId` string, required: Wallet transaction ID
        - `rawTransactionSource` string, required: Wallet transaction source
        - `blockHeight` string, required: Wallet transaction block height as a decimal string
        - `timestamp` string, required: Wallet transaction timestamp serialized as ISO 8601
      - `intercompanyPair` object, nullable: Intercompany pair metadata when this transaction is paired
        - `pairId` string, required: Intercompany move pair ID
        - `side` 'SEND' | 'RECEIVE', required: Whether this transaction is the sending or receiving side
        - `treatment` string, nullable, required: Applied intercompany treatment
        - `counterpartPortfolioName` string, required: Counterpart portfolio display name
        - `counterpartPortfolioSlug` string, required: Counterpart portfolio public slug
        - `counterpartPortfolioTransactionId` string, required: Counterpart portfolio transaction ID
        - `counterpartOperationType` string, required: Counterpart accounting operation type
        - `counterpartSubType` string, nullable, required: Counterpart accounting operation subtype
        - `counterpartStatus` 'PROPOSED' | 'ERROR' | 'POSTED' | 'CLOSED', required: Counterpart transaction status
        - `lotLinkCount` integer, required: Number of linked intercompany cost-basis lots
      - `portfolioTransactionContext` object, nullable: Flattened transaction context, when stored

---

[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)
