When to use this endpoint

Use AccountCategory_getRequestedDetails for CRM2 pickers and layouts that need selected category fields without table paging metadata.

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
fieldsNative arrayNoMapped names from id, name, categoryGroupId, and taxRate, plus computed accountIDs and nameAndTaxRate. Omission returns the four mapped fields only; unknown names are skipped and id is always included.
id / idsInteger-compatible or native arrayNoExact category-ID filter. id wins when both are supplied.
nameString or native arrayNoCase-insensitive exact name filter or exact lowercased list.
categoryGroupId / taxRateNumeric or native arrayNoExact numeric filter(s). The shared detail helper integer-converts scalar and array members, including taxRate, so fractional values lose their decimal part.
accountIDInteger-compatibleNoAdds an inner join restricting results to categories linked from this account through manymany.type_num=1.
orderString, object, or native arrayNoMapped ordering by id, name, categoryGroupId, or taxRate.
advanceSearchNative arrayNoShared mapped condition objects used by internal CRM2 widgets.

Example request

$categories = FM_api('AccountCategory_getRequestedDetails', [
	'fields' => ['id', 'name', 'taxRate', 'accountIDs', 'nameAndTaxRate'],
	'accountID' => 331042,
	'order' => ['name'],
]);

Example response

[
  {"id":"271006","name":"Standard VAT","taxRate":"20","accountIDs":["331042"],"nameAndTaxRate":"Standard VAT - 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 row matches. Unknown requested fields are silently omitted.
Runtime/type errorfields is a JSON string instead of the required native array.

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

Behaviour and edge cases

  • There is no pagination or limit. Without order, database order is unspecified.
  • Requesting nameAndTaxRate appends name and taxRate to the response even when they were not separately requested.
  • Requesting accountIDs performs one additional link query per returned category and returns distinct account IDs.
  • Duplicate account/category link rows can duplicate the main result when accountID is used because the joined query has no DISTINCT.

See it in Fieldmotion

CRM1

No direct CRM1 caller was found; CRM1 uses fixed category-list endpoints.

CRM2

Open Purchase Orders, Quotes, Invoices, Job Types, or a table-invoice widget. Their configured data loaders request the category fields needed for tax selectors and row calculations.

Related endpoints