When to use this endpoint

Use Customer_getSubsidiaries when a workflow starts from a parent customer and needs its immediate children, such as applying Schedule of Rates customer costs to subsidiaries.

The endpoint does not traverse grandchildren. Use hierarchy-aware customer retrieval when all descendants 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 stringYesParent customer ID; it must convert to a positive integer. The parent itself is not checked for existence.

Example request

$subsidiaries = FM_api('Customer_getSubsidiaries', [
	'id' => '1001',
]);

Example response

[
  {
    "id": "1088",
    "name": "Northwind Belfast",
    "street_address1": "14 Harbour Road",
    "street_address2": "",
    "town": "Belfast",
    "county": "County Antrim",
    "postcode": "BT1 1AA",
    "country": "GBR"
  }
]

No children—or a nonexistent parent—returns an empty JSON array. Database IDs are returned as strings; nullable address columns are returned as JSON null rather than normalized to blank text.

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.

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 query follows only rows whose parent_id directly equals the supplied ID.
  • It does not filter deleted or inactive children and does not verify the parent.
  • There is no explicit ordering, filtering, limit, or pagination; large child sets are returned in one response.

See it in Fieldmotion

CRM1

On Schedule of Rates, edit customer-specific costs and choose to include subsidiaries. CRM1 calls Customer_getSubsidiaries and adds each direct child as another cost row.

CRM2

CRM2 uses the same endpoint from its Schedule of Rates customer-pricing dialog when adding subsidiary rows.

Related endpoints