---
title: "Categorize transaction"
method: PATCH
path: "/transactions/{transactionId}/relationships/category"
tags: ["Categories"]
---

# Categorize transaction

`PATCH /transactions/{transactionId}/relationships/category`

Updates the category associated with a transaction. Only transactions
for which `isCategorizable` is set to true support this operation. The
`id` is taken from the list exposed on `/categories` and cannot be one of
the top-level (parent) categories. To de-categorize a transaction, set
the entire `data` key to `null`. An HTTP `204` is returned on success.
The associated category, along with its request URL is also exposed via
the `category` relationship on the transaction resource returned from
`/transactions/{id}`.

## Path parameters

- `transactionId` string, required

## Request body

- UpdateTransactionCategoryRequest — Request to update the category associated with a transaction.
  - `data` CategoryInputResourceIdentifier, required — Uniquely identifies a category in the API.
    - `type` string, required — The type of this resource: `categories`
    - `id` string, required — The unique identifier of the category, as returned by the `/categories` endpoint.

## Response `204`

Successful Response

## Changes

- **2022-01-13** (v1) `7a339713f564` — 1 info
  - endpoint added
- **2020-07-21** (v1) `2ac77a5de971` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/up-banking/apis/up-api/changes/transactions/:transactionId/relationships/category/patch.md)

---

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