When to use this endpoint

Use ContractType_getRequestedDetails for CRM2 configurable details and lightweight ID/name lookups that do 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
fieldsArrayNoNative array of id, name, disableInvoicing, lastEdited, and/or meta. Omission requests all mapped fields; unknown names are ignored; id is always added.
id / idsInteger string or arrayNoOptional ID restriction; id takes precedence. Scalars and array items are integer-converted. JSON-encoded arrays are not decoded.
name / lastEdited / metaString or arrayNoExact case-insensitive mapped filters. Arrays become IN lists.
disableInvoicingInteger string or arrayNoExact integer filter; nonnumeric scalar input becomes zero and nonnumeric array items are omitted.
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.
advanceSearchArrayNoShared CRM2 advanced conditions over mapped fields.

Example request

$types = FM_api('ContractType_getRequestedDetails', [
	'ids' => ['31', '32'],
	'fields' => ['id', 'name', 'disableInvoicing'],
	'order' => [['id' => 'name', 'dir' => 'asc']],
]);

Example response

[
  {"id": "31", "name": "Planned service", "disableInvoicing": "0"},
  {"id": "32", "name": "Warranty", "disableInvoicing": "1"}
]

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 the 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

  • No default ordering is applied. Missing IDs are omitted rather than represented by placeholders.
  • Raw meta remains stored text. Contract types have no status/deleted filter.
  • Tenant feature bit 64 controls visibility of the Contracts UI but is not checked by this handler.
  • 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 Contracts → Types and inspect configurable detail/list requests. The shared widget derives this route as its detail endpoint.

Related endpoints