When to use this endpoint

Use CustomerType_get when maintaining the legacy Customer Types form and all stored columns are required.

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
idInteger stringYesCustomer-type ID. Values are converted to an integer; zero is queried when a blank or nonnumeric value is supplied.

Example request

$type = FM_api('CustomerType_get', [
	'id' => '12',
]);

Example response

{
  "id": "12",
  "name": "Commercial",
  "allowed_next": "12,13",
  "triggers": "[]",
  "last_edited": "2026-09-25 10:30:00",
  "colour_hex": "#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.
{"error":"no id supplied"}The id key is absent.
falseNo customer-type row has the converted ID.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • The response uses database column names, including allowed_next, last_edited, and colour_hex. Trigger JSON remains a string.
  • The table has no deleted/status flag. The lookup returns one row and has no filtering or pagination.

See it in Fieldmotion

CRM1

Open Settings → Customer Types and edit a row. CRM1 loads the form with this endpoint.

CRM2

The configurable CRM2 editor normally reads CustomerType_getRequestedDetails, not this raw-row route.

Related endpoints