---
title: "Update transaction"
method: PUT
path: "/transactions/{idTransaction}"
tags: ["Transactions"]
---

# Update transaction

`PUT /transactions/{idTransaction}`

## Request

- Base URL: `https://api.toriihq.com/v1.0`
- URL: `https://api.toriihq.com/v1.0/transactions/{idTransaction}`
- Auth: API key in header `Authorization`

Set `idApp` to match a transaction to an app (this marks it `mapped`); pass `idApp: null` to unmatch.<br/><br/>Set `mappingStatus: "archived"` to archive a transaction. Archived transactions are not returned by `GET /transactions`.<br/><br/>To unmatch and reset the status, send both `idApp: null` and `mappingStatus: "unknown"`.<br/><br/>`amount.value` is in minor currency units (e.g., cents) and overrides the original amount; the currency is unchanged.<br/><br/>`transactionDate` overrides the transaction date (ISO 8601, e.g. `2022-02-03`).<br/><br/>Returns only the fields affected by the update (`id`, `idApp`, `mappingStatus`, `transactionDate`).<br/><br/>
<p><ul><li>Rate limit: 100 requests per minute</li></ul></p>

## Path parameters

- `idTransaction` integer, required

## Request body

- UpdateTransaction: Fields to update. At least one field is required.
  - `idApp` integer: App to match the transaction to. Pass `null` to unmatch. Setting an app marks the transaction `mapped`.
  - `mappingStatus` 'archived' | 'unknown' | 'ignored': New mapping status. `archived` archives the transaction; `unknown`/`ignored` unmatch it. To match a transaction to an app, set `idApp` instead (this marks it `mapped`).
  - `transactionDate` string, date-time: Date of the transaction
  - `amount` UpdateTransactionAmount: Set a corrected transaction amount. Only `value` is writable; the currency is unchanged.
    - `value` integer, required: Corrected amount in minor currency units (e.g., cents). Overrides the original amount.

## Response `200`

Updated transaction

- Model125: Updated transaction
  - `transaction` UpdatedTransaction
    - `id` integer: Unique identifier
    - `idApp` integer: Unique app identifier
    - `mappingStatus` 'ignored' | 'recommend_ignore' | 'recommend_map' | 'unknown' | 'mapped' | 'archived': Mapping status of the transaction
    - `transactionDate` string, date-time: Date of the transaction

---

[API](https://skmtc.dev/toriihq/apis/torii-api-documentation.md) - [All operations](https://skmtc.dev/toriihq/apis/torii-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/toriihq/apis/torii-api-documentation/revisions/15fd1512591b?raw)
