Accounts and tax types
Find a tax rate by tax-type name
/a/AccountCategory_getTaxRateByName
Return the stored tax percentage for one exact tax-type name.
When to use this endpoint
Use AccountCategory_getTaxRateByName when a setting stores a category name and a document editor needs its percentage.
Authentication and permissions
The request must establish an authenticated tenant context with signed API credentials or a logged-in CRM session. This legacy handler checks for the tenant database prefix rather than calling the normal login guard.
It performs no additional Finance-page, client-admin, role, create, edit, or delete permission check.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Exact stored category name. It is neither trimmed nor normalized before the database comparison. |
Example request
$rate = FM_api('AccountCategory_getTaxRateByName', [
'name' => 'Standard VAT',
]);
Example response
"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: name"} | The parameter is absent or exactly empty. |
false | No row matches the supplied name. |
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 successful response is a scalar database string, not an object.
- The query has no ordering or uniqueness enforcement. If duplicate names exist, the selected rate is unspecified.
- The comparison follows the tenant table’s database collation; the endpoint does not perform its own case folding.
See it in Fieldmotion
CRM1
CRM1 uses this lookup in Job, Quote, Requisition Order, Job Invoice, and invoice-table flows when applying configured default tax-type names.
CRM2
CRM2 uses it in Job Invoice and shared invoice-table flows for the same default-name resolution.
Related endpoints
AccountCategories_listByNamesresolves a batch of names to IDs.Accounts_getTaxRateslists every distinct percentage.