When to use this endpoint

Use Accounts_getTaxRates to populate a tenant-wide tax-rate selector, not to determine which rates are valid for one account.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler calls the normal login guard but performs no additional Finance-page, client-admin, role, create, edit, or delete permission check.

All reads and writes use the authenticated tenant. CRM1 and CRM2 decide whether to show finance controls, but these handlers do not repeat those client-side checks.

Parameters

This endpoint has no operation-specific parameters.

Example request

$rates = FM_api('Accounts_getTaxRates');

Example response

[
  {"tax_rate":"0"},
  {"tax_rate":"5"},
  {"tax_rate":"20"}
]

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
[]No account categories 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

  • Rates come from account_categories, not from the account/category link table. Unlinked categories therefore contribute rates.
  • Duplicate stored rates collapse through SQL DISTINCT and are ordered by numeric tax_rate.
  • Rates are database-backed JSON strings.

See it in Fieldmotion

CRM1

Open Settings → Finance. CRM1 loads and edits the Chart of Accounts, Tax Types, and Tax Groups from this endpoint family; filter browser developer tools for the exact function name. Loading Default Tax Settings calls Accounts_getTaxRates.

CRM2

No direct CRM2 caller was found; CRM2 builds its default-tax choices from the full category list.

Related endpoints