Goods Received
List legacy Goods Received rows
/a/GoodsReceived_getDT
Page the CRM1 receipt list with supplier, PO and delivery-reference columns.
When to use this endpoint
Page the CRM1 receipt list with supplier, PO and delivery-reference columns.
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 |
|---|---|---|---|
length | Integer | Yes | intval must be at least 1; no upper cap. |
start, draw | Integer | No | start defaults to 0 but negative offsets are not rejected; draw is integer-echoed. |
search[value] | String in native search object | No | Trimmed/lowercased substring search over receipt ID, supplier name, PO ID/number, supplier invoice and delivery note. Notes are not searched. Falsey "0" does not add a search filter. |
order | Native DataTables array | No | First column only: 0 receipt ID, 1 supplier name, 2 received date, 3 PO ID; others fall back to receipt ID. dir is desc only for exact "desc", otherwise asc. Indices describe backend sort fields, not every display column. |
dateFrom, dateTo | Date strings | Together | A dateFrom enables both bounds: cdate >= dateFrom and <= dateTo plus " 23:59:59". A lone dateTo is ignored; no format/range validation or timezone conversion. |
Example request
FM_api('GoodsReceived_getDT', ['length'=>'25','start'=>'0','draw'=>'1','search'=>['value'=>'INV-1042'],'order'=>[['column'=>'0','dir'=>'desc']],'dateFrom'=>'2026-10-01','dateTo'=>'2026-10-09']);
Example response
{"draw":1,"recordsTotal":"1","recordsFiltered":"1","data":[["531","Parts supplier","84","2026-10-09 00:00:00",["482","PO-482"],"INV-1042","DEL-1042","Checked",null]]}
Each row is [receipt ID, supplier name, supplier ID, received date, [PO ID, PO number], supplier invoice, supplier delivery note, notes, job ID]. Database scalar IDs/counts are normally strings; missing joined values are null.
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: length"} | length omitted, zero or negative. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Supplier and PO joins are left joins; missing/deleted linked rows are not excluded. There is no tenant-user, department, deleted/archived or status filter.
- recordsTotal counts all headers, recordsFiltered counts matching joined headers. Sorting has no stable secondary ID tie-breaker, so equal values may shift between pages.
- A failed row query is silently converted to data:[]; count failures are not separately reported. A partial date range or malformed date can therefore resemble no matches.
See it in Fieldmotion
CRM1
Open Goods Received, change the From/To filters or page/search the table, and inspect GoodsReceived_getDT. The UI converts local calendar selections to YYYY-MM-DD strings.
CRM2
CRM2 uses GoodsReceived_getDataTable with mapped aliases instead of these positional rows.
Related endpoints
GoodsReceived_getDataTableโ mapped table response.GoodsReceivedNote_getโ printable header fields.GoodsReceived_exportโ legacy CSV download.