---
title: "Update companies transactions"
method: PATCH
path: "/accountant/companies/{customerId}/transactions/{transactionId}"
tags: ["Accountant Portal"]
---

# Update companies transactions

`PATCH /accountant/companies/{customerId}/transactions/{transactionId}`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/transactions/{transactionId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Generated minimal contract (#1940): parameters, auth, and status codes are authoritative; see the route handler for the exact body/response shape. Enrichment tracked by the x-median-spec-stage marker.

## Request body

- object

## Response `200`

Success envelope; see the route handler for the payload shape

- object

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `422`: Validation or business rule error; nothing is written. `error.title` carries the rule: `TRANSACTION_CATEGORY_IS_BANK_ACCOUNT` (the category is the GL account of the transaction's own bank or card account), `TRANSACTION_APPLIED_TRANSFER_MATCH_ACTIVE` (the journal entry is consolidated with another transaction; unmatch first), `TRANSACTION_BANK_OFFSET_UNIDENTIFIED` (the journal entry debits and credits one account; run the bank-offset repair first). Also returned, with no `error.title` code, when the body sets `categoryGlAccountId` on a Stripe revenue row (an inbound Stripe charge, invoice payment or subscription payment, or a row with categorizationSource stripe_counterparty_history): a category set here would not write the merchant rule its Stripe revenue entry needs, so the revenue would stay held. Two exceptions are let through: the row is already categorized on that account (nothing changes), or the row was categorized by hand (categorizationSource manual) and the new account is a usable Stripe revenue account of the company, in which case the row's own category is its revenue authority and stays so. Otherwise use POST .../transactions/{transactionId}/approve or .../transactions/bulk-recategorize instead (#3039).

---

[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/20090ea32b0d?raw)
