Suppliers
Query mapped supplier details
/a/Supplier_getDetails
Query active suppliers through the shared mapped-detail reader under an older alias.
When to use this endpoint
Supplier_getDetails is behaviorally the same wrapper as Supplier_getRequestedDetails. Prefer the latter for new integrations because it is the route used by CRM2 and other mapped APIs.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session. The handler calls the normal login guard but performs no additional Suppliers-page, stock, purchasing, role, create, edit, or delete permission check.
All records are selected from the authenticated tenant. CRM1 and CRM2 hide some controls through client-side permissions, but these endpoints do not repeat those UI checks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Native array of mapped field names | No | Fields to return; omission requests every mapped field. Use a native array, not a JSON string. Available names are name, contactName, streetAddress1, streetAddress2, town, county, country, postcode, email, phone, notes, website, taxId, terms, accountNumber, refNumber, isActive, onHold, type, meta, createDate, lastEdited, editedUuid, accountsContact, accountsEmail, additionalEmail, and customValues. |
id or ids | Integer-compatible or native array | No | Limit results to one or more IDs. If both are present, id wins. |
Mapped field filters | Scalar or native array | No | Any mapped field can filter the query. Text matches are case-insensitive exact comparisons; numeric values are integer-converted. |
order | Field name, field object, or native array | No | Optional mapped ordering. Objects use {"id":"name","dir":"desc"}. |
Example request
$suppliers = FM_api('Supplier_getDetails', [
'id' => 488104,
'fields' => ['id', 'name', 'accountsEmail'],
]);
Example response
[
{"id":"488104","name":"Northshore Components","accountsEmail":"accounts@example.test"}
]
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 active supplier matches the accumulated filters. |
Runtime/type error | fields is supplied as a string instead of the native array expected by the shared reader. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Deleted suppliers are always excluded.
- The query has no pagination or implicit limit. Ordering exists only when
orderis supplied. - Unknown field names in
fieldsare silently omitted;idis always added. - JSON-backed accounting fields and
customValuesare decoded into their mapped response values.
See it in Fieldmotion
CRM1
No CRM1 production caller was found for this alias.
CRM2
No CRM2 production caller was found for this alias; CRM2 calls Supplier_getRequestedDetails.
Related endpoints
Supplier_getRequestedDetailsis the equivalent, actively used route.Supplier_getreturns one raw snake-case row.