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

# Get transaction by ID

`GET /transactions/{id}`

## Request

- Base URL: `http://localhost:3001`
- URL: `http://localhost:3001/transactions/{id}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Retrieves a single transaction by its ID

## Path parameters

- `id` string, required

## Response `200`

Transaction retrieved successfully

- object
  - `data` TransactionResponseDto
    - `id` string, required: Unique identifier for the transaction
    - `type` 'expense' | 'transfer' | 'income', required: Type of transaction
    - `groupId` string, required: Group ID this transaction belongs to
    - `groupName` string: Name of the group
    - `description` string, required: Description of the transaction
    - `amount` number, required: Total amount of the transaction
    - `currency` string, required: Currency code
    - `createdBy` string, required: User ID who created this transaction
    - `recurringExpenseId` string: Recurring expense ID if created by a recurring rule
    - `categoryId` string: Category ID
    - `categoryName` string: Category name
    - `categoryIcon` string: Category icon
    - `categoryColor` string: Category color
    - `transactionDate` string, required: Date of the transaction (date-only, YYYY-MM-DD)
    - `createdAt` string, required: Creation timestamp (ISO string)
    - `updatedAt` string, required: Last update timestamp (ISO string)
    - `participants` TransactionParticipantResponseDto[], required: List of transaction participants
      - `userId` string, required: User ID of the participant
      - `displayName` string, required: Display name of the participant
      - `avatarUrl` string: Avatar URL of the participant
      - `amount` number, required: Amount attributed to this participant (absolute value)
      - `role` 'payer' | 'recipient' | 'from' | 'to', required: Role of the participant in the transaction
    - `splitConfig` TransactionSplitConfigResponseDto, required
      - `payersSplitMode` 'evenly' | 'amount' | 'parts', required: Split mode for payers
      - `recipientsSplitMode` 'evenly' | 'amount' | 'parts', required: Split mode for recipients
      - `participantConfigs` TransactionSplitParticipantConfigResponseDto[], required: Participant configuration entries
        - `id` string, required: Participant split config ID
        - `splitConfigId` string, required: Parent split configuration ID
        - `userId` string, required: User ID of the configured participant
        - `role` 'payer' | 'recipient', required: Role of the participant
        - `fixedAmount` number: Fixed amount assigned to the participant
        - `parts` number: Number of parts assigned to the participant
        - `isAutoCalculated` boolean, required: Whether this amount was auto-calculated
  - `success` boolean
  - `message` string

## Other responses

- `400`: Bad Request - Invalid input or validation failed
- `401`: Unauthorized - Authentication required or invalid token
- `403`: Forbidden - Insufficient permissions to access this resource
- `404`: Not Found - The requested resource does not exist
- `500`: Internal Server Error - An unexpected error occurred

---

[API](https://skmtc.dev/spliteo/apis/spliteo-api.md) · [All operations](https://skmtc.dev/spliteo/apis/spliteo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spliteo/apis/spliteo-api/revisions/bd9b84f4e407?raw)
