Accounts and tax types
Overwrite a tax-type group
/a/AccountCategoryGroup_save
Overwrite one existing tax-group name and description.
When to use this endpoint
Use AccountCategoryGroup_save for CRM1’s inline Tax Group edits.
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 |
|---|---|---|---|
id | Integer-compatible | Yes | Positive category-group ID. |
name | String | Yes | Trimmed nonempty name, maximum 64 bytes. |
description | String | No | Trimmed replacement description; omission clears it to an empty string. |
Example request
$result = FM_api('AccountCategoryGroup_save', [
'id' => 151003,
'name' => 'Income',
'description' => 'Sales and other income',
]);
Example response
{"ok":1}
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"} | The ID is absent or not positive. |
{"error":"invalid or missing parameter: name"} | The name is absent, blank after trimming, or longer than 64 bytes. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Both name and description are overwritten on every call.
- An unknown positive ID is a silent no-op that returns success.
- Duplicate names are allowed and no timestamps are recorded.
Side effects
- Updates only the selected
account_category_groupsrow. This route does not explicitly clear the table cache.
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. Change a Tax Group name or description to call this endpoint.
CRM2
CRM2 does not call the focused save route; it submits the complete group list through AccountCategoryGroup_updateData.
Related endpoints
AccountCategoryGroup_newcreates a group.AccountCategoryGroup_deletepermanently deletes one.