Customers
Load the CRM1 customer-name cache
/a/Customers_getAllNames
Stream the compact customer-name cache used by CRM1, optionally returning rows edited after a checkpoint.
When to use this endpoint
Use Customers_getAllNames only when reproducing CRM1’s complete or incremental customer-name cache. It returns a fixed compact field set and does not support paging.
For a general integration, prefer Customers_list or the short-polling endpoints, which provide explicit field selection and safer batching.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
last_edited | Date-time string | No | When present, includes rows whose last_edited is strictly later than this literal SQL value. The handler does not validate the format or add an upper time boundary. |
Example request
$rows = FM_api('Customers_getAllNames', [
'last_edited' => '2026-09-24 09:00:00',
]);
Example response
[
{
"id": 1042,
"last_edited": "2026-09-24 09:41:18",
"name": "Northwind Service Centre",
"account_number": "NW-1042",
"postcode": "T12 A3BC",
"is_flagged": "0",
"is_active": "1"
}
]
This streaming endpoint explicitly converts id to a JSON number. The other database scalars remain strings or null.
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. |
false | The raw database query fails before streaming begins. |
[] | No non-deleted row is newer than the checkpoint, or the tenant has no customers. |
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 so CRM1 can preserve names for archived selections.
- Rows are ordered by
last_editedascending. Equal timestamps have no defined order. - The response fields are fixed. There is no field selection, total, page token, limit, or result-size guard.
- The endpoint writes the JSON array directly with invalid UTF-8 substitution instead of returning a normal PHP result to the dispatcher.
See it in Fieldmotion
CRM1
CRM1 loads Customers_getAllNames in the shared header to build its IndexedDB-backed customer-name cache. The initial request has no checkpoint; later cache refreshes can send last_edited. Filter Network requests by the function name while loading customer pickers.
CRM2
A production-source search found no CRM2 caller. CRM2 uses its table and list-picker data flows instead of the CRM1 name cache.
Related endpoints
Customers_listsupports field selection, filters, and optional pagination.Customers_listByLastEditedsupplies changed IDs for the recommended short-polling workflow.- Short polling explains overlap and deletion handling.