Customer types
Retrieve selected customer-type fields
/a/CustomerType_getRequestedDetails
Read selected customer-type fields for one, several, or all rows using the camel-case CRM2 field map.
When to use this endpoint
Use CustomerType_getRequestedDetails for CRM2 layouts that request only their configured fields, or to fetch several known IDs with a consistent mapped shape.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.
The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Native array | No | Mapped names to return: id, name, allowedNext, triggers, lastEdited, and colourHex. Omission requests all mapped fields; unknown names are ignored; id is always added. |
id / ids | Integer string or native array | No | Optional ID restriction; id takes precedence. Scalars and array items are integer-converted. JSON-array strings are not decoded. |
name / allowedNext / triggers / lastEdited / colourHex | String or native array | No | Exact case-insensitive mapped filters. Arrays become IN lists. |
order | Field name or native list | No | Mapped ordering. List members may be field names or objects such as {"id":"name","dir":"desc"}; exact desc reverses that key. Unknown keys are skipped. |
advanceSearch | Native array | No | Shared CRM2 advanced conditions over mapped fields. |
Example request
$details = FM_api('CustomerType_getRequestedDetails', [
'id' => '12',
'fields' => ['id', 'name', 'colourHex'],
]);
Example response
[
{
"id": "12",
"name": "Commercial",
"colourHex": "#336699"
}
]
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 row matches or a supplied numeric filter contains no usable values. |
Runtime warning or type error | fields, order, or advanceSearch is supplied in a malformed non-array shape. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- ID filters are exact. Missing IDs are omitted; an empty result is an empty array.
- Fields use mapped camel-case names in the response. Raw trigger and allowed-next text is not decoded.
- The helper applies no pagination and no default ordering. Legacy advanced-search objects containing raw
whereexpressions are trusted internal CRM input and should not be constructed by third parties.
See it in Fieldmotion
CRM1
No direct production CRM1 caller was found; CRM1 reads the raw row with CustomerType_get.
CRM2
Open Settings → Customer Types and edit a row. The shared configurable form requests its displayed mapped fields through this endpoint.
Related endpoints
CustomerType_getreturns the raw row.CustomerType_updateDatawrites the same mapped names.