When to use this endpoint

Use Account_getTaxRates to populate a line-item tax selector after the user chooses an account code or account ID.

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

ParameterTypeRequiredDescription
nominalStringConditionallyExact nominal code. A value whose trimmed form is nonempty takes precedence over id, but the untrimmed value is used in the lookup.
idInteger-compatibleConditionallyPositive account ID, used only when nominal is blank. One of these two parameters must select an account.

Example request

$rates = FM_api('Account_getTaxRates', [
	'nominal' => '4000',
]);

Example response

[
  {"id":"271006","name":"Standard VAT","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.
{"error":"parameters must include either id or nominal"}Neither a nonblank nominal code nor a positive ID is supplied.
{"error":"account does not exist"}The selected account cannot be found.
[]The account exists but has no linked category IDs.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Links use manymany.type_num=1. Duplicate link rows are collapsed by category ID.
  • No ordering is specified for the returned categories.
  • Dangling links are omitted because the final query reads existing category rows only.

See it in Fieldmotion

CRM1

Choose a nominal code on a Purchase Order, Requisition Order, Invoice, Job Invoice, or Xero finance setting. CRM1 calls Account_getTaxRates to rebuild the tax selector.

CRM2

Choose a nominal code in the Xero finance settings. CRM2 calls the same route; most other CRM2 editors preload all categories instead.

Related endpoints