When to use this endpoint

Use TaskType_getRequestedDetails for CRM2 pickers and layouts that need named task-type 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 Settings-page, role, create, edit, or delete permission check.

All reads and writes use the authenticated tenant. CRM1 and CRM2 decide whether to show task-type controls, but these handlers do not repeat those client-side checks.

Parameters

ParameterTypeRequiredDescription
fieldsNative arrayNoMapped response names. Defaults to all four map keys: id, name, cDate, and lastEdited. Unknown names are ignored; id is always included.
id / idsInteger-compatible or native arrayNoExact ID filter. Scalar values become a one-item list; array members are integer-converted. If both exist, id wins.
nameString or native arrayNoCase-insensitive exact name match, or exact IN list after lowercasing/trimming. This is not substring search.
cDate / lastEditedString or native arrayNoCase-insensitive exact stored datetime filter(s). The helper does not validate datetime format here.
orderString, object, or native arrayNoMapped ordering. A field-name string sorts ascending; an object such as {"id":"name","dir":"desc"} selects direction. Unknown fields are ignored.
advanceSearchNative arrayNoShared mapped condition objects, when needed by CRM2 widgets.

Example request

$types = FM_api('TaskType_getRequestedDetails', [
	'fields' => ['id', 'name'],
	'order' => [['id' => 'name', 'dir' => 'asc']],
]);

Example response

[
  {"id": "3", "name": "Customer follow-up"},
  {"id": "7", "name": "Internal review"}
]

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 skipped rather than rejected.
Runtime/type errorfields is supplied as 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.
  • Task types have no active/deleted flag, so every stored row is eligible.
  • Database-backed scalars remain JSON strings and response keys use mapped names.

See it in Fieldmotion

CRM1

No direct CRM1 caller was found. CRM1 uses TaskTypes_list or TaskTypes_getById.

CRM2

The Task Calendar and Task Kanban screens call this route for id/name picker data. The shared Task Types widget also derives it as its mapped read route.

Related endpoints