Stock allocations and movement records
List changed allocation IDs
/a/StockContainers_listByLastEdited
Find allocation row IDs whose last-edited value is at or after a supplied timestamp.
When to use this endpoint
Use as the first step of allocation polling, then hydrate returned row IDs. It is not a deletion feed.
Authentication and permissions
Authenticate with a signed API key or a logged-in CRM session on the account’s routed host. Signed requests act as the key owner. Session requests must include the dispatcher CSRF value when configured. All record identifiers belong to the authenticated tenant.
The dispatcher and these handlers do not impose an additional CRM2 Stock role or Stock TeamAccess record scope. CRM2 screen permissions are separate controls and must not be assumed to apply to CRM1. These routes do not become public because an individual legacy handler checks only the tenant context.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | SQL datetime string | Yes | Exact YYYY-MM-DD HH:MM:SS shape. Format is checked by regex, not calendar validity. No timezone conversion is performed. |
Example request
$ids = FM_api('StockContainers_listByLastEdited', ['from'=>'2026-11-23 10:00:00']);
Example response
["2081","2082"]
Examples show one representative result; database numeric scalars can be JSON strings. Application errors can use HTTP 200: inspect error and warning in the decoded response.
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 \"from\" parameter, or parameter is in wrong format. should be \"yyyy-mm-dd hh:ii:ss\""} | Missing or wrong-shaped from value. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Inclusive last_edited ≥ from with no upper bound, pagination, ordering or page-size cap. IDs normally remain database strings.
- Returns allocation row IDs, not catalogue stock IDs. No active-stock or owner join. Removed allocation rows cannot appear; use a separate reconciliation strategy.
- Boundary rows can repeat on the next request because the cutoff is inclusive. No new checkpoint value accompanies the list.
Side effects
- Database reads only; no reservation, movement, alert or history entry is created.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found in the source search. CRM1 uses its legacy Stock grid and stockContainerEdit allocation editor instead.
CRM2
No direct CRM2 caller was found. Its current stock tables query StockContainers_getDataTable; this endpoint is a separate legacy polling surface.
Related endpoints
StockContainer_getRequestedDetails— hydrate changed allocation row IDs.