Customers
List customer counties
/a/Customers_listCounties
List distinct stored county values from non-deleted customers for report filters.
When to use this endpoint
Use Customers_listCounties to populate the legacy customer-county condition picker in report editors and viewers.
The values are tenant data, not a canonical geographic list. Preserve the returned spelling and casing when using one as a filter.
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
This endpoint has no operation-specific parameters.
Example request
$counties = FM_api('Customers_listCounties', []);
Example response
[
{"county": "Cork"},
{"county": "Dublin"}
]
A blank string and SQL null can each appear as a distinct row if present in stored data.
Errors and unusual responses
| Response | Condition |
|---|---|
{"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 rows exist. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Soft-deleted customers are excluded; inactive customers are included.
- Values are distinct according to the database column collation and ordered by the stored
countyvalue. Case variants may therefore collapse under a case-insensitive tenant schema. - There is no normalization, country scoping, pagination, or limit.
See it in Fieldmotion
CRM1
Open the report editor or a report with editable conditions and choose Customer Address: county. CRM1 calls Customers_listCounties to populate the value list.
CRM2
A production-source search found no CRM2 caller for Customers_listCounties; current CRM2 report pages use other data flows.
Related endpoints
Customers_listcan return customer rows with the county field.Customers_getDataTablesupports mapped county filtering for CRM2’s Customers table.