Invoke Skill Enrich Tb Rows
post
/api/v1/skills/enrich.tb.rows/invoke(Utility) Enrich a trial balance with auto-renumber + classification. Operates on alpha's canonical TB-row dict shape (``{code, name, section, debit, credit}``) and CoA-row dict shape (``{account_id, code, name, type, balance}``). Adds ``classification`` β ``ok|auto_renumbered|dropped|needs_manual_review``, assigns Maginot-style numbers (1xxx Assets / 2xxx Liabilities / ...) to rows missing a code, flags duplicate-code collisions for manual review, drops zero-balance rows. Pure compute β same input always produces identical output. Does NOT re-implement the balance check; that remains inline at the 5 existing sites.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
tb_rows | object[] | βitem shapeEmpty object. |
coa_rows | object[] | βitem shapeEmpty object. |
Responses
200Skill executed successfully
| Field | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
skillrequired | string | β | ||||||||||||
outputrequired | object | Envelope for ``enrich_tb_rows`` output β same dict shape as input
rows with added ``classification`` / ``original_code`` /
``auto_assigned_code`` / ``drop_reason`` keys.show nested
| ||||||||||||
correlation_idrequired | string | β |
401Authentication required
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
403Insufficient permissions
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
404Skill not found
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
429Rate limit exceeded
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
5XXInternal server error
| Field | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errorrequired | object | βshow nested
|
curl https://api.dev.arch.ie/api/v1/skills/enrich.tb.rows/invoke \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"tb_rows": [
{}
],
"coa_rows": [
{}
]
}'