---
title: "Update Transaction Category"
method: PATCH
path: "/api/banking/transactions/{transaction_id}/category"
tags: ["Banking"]
---

# Update Transaction Category

`PATCH /api/banking/transactions/{transaction_id}/category`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/banking/transactions/{transaction_id}/category`
- Auth: HTTP bearer

Reassign a transaction's category and optionally create a merchant→category
override so future transactions from the same merchant are auto-categorised.

The write itself goes through app.services.category_updates so the
adviser recategorisation endpoint shares the exact same pathway.

## Path parameters

- `transaction_id` string, uuid, required

## Request body

- UpdateCategoryRequest
  - `category` string, required
  - `scope` 'merchant' | 'merchant_all' | 'transaction'

## Response `200`

Successful Response

- UpdateCategoryResponse
  - `transaction_id` string, required
  - `old_category` string, nullable, required
  - `new_category` string, required
  - `merchant_name` string, nullable, required
  - `override_created` boolean, required
  - `retro_updated` integer

## Other responses

- `422`: Validation Error

---

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