Treasury accounts
A bank, cash, card, credit, or loan account with its own currency and balance.
Fields
The API name is what the API, MCP and the CLI use.
| Name | API name | Type | Required | Description |
|---|---|---|---|---|
| ID | id | Record ID | Yes | |
| Name | label | Text | Yes | |
| Code | code | Text | Yes | Internal code. This is not the bank account number. |
| Ledger account | accountingledgeraccountId | Reference | ||
| Quote currency | currency | Constant | Yes | Currency of this account. Cannot change after create. |
| Type | kind | Constant | Yes | Account type. Bank, cash, wallet, and payment processor hold funds. Credit card, credit line, and term loan are amounts owed. |
| Account number | accountNumber | Text | Account number assigned by the institution when applicable. Optional for Mexican bank accounts when CLABE alone is used. | |
| Bank identifier type | bankIdentifierScheme | Constant | Fixed option from the allowed set for this field. | |
| Bank identifier | bankIdentifier | Text | ||
| IBAN | iban | Text | International bank account identifier when applicable. Not used on Mexican bank accounts. | |
| Last four digits | cardLast4 | Text | Last four digits of the card. Do not store the full card number. | |
| Start date | dateStart | Date | Credit line effective date or start of the loan term. | |
| End date | dateEnd | Date | Optional credit line expiration; required term loan maturity. When both dates are set, the end date must be on or after the start date. | |
| Nominal annual rate | interestRate | Percent | Nominal annual reference rate on credit card, credit line, or loan. Does not post charges by itself. | |
| Loan principal | amountPrincipal | Currency | Original loan amount in account currency. The installment schedule must add up to this amount. | |
| Effective annual rate | effectiveRate | Percent | Annual rate with monthly compounding. This is not CAT. | |
| Credit limit | creditLimit | Currency | Contract limit in account currency. Required on credit card and credit line. | |
| Balance | balance | Signed amount | Yes | Balance in the account currency. On a credit card, credit line, or loan, a negative balance is the amount owed. |
| Available credit | creditAvailable | Signed amount | Credit limit minus the amount owed. It does not go below zero. | |
| Tags | tagIds | Tags | ||
| Data | data | Data | ||
| Created by | createdBy | User | ||
| Created at | createdAt | Date and Time | Yes | |
| Updated by | updatedBy | User | ||
| Updated at | updatedAt | Date and Time | Yes | |
| Published by | publishedBy | User | ||
| Published at | publishedAt | Date and Time | ||
| Disabled by | disabledBy | User | ||
| Disabled at | disabledAt | Date and Time | ||
| Blocked by | blockedBy | User | ||
| Blocked at | blockedAt | Date and Time | ||
| Archived by | archivedBy | User | ||
| Archived at | archivedAt | Date and Time |
Relations
Owned records (solid line) are deleted with their owner. Grouped records (dashed line) can exist alone.
| Field | Points to | Kind |
|---|---|---|
Ledger account accountingledgeraccountId | Chart of accounts | reference |
Tags tagIds | Tags | reference |
Actions
What you can do with a record. Every action also sends the webhook event treasuryaccounts.<action>. Reads (find, get, count) work on every table.
| Name | API name | Description | Where |
|---|---|---|---|
| Create | create | Add a new treasury account. | App · WebMCP · API · MCP · CLI |
| Edit | update | Save changes to this treasury account. | App · WebMCP · API · MCP · CLI |
| Disable | disable | Turn this treasury account off for new use. Existing references stay. Enable it again to use it. | App · WebMCP · API · MCP · CLI |
| Enable | undisable | Turn this treasury account back on for new use. | App · WebMCP · API · MCP · CLI |
| Publish | publish | Make this treasury account available for use. | App · WebMCP · API · MCP · CLI |
| Block | block | Stop edits and deletion of this treasury account. It stays visible and can still appear on existing documents. Unblock to edit again. | App · WebMCP · API · MCP · CLI |
| Unblock | unblock | Allow edits and deletion of this treasury account again. | App · WebMCP · API · MCP · CLI |
| Archive | archive | Retire this treasury account from daily use. It leaves active lists and pickers, and most actions stop. Unarchive to restore it. | App · WebMCP · API · MCP · CLI |
| Restore | unarchive | Return this treasury account to active lists and actions. | App · WebMCP · API · MCP · CLI |
| Delete | delete | Delete this treasury account and the data that belongs with it. This cannot be undone. | App · WebMCP · API · MCP · CLI |
States
How a record moves from state to state. Archive and block can happen in any state.