When to use this endpoint

Use Supplier_getRequestedDetails for camel-cased supplier records, optional exact filters, and batch IDs. It is the general CRM2 supplier lookup and has no pagination.

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 supplier IDs. If both are present, id wins.
Mapped field filtersScalar or native arrayNoAny mapped field can filter the query. Text filters are lowercased exact matches; numeric filters use integer conversion. Multiple filters are joined with AND.
orderField name, field object, or native arrayNoOptional mapped ordering; an object may specify id and dir=desc.

Example request

$suppliers = FM_api('Supplier_getRequestedDetails', [
	'fields' => ['id', 'name', 'onHold'],
	'onHold' => 0,
	'order' => [['id' => 'name']],
]);

Example response

[
  {"id":"488104","name":"Northshore Components","onHold":"0"}
]

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 JSON string or scalar instead of a native array.

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 excluded automatically.
  • There is no pagination, default ordering, or implicit limit. Omitting all filters requests every active supplier.
  • Unknown selected fields are silently omitted and id is always included.
  • Accounting metadata fields and customValues are returned as mapped decoded values rather than the raw storage columns.

See it in Fieldmotion

CRM1

CRM1 source contains no direct caller; its supplier and purchasing screens use Supplier_get or Suppliers_list.

CRM2

Open Stock → Suppliers in CRM2 and filter browser developer tools for the exact function name. Supplier pickers throughout Stock, Requisition Orders, Goods Returned, Xero settings, reports, and quote modules call this endpoint; inspect any such picker load.

Related endpoints