Suppliers
Retrieve one raw supplier
/a/Supplier_get
Retrieve the raw active supplier row used by legacy purchasing and edit screens.
When to use this endpoint
Use Supplier_get when a workflow needs every stored supplier column with database field names. Use the mapped detail route when selecting camel-cased fields is preferable.
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 |
|---|---|---|---|
id | Integer-compatible | Yes | Positive tenant supplier ID. |
Example request
$supplier = FM_api('Supplier_get', [
'id' => 488104,
]);
Example response
{
"id": "488104",
"name": "Northshore Components",
"contact_name": "Aisling Byrne",
"email": "orders@example.test",
"account_number": "NS-42",
"is_active": "1",
"on_hold": "0",
"meta": "{\"email_accounting\":\"accounts@example.test\"}",
"cdate": "2026-10-01 09:30:00",
"last_edited": "2026-10-01 09:30:00",
"edited_uuid": ""
}
The endpoint returns every supplier table column except deleted and ddate. Database numerics are commonly JSON strings, and meta remains encoded JSON text.
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":"missing or invalid parameter: id"} | The ID is absent or not positive. |
false | No active supplier has that ID. Deleted rows are deliberately hidden. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- There is no field selection, pagination, ordering, or fallback lookup.
- The ID is tenant-scoped and the query requires
deleted=0. - Nullable columns remain JSON
null; stored JSON is not decoded.
See it in Fieldmotion
CRM1
Open Stock → Suppliers in CRM1 and filter browser developer tools for the exact function name. Opening a supplier for editing loads it with this route. Purchase-order and requisition-order screens also use it for selected supplier details.
CRM2
CRM2 source contains no direct caller; it uses Supplier_getRequestedDetails and layout-backed reads.
Related endpoints
Supplier_getRequestedDetailssupports mapped field selection and filtering.Suppliers_getByIdretrieves a batch with snake-case field selection.