# \_containerList

Returns rows from the stock\_container table listing stock items allocated to a selected container (i.e. a user, vehicle, or location).

### Parameters

#### id

Integer. The ID of the container.

#### type

Integer. The type of the container.

Recognised types:

* 1 - User
* 2 - Vehicle
* 3 - Location

### Example

```
FM_api('Stock_containerList',
		[
			'id'=>'1234',
			'type'=>'1'
		]
	);
```

### Result

#### On Success

Example result for type=1 (user):

```
[{"stock_id":"2","container_id":"1234","container_type":"1","amt":"5","last_edited":"2015-08-13 11:57:41","amt_trigger":"3|user@email.com"},{"stock_id":"11","container_id":"1234","container_type":"1","amt":"116","last_edited":"2015-10-21 16:17:37","amt_trigger":""}]
```

#### On Failure

If no container ID provided:

```
{"error":"no stock_container ID provided"}
```

If no type provided:

```
	{"error":"no stock_container type provided"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/stock/_containerlist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
