# Get a ledger transaction

> The ledger.transactions.get operation: GET /api/v1/ledger/transactions/{id} in the REST API and the ledger_transactions_get tool in the MCP server.

Returns one transaction of the legal entity's ledger by its ID (`txn_…`): its `kind` and `status`, the
debit and credit `entries` with their account codes (integer micros), the totals per currency, the business
date (`effectiveAt`), the objects it is about (`links`), the `memo`, and the `actor` who posted it
(`actor.approvalId` names the approval request when a second person approved it). A transaction of another
entity or mode is `resource_not_found`.

## At a glance

- **REST:** `GET /api/v1/ledger/transactions/{id}`
- **MCP tool:** `ledger_transactions_get`
- **Operation ID:** `ledger.transactions.get`
- **Scope:** Legal entity
- **Permission:** `ledger:read`
- **Risk tier:** `read`
- **Dry run:** Not supported
- **Idempotency:** Not needed (read only)
- **Modes:** Test and live
- **Authentication:** API key with the `ledger:read` scope
- **Since:** M2

## Request

### Path parameters

| Field | Type       | Description |
| ----- | ---------- | ----------- |
| `id`  | `txn_…` ID |             |

### Query parameters

This operation takes no query parameters.

## Response

`200 OK` with a JSON object:

| Field                    | Type                                                                          | Description                                                                              |
| ------------------------ | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `id`                     | `txn_…` ID                                                                    |                                                                                          |
| `object`                 | `"ledger_transaction"`                                                        |                                                                                          |
| `entityId`               | `ent_…` ID                                                                    |                                                                                          |
| `livemode`               | boolean                                                                       |                                                                                          |
| `brandId`                | `brd_…` ID or null                                                            |                                                                                          |
| `kind`                   | one of 19 values, e.g. `topup`, `sale`, `grant` (all in the OpenAPI document) |                                                                                          |
| `status`                 | one of `pending`, `posted`, `voided`                                          |                                                                                          |
| `entries`                | array of object                                                               |                                                                                          |
| `entries[].accountId`    | `acct_…` ID                                                                   |                                                                                          |
| `entries[].accountCode`  | string                                                                        | The account's code from the chart of accounts.                                           |
| `entries[].side`         | one of `debit`, `credit`                                                      |                                                                                          |
| `entries[].amount`       | string                                                                        | Integer micros, more than zero.                                                          |
| `entries[].currency`     | string                                                                        |                                                                                          |
| `totals`                 | array of object                                                               | Debit and credit totals per currency, always equal.                                      |
| `totals[].currency`      | string                                                                        |                                                                                          |
| `totals[].debits`        | string                                                                        |                                                                                          |
| `totals[].credits`       | string                                                                        |                                                                                          |
| `effectiveAt`            | date-time                                                                     | The business date of the movement.                                                       |
| `postedAt`               | date-time or null                                                             |                                                                                          |
| `voidedAt`               | date-time or null                                                             |                                                                                          |
| `reversalOf`             | `txn_…` ID or null                                                            | The posted transaction this one reverses.                                                |
| `links`                  | object                                                                        | Objects the transaction is about, by ID.                                                 |
| `memo`                   | string                                                                        | The description; for a manual adjustment, its reason.                                    |
| `actor`                  | object                                                                        | Who posted it. `approvalId` names the approval request when a second person approved it. |
| `actor.type`             | one of `user`, `api_key`, `agent`, `app`, `system`, `public`, `customer`      |                                                                                          |
| `actor.id`               | string                                                                        |                                                                                          |
| `actor.via`              | one of `console`, `api`, `mcp`, `assistant`, `portal`, `job` or null          |                                                                                          |
| `actor.approvalId`       | string or null                                                                |                                                                                          |
| `actor.onBehalfOfUserId` | string or null                                                                |                                                                                          |
| `actor.clientId`         | string or null                                                                |                                                                                          |
| `actor.supportGrantId`   | string or null                                                                |                                                                                          |
| `createdAt`              | date-time                                                                     |                                                                                          |

## Examples

### An approved manual adjustment

```http
GET /api/v1/ledger/transactions/txn_01m4tx5nj8emwbyf7y9vcf47xg
Authorization: Bearer or_test_…
```

Response (`200`):

```json
{
  "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
  "object": "ledger_transaction",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "brandId": null,
  "kind": "adjustment",
  "status": "posted",
  "entries": [
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
      "accountCode": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
      "side": "debit",
      "amount": "1500000000",
      "currency": "EUR"
    },
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
      "accountCode": "opening_balances:EUR",
      "side": "credit",
      "amount": "1500000000",
      "currency": "EUR"
    }
  ],
  "totals": [
    {
      "currency": "EUR",
      "debits": "1500000000",
      "credits": "1500000000"
    }
  ],
  "effectiveAt": "2026-10-14T09:30:00.000Z",
  "postedAt": "2026-10-14T09:30:00.000Z",
  "voidedAt": null,
  "reversalOf": null,
  "links": {},
  "memo": "Opening bank balance from the 2026-09-30 statement",
  "actor": {
    "type": "user",
    "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
    "via": "console",
    "approvalId": "apr_01m4tx5nj8emwbyf7y9vcf47xj",
    "onBehalfOfUserId": null,
    "clientId": null,
    "supportGrantId": null
  },
  "createdAt": "2026-10-14T09:30:00.000Z"
}
```

## Errors

| Code                                                                                     | HTTP status | When                                                                       | What to do                                                                                                                                         |
| ---------------------------------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`resource_not_found`](https://ownrecord.io/docs/reference/errors.md#resource_not_found) | 404         | No transaction with this ID is in this entity's ledger in this mode.       | Check the ID and that your credentials are scoped to the right organization, entity, brand and mode.                                               |
| [`scope_required`](https://ownrecord.io/docs/reference/errors.md#scope_required)         | 400         | The request names no legal entity (an org key without `Ownrecord-Entity`). | Call the operation with credentials or a target at its level: an organization, a legal entity, a brand or the platform (`details.required_scope`). |
| [`permission_denied`](https://ownrecord.io/docs/reference/errors.md#permission_denied)   | 403         | You can't see this entity's ledger (brand-scoped members never can).       | Ask an organization owner or admin for a role or scope that allows this action.                                                                    |

It can also return these [common errors](https://ownrecord.io/docs/reference.md#common-errors): [`validation_failed`](https://ownrecord.io/docs/reference/errors.md#validation_failed), [`api_version_unsupported`](https://ownrecord.io/docs/reference/errors.md#api_version_unsupported), [`authentication_required`](https://ownrecord.io/docs/reference/errors.md#authentication_required), [`api_key_invalid`](https://ownrecord.io/docs/reference/errors.md#api_key_invalid), [`dry_run_not_supported`](https://ownrecord.io/docs/reference/errors.md#dry_run_not_supported), [`rate_limited`](https://ownrecord.io/docs/reference/errors.md#rate_limited), [`internal_error`](https://ownrecord.io/docs/reference/errors.md#internal_error).
