---
title: "Get transactions"
method: GET
path: "/plans/{plan_id}/transactions"
tags: ["Transactions"]
---

# Get transactions

`GET /plans/{plan_id}/transactions`

Returns plan transactions, excluding any pending transactions

## Path parameters

- `plan_id` string, required

## Query parameters

- `since_date` string, date
- `until_date` string, date
- `type` 'uncategorized' | 'unapproved'
- `last_knowledge_of_server` integer

## Response `200`

The list of requested transactions

- TransactionsResponse
  - `data` object, required
    - `transactions` TransactionDetail[], required
      - `id` string, required
      - `date` string, date, required — The transaction date in ISO format (e.g. 2016-12-01)
      - `amount` integer, required — The transaction amount in milliunits format
      - `memo` string, nullable
      - `cleared` 'cleared' | 'uncleared' | 'reconciled', required — The cleared status of the transaction
      - `approved` boolean, required — Whether or not the transaction is approved
      - `flag_color` 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | '' | 'null', nullable — The transaction flag
      - `flag_name` string, nullable — The customized name of a transaction flag
      - `account_id` string, uuid, required
      - `payee_id` string, uuid, nullable
      - `category_id` string, uuid, nullable
      - `transfer_account_id` string, uuid, nullable — If a transfer transaction, the account to which it transfers
      - `transfer_transaction_id` string, nullable — If a transfer transaction, the id of transaction on the other side of the transfer
      - `matched_transaction_id` string, nullable — If transaction is matched, the id of the matched transaction
      - `import_id` string, nullable — If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
      - `import_payee_name` string, nullable — If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules
      - `import_payee_name_original` string, nullable — If the transaction was imported, the original payee name as it appeared on the statement
      - `debt_transaction_type` 'payment' | 'refund' | 'fee' | 'interest' | 'escrow' | 'balanceAdjustment' | 'credit' | 'charge' | 'null', nullable — If the transaction is a debt/loan account transaction, the type of transaction
      - `deleted` boolean, required — Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
      - `amount_formatted` string — The transaction amount formatted in the plan's currency format
      - `amount_currency` number, double — The transaction amount as a decimal currency amount
      - `account_name` string, required
      - `payee_name` string, nullable
      - `category_name` string, nullable — The name of the category. If a split transaction, this will be 'Split'.
      - `subtransactions` SubTransaction[], required — If a split transaction, the subtransactions.
        - `id` string, required
        - `transaction_id` string, required
        - `amount` integer, required — The subtransaction amount in milliunits format
        - `memo` string, nullable
        - `payee_id` string, uuid, nullable
        - `payee_name` string, nullable
        - `category_id` string, uuid, nullable
        - `category_name` string, nullable
        - `transfer_account_id` string, uuid, nullable — If a transfer, the account_id which the subtransaction transfers to
        - `transfer_transaction_id` string, nullable — If a transfer, the id of transaction on the other side of the transfer
        - `deleted` boolean, required — Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
        - `amount_formatted` string — The subtransaction amount formatted in the plan's currency format
        - `amount_currency` number, double — The subtransaction amount as a decimal currency amount
    - `server_knowledge` integer, required — The knowledge of the server

## Other responses

- `400` — An error occurred
- `404` — No transactions were found

---

[API](https://skmtc.dev/ynab/apis/ynab-api-endpoints.md) · [All operations](https://skmtc.dev/ynab/apis/ynab-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ynab/ynab-api-endpoints/revisions/da7a78345b34/schema)
