Suppliers
Read a supplier hold status
/a/Supplier_getStatus
Read the raw on-hold marker before allowing a purchasing workflow to continue.
When to use this endpoint
Use Supplier_getStatus when only the hold state is needed. CRM1 uses it to block requisition-order actions for suppliers that cannot currently receive purchasing activity.
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
$status = FM_api('Supplier_getStatus', [
'id' => 488104,
]);
Example response
"0"
The success response is the database scalar, commonly the JSON string "0" or "1", not an object.
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 supplier has the ID. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The query does not filter
deleted, so it can return the marker from a soft-deleted supplier. - No supplier fields, dependency reason, or status label accompanies the scalar.
See it in Fieldmotion
CRM1
Open a CRM1 requisition order and select or act on its supplier. The page checks this endpoint and displays an on-hold warning when the response is nonzero.
CRM2
No direct CRM2 caller was found; CRM2 obtains onHold through mapped supplier reads.
Related endpoints
Supplier_getincludeson_holdwith the full active row.Supplier_deletecan set this marker when linked purchasing records prevent deletion.