Skills › Utility
Surface Trial-Balance Rows That Share an ``account_number``
POST/api/v1/skills/detect.tb.duplicates/invoke
Scans the trial balance
rows you supply and returns those that share an account code with another row that has a balance. Each returned row carries conflict_codes and conflict_count. Zero-balance rows are ignored, so a dormant account never flags a live one.Body parameters
rowsarray of objects
Trial balance rows to scan, each with code, name, section, debit and credit (amounts as numbers).
Returns
Skill executed successfully
skillstringRequired
Example detect_tb_duplicates
outputobjectRequired
Envelope for
detect_tb_duplicates output — the conflict subset
with conflict_codes + conflict_count added per row.output.stub_fieldsarray of strings
output.warningsarray of strings
output.duplicatesarray of objects
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/detect.tb.duplicates/invoke \ -X POST \ -H "Authorization: Bearer sk_..." \ -H "Content-Type: application/json" \ -d '{ "rows": [ {} ] }'
from heyarchie import Archie archie = Archie(api_key="sk_...") result = archie.skills.invoke( "detect.tb.duplicates", rows=[{}], ) print(result)
import { Archie } from "heyarchie";
const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("detect.tb.duplicates", {
"rows": [
{}
]
});
console.log(result);Response
{
"skill": "detect_tb_duplicates",
"output": {
"duplicates": [
{
"code": "4000",
"conflict_codes": [
"4000"
],
"conflict_count": 2,
"credit": 125000,
"debit": 0,
"name": "Sales",
"section": "Revenue"
},
{
"code": "4000",
"conflict_codes": [
"4000"
],
"conflict_count": 2,
"credit": 18400,
"debit": 0,
"name": "Sales - online",
"section": "Revenue"
}
]
},
"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.