---
title: "Update a transaction"
method: PATCH
path: "/api/transactions/{transactionId}"
tags: ["Transactions"]
---

# Update a transaction

`PATCH /api/transactions/{transactionId}`

Sparse partial update — only fields present in the body are written. Pass `null` to restore the original value (RFC 7396 semantics). Writes to transaction_edit for auditing.

## Path parameters

- `transactionId` string, uuid, required

## Request body

- object
  - `categoryId` string, uuid, nullable
  - `date` string, nullable
  - `location` TransactionLocation, nullable
    - `address` string, nullable, required
    - `city` string, nullable, required
    - `country` string, nullable, required
    - `lat` number, nullable, required
    - `lon` number, nullable, required
    - `postal_code` string, nullable, required
    - `region` string, nullable, required
    - `store_number` string, nullable, required
  - `merchantName` string, nullable
  - `name` string, nullable
  - `notes` string, nullable
  - `paymentChannel` 'in store' | 'online' | 'other' | 'null', nullable
  - `tags` string[]
  - `website` string, nullable

## Response `200`

Transaction updated

- object
  - `success` boolean, required

## Other responses

- `401` — Unauthorized
- `403` — Subscription required
- `404` — Transaction, category, or tag not found
- `422` — Validation failed

---

[API](https://skmtc.net/cobaltpf/apis/cobalt-api.md) · [All operations](https://skmtc.net/cobaltpf/apis/cobalt-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cobaltpf/cobalt-api/revisions/8ef0dfb5d23c/schema)
