---
title: "Exclude a transaction (PG-p08-014)"
method: POST
path: "/accountant/companies/{customerId}/transactions/{transactionId}/exclude"
tags: ["Accountant Portal"]
---

# Exclude a transaction (PG-p08-014)

`POST /accountant/companies/{customerId}/transactions/{transactionId}/exclude`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/transactions/{transactionId}/exclude`
- Auth: HTTP bearer

A signed-in accountant excludes a bank row (every API key, the service token included, is refused: 404). The row stays listed, never deleted, with metadata.exclusion = {reason, note, byUserId, at, previousStatus, voidedJournalEntryIds, reversalPartnerId?} and status categorized; its posted journal entries are voided (adjustment reason transaction_excluded:<reason>), open transfer matches are rejected, one audit row is written per row and the GL balance cache is rebuilt, all in one database transaction; nothing posts for it while excluded, and it leaves the "Not posted yet" filter and the review counts. Reasons (Lead ruling, #2587): duplicate, one row; reversed_by_bank, with partnerTransactionId, the charge and its reversal together (same bank account, equal amount, opposite direction; one side alone 422 REVERSAL_PARTNER_REQUIRED or REVERSAL_PARTNER_MISMATCH), both leaving the bank-side reconciliation; personal, only on a personal bank account (on a business account 422 PERSONAL_CHARGE_REQUIRES_OWNERS_DRAW: recategorize it to Owner's Draw or Due from Owner instead, so the bank still ties to its statement). Refused: an excluded row (409 TRANSACTION_ALREADY_EXCLUDED), a reconciled row or entry (422), a row or entry in a closed or filing-locked period (422 TRANSACTION_EXCLUSION_PERIOD_CLOSED / _LOCKED), a document-matched row, an applied transfer match or an entry shared with another source (409), another writer holding the month (409 WRITER_LOCK_HELD).

## Path parameters

- `customerId` string, uuid, required
- `transactionId` string, uuid, required

## Request body

- object
  - `reason` 'personal' | 'duplicate' | 'reversed_by_bank', required
  - `note` string
  - `partnerTransactionId` string, uuid: reversed_by_bank only, and required there: the other side.

## Response `200`

The excluded rows, the entries voided and the transfer matches rejected

- object
  - `success` true, required
  - `data` object, required
    - `transactions` Transaction[], required
      - `journalEntry` object, nullable: Detail response only. List responses do not load journal lines and may return null even when a posted entry exists. Use the transaction detail endpoint to inspect posting; a list null is not evidence of missing accounting.
        - `id` string, uuid
        - `status` string
        - `currency` string
        - `minorUnitExponent` integer
        - `lines` object[]
          - `glAccountId` string, uuid
          - `accountName` string
          - `debitCents` integer
          - `creditCents` integer
      - `journalEntryUnavailableReason` 'scope_mismatch' | 'ambiguous_posting': Detail responses only. Present when `journalEntry` is null although an entry is linked.
      - `matchedDocumentUnavailableReason` 'scope_mismatch': Detail responses only. Present when `matchedDocument` is null although a document is matched.
      - `id` string, uuid
      - `companyId` string, uuid
      - `entityId` string, uuid
      - `occurredOn` string, date
      - `description` string
      - `merchant` string, nullable
      - `amountCents` integer
      - `currency` string
      - `direction` 'in' | 'out'
      - `status` 'needs_review' | 'categorized'
      - `categoryGlAccountId` string, uuid, nullable
      - `classId` string, uuid, nullable
      - `className` string, nullable
      - `hasReceipt` boolean
      - `bankAccountId` string, uuid, nullable
      - `merchantName` string, nullable
      - `notes` string, nullable
      - `isSplit` boolean
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
    - `voidedJournalEntryIds` string[], required
    - `rejectedTransferMatchIds` string[], required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: Request conflicts with the durable onboarding state
- `422`: Request failed validation

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/transactions/:transactionId/exclude/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
