Stock allocations and movement records
List an owner’s raw allocations
/a/Stock_containerList
Read every saved stock allocation for one owner/type pair.
When to use this endpoint
Load the legacy owner stock editor, then resolve stock_id through a catalogue reader for item names and codes.
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 |
|---|---|---|---|
id | Owner ID or vehicle UUID | No | Owner identifier, not an allocation row ID. Defaults to an empty string. |
type | Integer-compatible source type | No | Defaults 0. Pair with id; 1 User, 2 Vehicle and 3 Location are legacy editor types. |
Example request
$rows = FM_api('Stock_containerList', ['id'=>'1088', 'type'=>'1']);
Example response
[{"id":"2081","stock_id":"1042","container_id":"1088","container_type":"1","amt":"3","amt_trigger":"","last_edited":"2026-11-23 10:00:00","inventory_id":"0","meta":null}]
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. |
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 raw storage columns, including encoded meta and signed/fractional amt. No ordering, paging, positive-quantity restriction or active-stock/owner join is added.
- Source types include 0 Warehouse, 1 User, 2 Vehicle, 3 Location, 6 Customer, 7 Job, 10 Stock Storage, 11 Asset, 12 Quote, 14 dispatched User, 15 Requisition, 16 Purchase Order, 18 dispatched Job and 20 dispatched Vehicle. A container row ID identifies one saved allocation; container.id identifies its owner and requires the paired type. Neither is a catalogue stock ID or a batch/inventory ID.
- Missing parameters query the empty-owner/type-0 pair rather than returning a parameter error. Empty result is [].
Side effects
- Database reads only; no reservation, movement, alert or history entry is created.
See it in Fieldmotion
CRM1
Open a User/Vehicle/Location stock tab using stockContainerEdit. It passes container.id/type, resolves catalogue data separately and sorts rows in the browser. Filter Network for Stock_containerList.
CRM2
No direct CRM2 caller for this route was found. Its allocation screens use StockContainers_getDataTable and StockContainer_getRequestedDetails; inspect those requests instead.
Related endpoints
Stock_containerAdd— apply a legacy delta to the selected owner.StockContainer_getRequestedDetails— read mapped allocation fields instead.