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

ParameterTypeRequiredDescription
fieldsNative array of mapped field namesNoFields 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 idsInteger-compatible or native arrayNoLimit results to one or more IDs. If both are present, id wins.
Mapped field filtersScalar or native arrayNoAny mapped field can filter the query. Text matches are case-insensitive exact comparisons; numeric values are integer-converted.
orderField name, field object, or native arrayNoOptional 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

ResponseCondition
{"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 errorfields 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 order is supplied.
  • Unknown field names in fields are silently omitted; id is always added.
  • JSON-backed accounting fields and customValues are 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