---
title: "Get raw merchant patterns for agent-side classification"
method: GET
path: "/api/onboarding/agent/transactions"
---

# Get raw merchant patterns for agent-side classification

`GET /api/onboarding/agent/transactions`

## Request

- Base URL: `https://app.rightmoney.com`
- URL: `https://app.rightmoney.com/api/onboarding/agent/transactions`
- Auth: API key in header `X-RM-Agent-Key`

Returns unclassified transactions grouped by merchant pattern. The calling AI agent classifies each merchant into a bucket (bills, lifestyle, income, ignore) and submits results via POST /api/onboarding/agent/confirm with a classifications array. Falls back to backend classification recommended when >100 merchant patterns.

## Query parameters

- `userId` string, uuid, required

## Response `200`

Merchant patterns for classification

- TransactionsResponse
  - `userId` string, uuid, required
  - `transactionCount` integer, required: Total number of transactions in the date range
  - `merchantCount` integer, required: Number of unique merchant patterns
  - `dateRange` object, nullable
    - `start` string, date
    - `end` string, date
  - `merchants` object[], required
    - `pattern` string: Normalized merchant pattern
    - `displayName` string
    - `totalAmount` number
    - `transactionCount` integer
    - `avgAmount` number
    - `direction` 'inflow' | 'outflow'
    - `sampleDates` string[]
    - `suggestedBucket` string, nullable
  - `buckets` string[], required: Valid bucket values
  - `fallbackRecommended` boolean: True if >100 merchant patterns — recommend backend classification instead
  - `instructions` string: Classification guidance for the AI agent

## Other responses

- `400`: Invalid request
- `401`: Invalid or missing API key
- `503`: Database not configured

---

[API](https://skmtc.dev/rightmoney/apis/right-money-agent-api.md) · [All operations](https://skmtc.dev/rightmoney/apis/right-money-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rightmoney/apis/right-money-agent-api/revisions/244b5180a5ff?raw)
