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

ParameterTypeRequiredDescription
fieldsNative arrayNoMapped names to return: id, name, allowedNext, triggers, lastEdited, and colourHex. Omission requests all mapped fields; unknown names are ignored; id is always added.
id / idsInteger string or native arrayNoOptional ID restriction; id takes precedence. Scalars and array items are integer-converted. JSON-array strings are not decoded.
name / allowedNext / triggers / lastEdited / colourHexString or native arrayNoExact case-insensitive mapped filters. Arrays become IN lists.
orderField name or native listNoMapped ordering. List members may be field names or objects such as {"id":"name","dir":"desc"}; exact desc reverses that key. Unknown keys are skipped.
advanceSearchNative arrayNoShared 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

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 or a supplied numeric filter contains no usable values.
Runtime warning or type errorfields, 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 where expressions 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