Goods Received
List receipts for a supplier
/a/GoodsReceived_getBySupplierId
Populate a receipt picker after selecting the supplier of a return.
When to use this endpoint
Populate a receipt picker after selecting the supplier of a return.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. Session CSRF, account-active and IP restrictions still apply. These handlers add no receipt-specific page, finance, department or record-owner permission check.
Records are scoped to the authenticated tenant. CRM1 displays Goods Received with employer feature bit 262144; CRM2 checks features2.goodsReceivedNotes. Those screen gates are not enforced by these handlers. Mobile receipt routes run separately through the mobile intermediary and have different permission and ownership checks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer | Yes | Supplier ID, not a receipt ID. intval must be positive. |
Example request
FM_api('GoodsReceived_getBySupplierId', ['id'=>'84']);
Example response
[{"id":"531","notes":"Checked","cdate":"2026-10-09 00:00:00"}]
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"} | id omitted or integer-coerces below 1. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Returns every purchases_in row with supplier_id=id, with only id, notes and cdate. No pagination, limit, ordering, return-eligibility or PO status/approval filter.
- An unknown supplier or no matching receipts returns []; the supplier record is not read. SQL NULL values remain null; database read failure may return false. No writes or stock changes.
See it in Fieldmotion
CRM1
In Goods Returned โ Create, select a supplier and inspect GoodsReceived_getBySupplierId while the Goods Received picker loads.
CRM2
CRM2 Goods Returned and Goods Returned Note use this supplier lookup. The separate mapped return screen also has a GoodReceived_getRequestedDetails lookup.
Related endpoints
GoodsReceivedEntries_getโ load the chosen receipt lines.GoodReceived_getRequestedDetailsโ mapped field selection alternative.