Accounts and tax types
Retrieve mapped account details
/a/Account_getRequestedDetails
Retrieve named account fields for CRM2 layouts, pickers, and invoice tables.
When to use this endpoint
Use Account_getRequestedDetails when a CRM2-style consumer needs selected mapped account fields with exact filters rather than the fixed Accounts_list shape.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Native array | No | Mapped response names from id, name, nominalCode, displayName, default, and meta. Omission selects every mapped field; unknown names are skipped and id is always added. |
id / ids | Integer-compatible or native array | No | Exact account-ID filter. A scalar becomes one ID; array members are integer-converted. id takes precedence when both are present. |
name / nominalCode / displayName / meta | String or native array | No | Case-insensitive exact filter, or exact lowercased list. These are not substring filters. |
default | Integer-compatible or native array | No | Exact is_default filter. |
order | String, object, or native array | No | Mapped ordering. A field string is ascending; an object such as {"id":"name","dir":"desc"} selects direction. |
advanceSearch | Native array | No | Shared mapped condition objects used by internal CRM2 widgets. |
Example request
$accounts = FM_api('Account_getRequestedDetails', [
'fields' => ['id', 'nominalCode', 'name'],
'order' => [['id' => 'nominalCode', 'dir' => 'asc']],
]);
Example response
[
{"id":"331042","nominalCode":"4000","name":"Sales"}
]
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. |
[] | No account matches; unknown fields are ignored rather than rejected. |
Runtime/type error | fields is supplied as a JSON string instead of a 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. - Accounts have no soft-delete flag, so every stored account row is eligible.
metaremains the stored JSON string. CRM2’s Job Types loader requests an unmappeddescriptionfield; the helper silently omits it.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found. CRM1 uses the fixed Accounts_list and finance-specific lookup routes.
CRM2
Open an Invoice, Job Type, or table-invoice editor. CRM2 requests selected account fields through this mapped route for pickers and row details.
Related endpoints
Accounts_listis the simpler fixed-shape account list.Account_getDetailsresolves one nominal code with linked categories.