---
title: "Book a transaction a Plaid takeover held unbooked"
method: POST
path: "/accountant/companies/{customerId}/integrations/plaid/{integrationId}/takeover-holds/{plaidTransactionId}/book"
tags: ["Accountant Portal"]
---

# Book a transaction a Plaid takeover held unbooked

`POST /accountant/companies/{customerId}/integrations/plaid/{integrationId}/takeover-holds/{plaidTransactionId}/book`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/integrations/plaid/{integrationId}/takeover-holds/{plaidTransactionId}/book`
- Auth: HTTP bearer

#3361. When a new Plaid Item takes a bank account over from a connection that is no longer connected, a transaction in the old connection's booked window that matches none of its booked rows is held unbooked: while Plaid is still loading the Item's history and the old connection still has unmatched rows (#3687), when one of them could be the same transaction changed, or when it is dated in a closed month. This books the held transaction through the normal import path, from the transaction Plaid reported and its stored raw record, posts its journal entry, removes the hold and writes an audit_logs row (action `plaid_takeover_hold.booked`). While the history is still loading, a reason is required and a `plaid_takeover_hold.early_booking_requested` row (actor, reason, candidates, outcome pending) is written before anything is booked; the outcome follows as a second row. The checks and the booking run under the company's Plaid account-discovery lock, which a bank link holds while it moves bank accounts, so a link cannot take the account over in between. Human accountants only; the assignment is re-read before the write.

## Path parameters

- `customerId` string, uuid, required
- `integrationId` string, uuid, required
- `plaidTransactionId` string, required

## Request body

- object
  - `reason` string: Why it is booked. Required (10 characters or more, trimmed) while Plaid's history is still loading (#3687): the hold could still be a possible duplicate of an unmatched old row, so the booking is audited before it is made.

## Response `200`

The booked transaction

- object
  - `success` true, required
  - `data` object, required
    - `plaidTransactionId` string, required
    - `status` 'booked', required
    - `transactionId` string, uuid, required
    - `occurredOn` string, date, required
    - `amountCents` integer, required
    - `currency` string, required
    - `direction` 'in' | 'out', required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Not this customer's Plaid connection (PLAID_CONNECTION_NOT_FOUND)
- `409`: The transaction is already booked (PLAID_TAKEOVER_HOLD_ALREADY_BOOKED), no longer held (PLAID_TAKEOVER_HOLD_GONE), dismissed (PLAID_TAKEOVER_HOLD_DISMISSED) or being booked (PLAID_TAKEOVER_HOLD_BOOKING); the hold is closed because its connection no longer feeds the bank account: disconnected, its Item gone at Plaid, or the account taken over by another link (PLAID_TAKEOVER_HOLD_SUPERSEDED; the connection's open holds there are closed with it); its stored record does not match what Plaid reported (PLAID_TAKEOVER_HOLD_RAW_CONFLICT); or the normal import path refused the posting (CONFLICT, for example a GL account that no longer fits its mapping). After a raw-record conflict or an import refusal the hold is kept, unbooked. Also, with nothing changed and a retry expected: PLAID_TAKEOVER_HOLD_CONNECTION_PAUSED while the connection is paused but not retired (it waits for the customer to classify a newly shared account or to re-authenticate; its holds are decided once it syncs again), and PLAID_ACCOUNT_DISCOVERY_BUSY when a bank link for the company held the account-discovery lock for longer than the wait.
- `422`: Invalid path parameters or body; a reason missing or shorter than 10 characters while Plaid's history is still loading; or the normal import path refused the transaction: its bank account is not mapped to a GL account (PLAID_TAKEOVER_HOLD_ACCOUNT_UNMAPPED), it is a personal bank account (PERSONAL_BANK_ACCOUNT_EXCLUDED), or another rule refused it (BUSINESS_RULE_VIOLATION, for example a GL account that cannot be posted to, or a bank account or legal-entity source that is unavailable). The hold is kept, unbooked. Also refused when the transaction is dated before the books start: the QuickBooks posting cutoff or the day after the last filing-locked period (PLAID_TAKEOVER_HOLD_BEFORE_BOOKS_START, #3682); the connection's next sync closes that hold and keeps the raw record.
- `500`: While Plaid's history is still loading, the audit row of the booking could not be written first; nothing was booked
- `503`: The accountant assignment could not be re-read before the write, or the normal import path could not read a policy it needs (SERVICE_UNAVAILABLE). The hold is kept, unbooked; retry.

## Changes

- **2026-10-29** `36b2edd65af0`: 2 info
  - added optional request body
  - added the non-success response with the status `500`
- **2026-10-24** `9a9df32135c4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/integrations/plaid/:integrationId/takeover-holds/:plaidTransactionId/book/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)
