Customers
Retrieve local and outsourced customers
/a/Customers_getSome
Fetch a fixed legacy customer projection for mixed local IDs and authorized outsourced customer tokens.
When to use this endpoint
Use Customers_getSome when reproducing the CRM1 Jobs or Assets timeline, whose collected customer identifiers can include both local numeric IDs and outsourced tokens.
Use Customers_getById for new integrations that need field selection and predictable validation.
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 |
|---|---|---|---|
ids | JSON array or array | Yes | Local customer IDs and/or tokens in exact o<source-tenant>i<customer-id> form. Strings are JSON-decoded. |
Example request
$customers = FM_api('Customers_getSome', [
'ids' => json_encode(['1042', 'o317i2088']),
]);
Example response
[
{
"account_number": "NW-1042",
"id": "1042",
"name": "Northwind Service Centre",
"email": "service@example.test",
"parent_id": "1001",
"is_active": "1",
"country": "IRL"
},
{
"id": "o317i2088",
"name": "Outsourced customer",
"is_active": "1"
}
]
Local rows use a fixed broad field set. Outsourced rows are returned by Customer_get and use that endpoint’s default field set, so the exact keys can differ between the two branches.
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. |
{"error":"no ids parameter provided"} | ids is absent. |
Error object inside the result array | An outsourced token is not authorized or the remote customer no longer exists. |
Server warning or failure | A non-array JSON value or malformed JSON is supplied; the handler does not validate the decoded value before iteration. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Local rows must have
deleted=0; inactive rows remain visible. Outsourced lookups also exclude soft-deleted rows and require an active source-to-current-tenant outsourcing link. - Local IDs are integer-converted. Duplicate local IDs collapse in SQL, while duplicate outsourced tokens are processed repeatedly.
- All local rows are returned before outsourced results, so mixed request order is not preserved. The local query also defines no ordering.
- Missing local IDs are silently omitted. An outsourced lookup error is appended as an array item rather than failing the whole batch.
- There is no pagination or explicit batch-size limit.
See it in Fieldmotion
CRM1
Open the CRM1 Jobs Timeline or Assets Timeline. After jobs are loaded, the page batches their customer IDs through Customers_getSome; filter Network requests by the function name.
CRM2
A production-source search found no CRM2 caller for this legacy timeline lookup.
Related endpoints
Customers_getByIdis the field-selectable batch alternative and also understands outsourced tokens.Customer_getperforms each outsourced lookup used by this endpoint.