When to use this endpoint

Use JobType_getRequestedDetails for CRM2 configurable details or a mapped lookup that does not need table counts.

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 arrayNoAny of id, name, priority, lastEdited, notes, meta, archived, nominalCode, taxSettings, department, metaFormID, metaSendNotification, metaNotificationEmail, and metaOrderNum. Omission requests all fields; unknown names are ignored; id is always added.
id / idsInteger string or native arrayNoOptional ID restriction; id takes precedence. Scalars and items are integer-converted. JSON array text is not decoded.
Mapped field filtersScalar or native arrayNoSupply any mapped field key. Text values use case-insensitive exact matching, numeric values use integer equality, and arrays become IN lists. Metadata subfields filter their decoded JSON paths.
orderField name or native listNoMapped ordering. List members may be names or objects such as {"id":"metaOrderNum","dir":"desc"}; exact desc reverses that key.
advanceSearchNative arrayNoShared CRM2 advanced conditions over mapped fields.

Example request

$types = FM_api('JobType_getRequestedDetails', [
	'ids' => ['42', '43'],
	'fields' => ['id', 'name', 'priority', 'metaFormID'],
	'order' => [['id' => 'name', 'dir' => 'asc']],
]);

Example response

[
  {"id": "42", "name": "Emergency repair", "priority": "4", "metaFormID": "18"},
  {"id": "43", "name": "Inspection", "priority": "2", "metaFormID": "21"}
]

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 the IDs or filters. Missing IDs are omitted.
Runtime warning or type errorfields, order, an ID list, or advanceSearch is supplied in an unsupported scalar 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

  • No default ordering is applied. Job types have no soft-delete filter.
  • meta remains raw stored text, while named meta* fields are extracted from it. taxSettings remains encoded JSON text.
  • 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

A production-source search found no direct CRM1 caller.

CRM2

Open Settings → Job Types to see mapped detail/tax-settings requests. CRM2 also requests ID/name pairs while rendering Job Details and loads all ID/name pairs to resolve entries in job history.

Related endpoints