Accounts and tax types
List one account’s tax types
/a/Account_listCategories
List the tax types linked to one account for finance and line-item selectors.
When to use this endpoint
Use Account_listCategories when a selected account should restrict the available tax types. It is the widely used legacy counterpart to Account_getTaxRates.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. This legacy handler checks the authenticated user ID directly rather than calling the normal login guard.
All data belongs to the authenticated tenant. No Finance-page, client-admin, role, create, edit, or delete permission is checked by the handler.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible | Conditionally | Positive account ID. When valid it takes precedence over nominal; the handler does not verify that the row exists. |
nominal | String | Conditionally | Exact nominal code used only when id is absent or below 1. One selector must be valid. |
Example request
$categories = FM_api('Account_listCategories', [
'id' => 331042,
]);
Example response
[
{"id":"271006","name":"Standard VAT","tax_rate":"20"}
]
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: id/nominal"} | There is no positive ID and no nonblank nominal code. |
{"error":"invalid parameter: nominal"} | The nominal-code fallback finds no account. |
[] | A supplied ID has no links, even when that account ID does not exist. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The response has no pagination or explicit order.
- The intermediate ID list is built from
manymany.type_num=1; duplicate categories collapse naturally in the finalINquery. - When both selectors are present, any positive
idwins even ifnominalnames a real account.
See it in Fieldmotion
CRM1
This call is visible throughout account-aware selectors, including Settings → Finance, customer defaults, invoices, stock, Job Types, Schedule of Rates, and purchase documents.
CRM2
CRM2 uses it in Finance settings, Credit Notes, invoice tables, and Job Types after the nominal account changes.
Related endpoints
Account_getTaxRatesperforms a closely related lookup with explicit missing-account errors.Account_setCategoriesreplaces these links.