# Classify a Financial Transaction to Chart-Of-Accounts Code

> Suggests the chart-of-accounts code for a single transaction, so an accountant can code bank-feed lines quickly and consistently. It needs the…

POST /api/v1/skills/transactions.classify/invoke

Suggests the chart-of-accounts code for a single transaction, so an accountant can code bank-feed lines quickly and consistently. It needs the description and amount, and accepts a currency, transaction date and vendor to sharpen the answer. It returns the account code and name, a confidence score, alternative codes and the tax code, and it never posts anything.

Body parameters

description string Required

Bank-feed or invoice text that describes the transaction.

amount number or string Required

Transaction amount in the transaction currency.

currency string · default AUD

Transaction currency as an ISO 4217 currency code.

transaction_date string · date

Date of the transaction as an ISO 8601 date.

vendor string

Name of the vendor or counterparty, when it is known.

Returns

Skill executed successfully

skill string Required

Example classify_transaction

output object Required

output.stub_fields array of strings

output.warnings array of strings

output.account_code string · default

output.account_name string · default

output.confidence number · default 0

output.alternatives array of values

output.tax_code string

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Previous ← Suggest Month-End Accruals](https://heyarchie.com/en-gb/developers/api-reference/transactions/suggest-month-end-accruals/)

```
curl https://uk.heyarchie.com/api/v1/skills/transactions.classify/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "description": "string",
       "amount": null,
       "currency": "string",
       "transaction_date": null,
       "vendor": null
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "transactions.classify",
    description="string",
    amount=None,
    currency="string",
    transaction_date=None,
    vendor=None,
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("transactions.classify", {
  "description": "string",
  "amount": null,
  "currency": "string",
  "transaction_date": null,
  "vendor": null
});
console.log(result);
```

Response

```
{
  "skill": "classify_transaction",
  "output": {
    "account_code": "6420",
    "account_name": "Office supplies",
    "confidence": 0.92,
    "tax_code": "GST on Expenses"
  },
  "correlation_id": "<string>"
}
```

```
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
```

Every response also carries X-Request-ID. Quote it if you write to us about a call.
