---
title: "Get a transaction by ID"
method: GET
path: "/companies/{companyId}/transactions/{id}"
tags: ["Transactions"]
---

# Get a transaction by ID

`GET /companies/{companyId}/transactions/{id}`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/transactions/{id}`
- Auth: HTTP bearer

Returns the transaction with enrichment fields: `journalEntry` (the single posted, non-deleted GL entry linked to the transaction and owned by its legal entity, with balanced debit/credit lines, or null), and `matchedDocument` (the matched receipt/bill owned by the transaction's legal entity, or null). When a linked entry or document is withheld, `journalEntryUnavailableReason` / `matchedDocumentUnavailableReason` says why (`scope_mismatch`: owned by another entity; `ambiguous_posting`: more than one posted entry links to the transaction); absent means nothing is linked. All other fields are unchanged.

## Response `200`

Transaction found

- TransactionResponse
  - `success` boolean
  - `data` Transaction
    - `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

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Transaction not found

---

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