When to use this endpoint

Use Customers_listParents to populate a “parent customer” filter with only customers that actually have a direct site/child relationship.

This is not a list of every customer eligible to become a parent. Use Customers_list for a general parent picker.

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
activeInteger stringNoOnly the exact integer value 1 adds is_active=1 to the parent query. Omitted, zero, and other values include active and inactive parents.

Example request

$parents = FM_api('Customers_listParents', [
	'active' => '1',
]);

Example response

[
  {
    "id": "1001",
    "name": "Northwind Group"
  }
]

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 non-deleted customer is referenced as a positive parent ID by a non-deleted child.

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

Behaviour and edge cases

  • Both the returned parent and at least one referencing child must have deleted=0. The child’s active state is not checked.
  • Only direct stored relationships determine membership; the endpoint does not return descendants or relationship counts.
  • Rows are ordered by parent name using the database collation. IDs with no corresponding non-deleted parent row are omitted.
  • There is no pagination or result-size limit.

See it in Fieldmotion

CRM1

CRM1 uses Customers_listParents for the parent filter on Customers and for parent filters on Jobs and report-data pages. Change the active filter on Customers and watch the endpoint reload with the matching active value.

CRM2

CRM2 loads Customers_listParents for Customers, Assets Timeline, Schedule of Rates, and report-data filters. Filter Network requests by the function name while opening one of those pages.

Related endpoints