How to use Lean's Categorisation
The categorisation product provides a category for each transaction that you retrieve from your customer's bank account. The list of categories are the following:
| Category | Description |
|---|---|
| BANK_FEES_AND_CHARGES | Transactions relating to bank fees and charges |
| CHARITY | Transactions relating to charitable causes |
| EDUCATION | Transactions relating to education, e.g.: school, university, courses |
| ENTERTAINMENT | Transactions relating to entertainment, e.g.: cinema, Netflix |
| GOVERNMENT | Transactions relating to government, e.g.: taxes, fines |
| GROCERIES | Transactions relating to food shopping |
| HEALTH_AND_WELLBEING | Transactions relating to health, e.g.: prescriptions, wellbeing, yoga |
| LOANS_AND_INVESTMENT | Transactions relating to loans and investments, e.g.: dividends, loan repayments |
| RENT_AND_SERVICES | Transactions relating to household utilities and rent |
| RESTAURANTS_DINING | Transactions relating to dining and takeaways |
| RETAIL | Transactions relating to shopping |
| SALARY_AND_REVENUE | Transactions relating to income sources |
| TRANSFER | Transactions relating to direct money movements, e.g.: transfers, cash withdrawals |
| TRANSPORT | Transactions relating to domestic travel, e.g.: metro, cabs |
| TRAVEL | Transactions relating to international travel, e.g.: hotels, flights |
| OTHER | Transactions which could not be accurately classified |
How to use it
The categorisation product is NOT a separate API. You can retrieve the categories for the transactions for your customer's by making an API request to the Get Transactions API with insights=true. This will return an object that contains a cleansed description, the category and the category confidence (i.e.: how certain Lean is that the transaction belongs to that category).
{
"status": "OK",
"results_id": "7cc5db4f-6a74-44ad-85f0-bc86b4608b2f",
"message": "Data successfully retrieved",
"meta": null,
"timestamp": "2025-12-29T14:24:17.488050209Z",
"status_detail": null,
"data": {
"transactions": [
{
"entity_id": "d1b13519-ad7b-46a8-bf32-1f9bd97a3dec",
"account_id": "1f11ff53-04ba-4911-8adf-1769029460b7",
"transaction_id": "402cc78a-9df0-4a5b-be13-18efd3cbd5b9",
.... additional transaction fields
"insights": {
"description_cleansed": "LOCAL TRANSFER MERU LABS FZE",
"category": "TRANSFER",
"category_confidence": 0.94
},
}]
}
}
Updated 2 days ago
