zoho_categorize_bank_txn
Categorizes uncategorized bank-feed lines in place, clearing the queue without creating duplicate transactions. Automatically derives amount, date, and maps the offset account for deposits, expenses, or payments.
Instructions
Categorize an uncategorized bank-feed line IN PLACE (clears the feed queue without creating a parallel transaction). Route: POST /banktransactions/uncategorized/{transaction_id}/categorize (generic types) or .../categorize/{categorize_as} (expenses|customerpayments|vendorpayments). CONVENIENCE: pass offset_account_id (the non-bank side) and the wrapper maps it to the right field — for a money-IN deposit type it becomes from_account_id (credited) with to_account_id = the bank (debited); for categorize_as=expenses it becomes account_id with paid_through_account_id = the bank. amount/date and the bank account are AUTO-DERIVED from the feed line when omitted (pass bank_account_id to make that list lookup reliable). VERIFIED: owner contribution -> transaction_type='deposit', offset_account_id=; bank fee -> categorize_as='expenses', offset_account_id=. NOTE: offset auto-mapping assumes money-IN; for money-OUT/other directions pass explicit from_account_id/to_account_id/account_id or a full body. Gated by ZOHO_ALLOW_WRITES; Zoho's response is returned verbatim on error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Additional payload fields, merged last (highest precedence). | |
| date | No | YYYY-MM-DD. Optional — auto-derived from the feed line if omitted. | |
| amount | No | Optional — auto-derived from the feed line if omitted. | |
| account_id | No | Explicit override. | |
| categorize_as | No | Module-specific sub-endpoint. | |
| to_account_id | No | Explicit override (the bank for deposits). | |
| transaction_id | Yes | The uncategorized feed line id. | |
| bank_account_id | No | The feed line's bank account. Optional — auto-derived from the line if omitted; passing it makes amount/date lookup reliable. | |
| from_account_id | No | Explicit override (offset/source for deposits). | |
| transaction_type | No | Generic type, e.g. deposit, owner_contribution, interest_income, other_income. | |
| offset_account_id | No | The non-bank account (equity for a contribution, expense account for an expense). Auto-mapped to the correct field. | |
| paid_through_account_id | No | Explicit override (the bank for expenses). |