---
title: "Improve transaction categorization"
method: POST
path: "/categories/learn"
tags: ["Categories"]
---

# Improve transaction categorization

`POST /categories/learn`

Your customers can change the category of some of their transactions, thus improving the categorization accuracy.

## Request body

- CategoriesRequestBody
  - `data` object
    - `customer_id` string, required — the `id` of the customer received from [customer create](#customers-create). This field is optional for ['app' authentication](/general/v5/#services_and_apps_authentication).
    - `transactions` object[], required
      - `id` string, required — the `id` of the transaction
      - `category_code` string, required — the new category code of the transaction
      - `immediate` boolean — If sent as `false`, the learning threshold of the categorizer will be applied - the categorizer will store information about the user's custom category for the transaction with this description. In case the categorizer identifies that the category has been updated 3 times for the transaction with this description, further transactions with this description will be automatically categorized for this user under this category. If sent as `true`, the learning threshold of the categorizer will be ignored and further transactions with the same description will be classified under the category chosen by the user.

## Response `200`

OK

- LearnCategoryResponse
  - `data` object
    - `learned` boolean

## Other responses

- `400` — We have received some other request format instead of JSON, or the body could not be parsed

---

[API](https://skmtc.net/saltedge/apis/salt-edge-account-information-api.md) · [All operations](https://skmtc.net/saltedge/apis/salt-edge-account-information-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/saltedge/salt-edge-account-information-api/versions/f18f4f36d0b3/schema)
