Skills › Transactions
Classify a Financial Transaction to Chart-Of-Accounts Code
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
descriptionstringRequired
Bank-feed or invoice text that describes the transaction.
amountnumber or stringRequired
Transaction amount in the transaction currency.
currencystring · default AUD
Transaction currency as an ISO 4217 currency code.
transaction_datestring · date
Date of the transaction as an ISO 8601 date.
vendorstring
Name of the vendor or counterparty, when it is known.
Returns
Skill executed successfully
skillstringRequired
Example classify_transaction
outputobjectRequired
output.stub_fieldsarray of strings
output.warningsarray of strings
output.account_codestring · default
output.account_namestring · default
output.confidencenumber · default 0
output.alternativesarray of values
output.tax_codestring
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALID Authentication required
403PERMISSION.CAPABILITY_DENIED Insufficient permissions
404SKILL.NOT_FOUND Skill not found
422VALIDATION.INVALID_FORMAT Validation error
429RATE_LIMIT.USER Rate limit exceeded
5XXINTERNAL.UNKNOWN Internal server error
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>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"retry_after_seconds": "<integer>"
}
}{
"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.