When to use this endpoint

Use Customer_getCustomFields when an integration knows the configured custom-field names and needs a compact ordered value vector.

The response does not repeat field names. Keep the request array beside the response or use a fuller customer read when a self-describing object is 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 to read; it must convert to a positive integer.
fieldsJSON array or arrayYesOrdered custom-field names. Signed form requests normally JSON-encode the array. A direct empty PHP array is treated as missing, while the JSON string [] decodes successfully.

Example request

$fields = FM_api('Customer_getCustomFields', [
	'id' => '1088',
	'fields' => json_encode(['Service Level', 'External Region']),
]);

Example response

{
  "id": 1088,
  "fields": ["Gold", ""]
}

Missing keys become empty strings. Stored JSON scalar types are otherwise preserved, and duplicate requested names produce duplicate positions.

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":"missing or invalid parameter: id"}id is absent or invalid.
{"error":"missing parameter: fields"}fields is absent, blank, or supplied directly as an empty array.
{"error":"invalid parameter: fields"}A non-array value does not decode to a JSON array.
{"error":"customer does not exist"}No matching customer row exists.

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 lookup has no active/deleted filter.
  • The endpoint does not validate names against the configured custom-field definition; unknown names simply return empty strings.
  • It returns one ordered result with no filtering or pagination.

See it in Fieldmotion

CRM1

CRM1 uses this call when copying a form to another client account from a configured Client ID custom field, and in the customer predictor training workflow. Filter Network requests for Customer_getCustomFields.

CRM2

No direct production CRM2 caller was found.

Related endpoints