When to use this endpoint

Used by test cleanup to discover legacy return headers. For a user-facing table or header details use the paged/mapped readers instead.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. Session CSRF and account/IP restrictions still apply. These handlers add no goods-return, finance, department, owner or page-role permission check.

Records belong to the authenticated tenant. CRM1 shows this workflow when the employer features bit 262144 is enabled; CRM2 uses features2.goodsReturnedNotes. These are UI gates, not checks performed by these handlers.

Parameters

This endpoint has no operation-specific parameters.

Example request

FM_api('GoodsReturned_list', []);

Example response

[{"id":"642"},{"id":"643"}]

The return value is a bare list, not {data:...}. IDs preserve database types; an empty tenant table produces []. A database failure can return false.

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.
falseDatabase lookup failed; not a typed application error.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • SELECT id reads every goods_returned row without ordering, limit, related joins or deletion filtering. all, id, supplierID, search and paging arguments have no effect.
  • A returned ID says nothing about valid received-note/supplier links, attached lines or whether stock was deducted.

Side effects

  • Read only.

See it in Fieldmotion

CRM1

No current goods-return page caller found. cleanupAllGoodsReturned in the API test suite uses this list and then calls GoodsReturned_delete per header.

CRM2

CRM2 uses GoodsReturned_getDataTable for its table rather than this ID-only list.

Related endpoints